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

GitHub stars40.4k
Forks5.7k
Latest releasev1.5.7Sep 2, 2026
Last commitOct 14, 2026
Est. server cost—

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)

LicenseMIT
TypePermissive: MIT / Apache-2.0: use, modify and sell with few obligations.
Internal business useAllowed under the license text
What to watchPermissive. 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.

Source: github.com/HKUDS/LightRAG#install-lightrag-server

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.

Source: github.com/HKUDS/LightRAG#selecting-backend-storage

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

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

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.