docs/InteractiveSetup.md
Use the interactive setup wizard when you want LightRAG to guide you through the configuration instead of editing .env by hand.
The wizard is exposed through make targets:
make env-basemake env-storagemake env-servermake env-validatemake env-security-checkmake env-backupmake env-base-rewritemake env-storage-rewriteYou do not need to call the underlying shell script directly.
The setup wizard helps you configure LightRAG in three parts:
env-base sets up the LLM, embedding model, and optional reranker.env-storage adds or changes storage backends such as PostgreSQL, Neo4j, Redis, Milvus, Qdrant, MongoDB, or Memgraph.env-server sets server host and port, WebUI labels, authentication, API keys, and SSL.You can rerun each step later. The wizard loads your existing .env and shows current values as defaults, so you only need to change what is different.
make env-* targets automatically choose a compatible Bash 4+ interpreter.make env-* targets rather than invoking the setup script yourself.make env-base is the normal starting point because it creates the initial .env.make env-storage and make env-server require an existing .env.Use this quick guide to decide what to run:
make env-basemake env-basemake env-storagemake env-servermake env-validatemake env-security-checkmake env-backupmake env-base-rewrite or make env-storage-rewriteUse this when you want LightRAG running with the least amount of setup and you already have remote model endpoints or API keys.
Command
make env-base
What the wizard asks
What gets written
.envdocker-compose.final.yml only if you enabled wizard-managed Docker servicesWhat to do next
lightrag-server
docker compose -f docker-compose.final.yml up -d
Use this when you want LightRAG to run local inference services for embedding and/or reranking through Docker.
Command
make env-base
Recommended answers
yes to Run embedding model locally via Docker (vLLM)? if you want local embeddingsyes to Enable reranking? and then yes to Run rerank service locally via Docker? if you want local rerankingWhat the wizard asks after you enable local services
What gets written
.envdocker-compose.final.yml with the selected local servicesWhat to do next
docker compose -f docker-compose.final.yml up -d
This starts the generated Docker-based LightRAG stack together with the selected local services.
Use this when you already have .env from make env-base and now want to switch from default local-file storage to database-backed storage.
Command
make env-storage
Prerequisite
.env must already existWhat the wizard asks
Important rule
MongoVectorDBStorage requires Atlas Search / Vector Search support.MongoVectorDBStorage can run against the local Docker deployment. The generated host-side MONGO_URI uses ?directConnection=true.MONGO_URI, such as a mongodb+srv:// Atlas cluster URI or an Atlas Local mongodb://...?...directConnection=true URI.mongodb://...?...directConnection=true URIs, the wizard can only validate the URI format. It cannot determine statically whether the target deployment actually provides Atlas Search / Vector Search support.What gets written
.envdocker-compose.final.yml if you selected wizard-managed storage servicesWhat to do next
docker compose -f docker-compose.final.yml up -d
Use this when you already have .env and need to prepare the server for shared or external use.
Commands
make env-server
make env-security-check
Prerequisite
.env must already existWhat env-server asks
What gets written
.envdocker-compose.final.yml may be updated if your current setup already uses wizard-managed Docker servicesWhat to do next
make env-security-checklightrag-serverFor broader deployment guidance, see DockerDeployment.md.
These commands do not walk you through a full setup flow, but they are part of normal operations.
make env-validate
Use this when you want to confirm that the current .env is internally consistent. It reports problems such as missing required values, malformed auth settings, invalid URIs, invalid ports, or missing SSL files.
make env-security-check
Use this before exposing LightRAG beyond localhost. It reports risky setups such as missing authentication, weak or missing JWT secrets, unsafe whitelist settings, or unresolved sensitive placeholders.
make env-backup
Use this when you want a manual backup without running any setup flow.
.envThe wizard writes .env in the repository root. This file becomes the current runtime configuration produced by the latest wizard run.
In practice, this means:
.env.env as the active configuration for the workflow you most recently configuredenv-base, env-storage, or env-server writes .env, the wizard automatically creates a timestamped backup of the existing file when one is presentdocker-compose.final.ymlThe wizard creates or updates docker-compose.final.yml only when you choose wizard-managed Docker services or when an existing wizard-generated compose setup needs to stay aligned with new server settings.
When one of the setup flows is about to replace or remove an existing generated compose file, it automatically creates a timestamped backup first.
For MongoDB-backed storage, the wizard-managed Docker path uses MongoDB Atlas Local rather than MongoDB Community Edition so local Atlas Search / Vector Search workflows are available.
Use this file when starting the generated Docker stack:
docker compose -f docker-compose.final.yml up -d
The base docker-compose.yml remains the general project compose file. The generated docker-compose.final.yml is the wizard-managed output.
make env-storage or make env-server says .env is missing, run make env-base first.make env-backup before rerunning env-base, env-storage, or env-server; those flows already back up the existing .env, and they also back up the generated compose file before changing it.make env-base-rewrite or make env-storage-rewrite.MINIO_ACCESS_KEY_ID and MINIO_SECRET_ACCESS_KEY are available before running docker compose -f docker-compose.final.yml up -d.make env-base
lightrag-server
make env-base
docker compose -f docker-compose.final.yml up -d
make env-base
make env-storage
docker compose -f docker-compose.final.yml up -d
make env-base
make env-storage
make env-server
make env-security-check
docker compose -f docker-compose.final.yml up -d