LightRAG
Graph-based RAG server that builds a knowledge graph from your documents, with a web UI and REST API.
Quick answer
LightRAG is a graph-based RAG server that builds a knowledge graph from your documents, with a web UI and REST API, listed under Knowledge base & RAG. A typical small-business use: answer questions that need connections across many documents (contracts, research, policies). The project publishes no official RAM figure, so we do not estimate a monthly server cost. License: MIT, which allows internal business use.
Last updated · facts verified against official docs on · sources
Activity data comes from GitHub and was last refreshed Oct 31, 2026.
What is LightRAG?
LightRAG, from the University of Hong Kong's data science lab, extracts entities and relations from documents into a knowledge graph and combines graph and vector retrieval when answering. The LightRAG Server adds a web admin console (document management, graph explorer, query debugging), a query-only chat page for end users and a REST API. It calls the LLM and embedding APIs you configure, local or hosted, and supports PostgreSQL, Neo4j, Milvus and other storage backends for production.
Where it fits in a 10–200 person business
- Answer questions that need connections across many documents (contracts, research, policies)
- Explore the entities and relationships in a document set as a visual graph
- Back-end RAG API for internal tools, with a lighter footprint than Microsoft GraphRAG
These use cases are our editorial suggestions, not claims made by the project.
Can a business use LightRAG? (license)
| License | MIT |
|---|---|
| Type | Permissive: MIT / Apache-2.0: use, modify and sell with few obligations. |
| Internal business use | Allowed under the license text |
| What to watch | Permissive. Internal and commercial use allowed. Models keep their own licenses. |
This is a plain-English summary of the license text, not legal advice. Third-party models you run with it have their own licenses.
Data & compliance: does LightRAG phone home?
| Telemetry (usage data sent to the vendor) | Not documented |
|---|---|
| Other calls home by default (updates, marketplaces, default cloud services) | Not documented |
| Single sign-on (OIDC / SAML / LDAP) | Not documented Built-in auth is an API key or accounts listed in AUTH_ACCOUNTS; no SSO is documented. |
| Audit log | Not documented |
| Role-based access control (RBAC) | Not documented |
| Data residency / GDPR notes from the project | Not documented |
Checked against the project's own docs and repository on . "Not documented" means we could not find the answer in official sources; it does not mean the feature is missing or that no data is sent. Third-party services you connect (model APIs, vector databases, search engines) have their own data policies. Compare all apps.
What hardware does LightRAG need?
The project does not publish a minimum CPU/RAM figure, so we leave the official value blank rather than guess.
GPU: No. It calls the model providers you configure.
No official CPU or RAM figure is published. The default storages keep the whole dataset in the server's memory, so capacity is bounded by RAM; the docs call them suitable only for testing. The offline Docker image guide recommends 20 GB+ of disk.
How much does it cost to host LightRAG per month?
The project publishes no RAM figure we could verify, so we do not estimate a cost.
How to deploy LightRAG
Method: Docker Compose
git clone https://github.com/HKUDS/LightRAG.git
cd LightRAG
cp env.example .env # set LLM and embedding settings, and auth (LIGHTRAG_API_KEY or AUTH_ACCOUNTS + TOKEN_SECRET)
docker compose up From the official instructions: github.com/HKUDS/LightRAG#install-lightrag-server. Always check the source for the current version before you run it.
Known gotchas when self-hosting LightRAG
- The server binds to 0.0.0.0 and, without LIGHTRAG_API_KEY or AUTH_ACCOUNTS + TOKEN_SECRET in .env, every endpoint is public. Even with auth, the Ollama-compatible /api/* routes stay open unless you set WHITELIST_PATHS=/health. source
- The default KV, vector and graph storages are in-memory with file persistence and not meant for production; use PostgreSQL (recommended) or another supported backend. source
- Pick the embedding model before indexing. Changing it later means re-embedding everything, and there is no re-embedding tool. source
- LightRAG needs a more capable LLM than ordinary RAG because indexing asks the model to extract entities and relations, and queries feed it long, noisy context. For local extraction the docs name Qwen3-30B-A3B-Instruct as a reasonable minimum. source
Alternatives in Knowledge base & RAG
- RAGFlow RAG engine with deep document parsing (OCR, layout and tables) and cited answers. Compare LightRAG vs RAGFlow
- AFFiNE Notion- and Miro-style workspace (docs, whiteboards, databases) with built-in AI, self-hostable with Docker. Compare AFFiNE vs LightRAG
- AnythingLLM All-in-one private chat with your documents, agents and an embeddable widget. Compare AnythingLLM vs LightRAG
- PrivateGPT API-first private document Q&A that sits on top of your own LLM server. Compare LightRAG vs PrivateGPT
- Open Notebook Private, self-hosted alternative to Google NotebookLM with your choice of AI models. Compare LightRAG vs Open Notebook
- Langchain-Chatchat Chinese-first local knowledge-base Q&A and agent app built on LangChain, wired to local model servers. Compare Langchain-Chatchat vs LightRAG
- WeKnora Tencent's open-source knowledge-base and agent platform with document parsing, RAG and team workspaces. Compare LightRAG vs WeKnora
- Onyx (formerly Danswer) AI chat and enterprise search connected to 50+ workplace apps. Compare LightRAG vs Onyx (formerly Danswer)
- FastGPT Knowledge-base Q&A and visual AI workflow platform. Compare FastGPT vs LightRAG
- kotaemon Open-source RAG web app for chatting with your documents, with citations and GraphRAG. Compare kotaemon vs LightRAG
- MaxKB Enterprise knowledge-base and agent platform with RAG and workflows. Compare LightRAG vs MaxKB
- DocsGPT Open-source platform for AI agents and assistants that answer from your documents with sources. Compare DocsGPT vs LightRAG
- PipesHub Self-hosted workplace search and AI answers across 50+ connected apps, filtered by each user's permissions. Compare LightRAG vs PipesHub
LightRAG FAQ
How much RAM does LightRAG need?
LightRAG does not publish an official RAM figure, so we do not state one. The default storages keep the whole dataset in the server's memory, so capacity is bounded by RAM; the docs call them suitable only for testing. The offline Docker image guide recommends 20 GB+ of disk.
Does LightRAG need a GPU?
No. It calls the model providers you configure.
How much does it cost to self-host LightRAG?
The software is free to download. The project publishes no official RAM figure, so we do not estimate a monthly server cost.
Is LightRAG free for commercial use?
LightRAG is licensed under MIT (Permissive). Internal business use is allowed under the license text. Permissive. Internal and commercial use allowed. Models keep their own licenses. This is a summary, not legal advice.
What are common problems when self-hosting LightRAG?
The server binds to 0.0.0.0 and, without LIGHTRAG_API_KEY or AUTH_ACCOUNTS + TOKEN_SECRET in .env, every endpoint is public. Even with auth, the Ollama-compatible /api/* routes stay open unless you set WHITELIST_PATHS=/health. The default KV, vector and graph storages are in-memory with file persistence and not meant for production; use PostgreSQL (recommended) or another supported backend. Pick the embedding model before indexing. Changing it later means re-embedding everything, and there is no re-embedding tool. LightRAG needs a more capable LLM than ordinary RAG because indexing asks the model to extract entities and relations, and queries feed it long, noisy context. For local extraction the docs name Qwen3-30B-A3B-Instruct as a reasonable minimum.
Is LightRAG still maintained?
Yes, it is actively developed. Last commit: Oct 14, 2026. Latest release: v1.5.7 (Sep 2, 2026). Checked Oct 31, 2026.
How do I install LightRAG?
The official method is Docker Compose. The exact commands are in the "How to deploy" section above and in the official instructions: https://github.com/HKUDS/LightRAG#install-lightrag-server
What are self-hosted alternatives to LightRAG?
Other apps in Knowledge base & RAG: RAGFlow, AFFiNE, AnythingLLM, PrivateGPT, Open Notebook, Langchain-Chatchat, WeKnora, Onyx (formerly Danswer), FastGPT, kotaemon, MaxKB, DocsGPT, PipesHub.
Sources
- GitHub repository: github.com/HKUDS/LightRAG
- Official documentation: github.com/HKUDS/LightRAG/blob/main/docs/LightRAG-API-Server.md
- License text: github.com/HKUDS/LightRAG/blob/main/LICENSE
- Hardware requirements, Gotcha 2: github.com/HKUDS/LightRAG#selecting-backend-storage
- Deploy instructions, Gotcha 1: github.com/HKUDS/LightRAG#install-lightrag-server
- Gotcha 3: github.com/HKUDS/LightRAG#embedding-models
- Gotcha 4: github.com/HKUDS/LightRAG#selecting-llm-models
- Hetzner Cloud pricing (cost estimate): www.hetzner.com/cloud/regular-performance
- GitHub stars, commits and releases: GitHub REST API, fetched
Facts on this page were checked against the project's own repository and docs on 2026-10-31. Spotted something out of date? Tell us.