Self-host LightRAG on a VPS
Graph based retrieval augmented generation server with a web UI and API. Runs on local file storage; point it at a model provider with the LLM and embedding settings.
levelrail-cli templates install lightrag --name my-lightragSpecification
- Status
- Listed
- Category
- AI
- Services
- lightrag
- Ports
- 9621
- Volumes
- 2
- Memory
- about 1 GiB
- arm64
- unknown
- amd64
- unknown
- Settings to fill in
- none
- License
- Permissive license, MIT
- Listing
- Community template
About LightRAG
Graph based retrieval augmented generation server with a web UI and API. Runs on local file storage; point it at a model provider with the LLM and embedding settings.
What it deploys
LightRAG runs as one service in a single Compose app, listening on port 9621, with 2 named volume mounts.
| Service | Image | Tag | Ports | Volumes |
|---|---|---|---|---|
| lightrag | ghcr.io/hkuds/lightrag | v1.5.7 | 9621 | rag -> /app/data/rag_storageinputs -> /app/data/inputs |
Before you install
- CPU architecture. arm64 unknown. The scan could not read a manifest or the tag is chosen at install time. This is not a claim either way.
- Listed. It is in the catalog. Back up the data volume before changing an image tag.
Settings and environment
You do not have to fill in anything. 1 secret is generated at deploy and stored encrypted. Values are never shown here.
| Service | Variable | Value |
|---|---|---|
| lightrag | EMBEDDING_BINDING | Preset by the template |
| lightrag | EMBEDDING_BINDING_API_KEY | Preset by the template |
| lightrag | EMBEDDING_BINDING_HOST | Preset by the template |
| lightrag | EMBEDDING_DIM | Preset by the template |
| lightrag | EMBEDDING_MODEL | Preset by the template |
| lightrag | HOST | Preset by the template |
| lightrag | LIGHTRAG_API_KEY | Generated at deploy |
| lightrag | LLM_BINDING | Preset by the template |
| lightrag | LLM_BINDING_API_KEY | Preset by the template |
| lightrag | LLM_BINDING_HOST | Preset by the template |
| lightrag | LLM_MODEL | Preset by the template |
| lightrag | PORT | Preset by the template |
First run
- Set the LLM and embedding settings for your provider, then open the address to upload documents and query them. The generated API key protects the API.
Install LightRAG on a VPS
-
Install Levelrail on a fresh VPS
Run this as root on a Linux server (amd64 or arm64) with ports 80 and 443 reachable. The installer prints a setup link.
curl -fsSL https://levelrail.com/install.sh | sudo sh -
Sign in
Open the setup link, choose a password, then log the CLI in. The CLI install command is
curl -fsSL https://levelrail.com/install-cli.sh | shif the machine does not have it. See Getting started.levelrail-cli login --device -
Read the template
Shows the entry, including its full compose.yaml.
levelrail-cli templates get lightrag -
Install it
This template has an install form, so the CLI fills each setting from --env, a generated secret or its default.
levelrail-cli templates install lightrag --name my-lightragTo put a service behind a domain at install, add
--domain SERVICE=HOST:levelrail-cli templates install lightrag --name my-lightrag --domain lightrag=lightrag.example.com
Without a domain the app gets an sslip.io address. You can also deploy it from the dashboard: Apps, New app, Browse templates, then LightRAG.
Docs and upstream
More in AI
- LibreChatA self-hosted ChatGPT-style interface for many model providers, with agents, search, and multi-user login.
- LiteLLM ProxyOne OpenAI-format gateway in front of 100+ model providers, with keys, budgets, and spend tracking.
- LangfuseTrace, evaluate, and debug LLM applications with prompt management and cost analytics.
- LangflowA visual low-code tool for building and deploying multi-agent and RAG workflows in Python.
- Label StudioA flexible data labeling tool for text, images, audio, and video, with export to common ML formats.
- llama.cpp ServerThe llama.cpp HTTP server: run quantized GGUF models on plain CPUs with an OpenAI-compatible API.