{
  "manifest_version": "1",
  "slug": "lightrag",
  "title": "LightRAG",
  "headline": "Self-host LightRAG, a knowledge graph of your documents",
  "description": "Self-host LightRAG with Docker on an exe.dev VM: PostgreSQL with pgvector, the knowledge graph web UI, an Ollama-style chat API, and models without an OpenAI key.",
  "category": "ai-apps",
  "tags": [
    "lightrag",
    "lightrag self-host",
    "lightrag docker",
    "lightrag server",
    "graph rag",
    "graphrag",
    "knowledge graph",
    "rag",
    "pgvector",
    "ollama api"
  ],
  "url": "https://exe.dev/deploy/lightrag",
  "markdown_url": "https://exe.dev/deploy/lightrag.md",
  "upstream": {
    "website": "https://github.com/HKUDS/LightRAG",
    "source": "https://github.com/HKUDS/LightRAG",
    "docs": "https://github.com/HKUDS/LightRAG/blob/main/lightrag/api/README.md",
    "license": "MIT"
  },
  "example_vm_name": "my-lightrag",
  "time": "10 minutes",
  "stack": [
    {
      "name": "LightRAG Server 1.5.7",
      "detail": "ghcr.io/hkuds/lightrag:v1.5.7 in Docker Compose; the API, the web UI and the Ollama-style API",
      "port": 8000,
      "data": "~/lightrag/data/inputs"
    },
    {
      "name": "PostgreSQL 18 with pgvector",
      "detail": "pgvector/pgvector:0.8.7-pg18; documents, chunks, vectors and the knowledge graph",
      "data": "~/lightrag/data/postgres"
    },
    {
      "name": "exe.dev LLM integration",
      "detail": "gpt-5.4-mini extracts entities and answers, text-embedding-3-small indexes; no API key"
    },
    {
      "name": "Nightly backup",
      "detail": "pg_dump, the uploaded files and the settings; a systemd timer keeps two weeks",
      "data": "~/lightrag-backups"
    }
  ],
  "access": [
    {
      "url": "https://my-lightrag.exe.xyz/",
      "who": "private",
      "what": "the web UI, behind exe.dev login and LightRAG's own login"
    },
    {
      "url": "https://my-lightrag.exe.xyz/query",
      "who": "private",
      "what": "the REST API and the Ollama-style /api/chat; a VM token plus LightRAG's API key"
    }
  ],
  "delivers": [
    "LightRAG Server 1.5.7 and PostgreSQL with pgvector in Docker Compose, back by themselves after a reboot",
    "Entity extraction, answers and embeddings through exe.dev's LLM integration, with no OpenAI key on the VM",
    "The web UI at `https://\u003cvm\u003e.exe.xyz/`, behind exe.dev login and LightRAG's own login, for documents, the knowledge graph and questions",
    "The REST API and an Ollama-compatible chat API that need a VM token and LightRAG's API key from outside",
    "Nightly backups of the database, the uploaded files and the settings in `~/lightrag-backups`"
  ],
  "owner_runs_after": [
    "ssh exe.dev ssh-key generate-api-key --vm=my-lightrag --label=lightrag --exp=90d"
  ],
  "deployable": true,
  "deploy": {
    "new_vm_url": "https://exe.dev/new?prompt=Set%20up%20LightRAG%20on%20this%20VM%20by%20following%20the%20exe.dev%20recipe%20at%20https%3A%2F%2Fexe.dev%2Fdeploy%2Flightrag.md%3Fvia%3Ddeploy%20from%20top%20to%20bottom.%0A%0AThe%20recipe%27s%20example%20VM%20name%20is%20my-lightrag.%20This%20VM%27s%20name%20is%20the%20output%20of%20%60hostname%60%3A%20use%20it%20wherever%20the%20recipe%20writes%20my-lightrag.%20Skip%20the%20step%20that%20creates%20the%20VM%3B%20you%20are%20on%20it.%0A%0AYou%20are%20done%20when%20all%20of%20these%20are%20true.%20Check%20each%20one%20yourself%3A%0A-%20LightRAG%20Server%201.5.7%20and%20PostgreSQL%20with%20pgvector%20in%20Docker%20Compose%2C%20back%20by%20themselves%20after%20a%20reboot%0A-%20Entity%20extraction%2C%20answers%20and%20embeddings%20through%20exe.dev%27s%20LLM%20integration%2C%20with%20no%20OpenAI%20key%20on%20the%20VM%0A-%20The%20web%20UI%20at%20%60https%3A%2F%2F%3Cvm%3E.exe.xyz%2F%60%2C%20behind%20exe.dev%20login%20and%20LightRAG%27s%20own%20login%2C%20for%20documents%2C%20the%20knowledge%20graph%20and%20questions%0A-%20The%20REST%20API%20and%20an%20Ollama-compatible%20chat%20API%20that%20need%20a%20VM%20token%20and%20LightRAG%27s%20API%20key%20from%20outside%0A-%20Nightly%20backups%20of%20the%20database%2C%20the%20uploaded%20files%20and%20the%20settings%20in%20%60~%2Flightrag-backups%60%0A%0ARead%20the%20whole%20recipe%2C%20closed%20details%20included%2C%20and%20follow%20%22Set%20up%20by%0Ahand%22%20in%20order%2C%20skipping%20VM%20creation%3B%20the%20walkthrough%20above%20it%20is%20for%20the%0Aowner.%20Never%20overwrite%20an%20existing%20~%2Flightrag%2F.env.%20Don%27t%20make%20the%20VM%0Apublic%20or%20share%20it.%20Don%27t%20run%20Restore%20or%20Update%2C%20and%20don%27t%20reboot.%20The%0AVM%20can%27t%20reach%20its%20own%20https%3A%2F%2F%3Cvm%3E.exe.xyz%2C%20so%20checks%20use%20localhost.%0AFinish%20by%20telling%20the%20owner%20the%20web%20UI%20URL%2C%20the%20LightRAG%20username%20and%0Apassword%20from%20AUTH_ACCOUNTS%20in%20~%2Flightrag%2F.env%2C%20that%20LIGHTRAG_API_KEY%20in%0Athe%20same%20file%20is%20the%20API%20key%2C%20and%20point%20them%20to%20%22Add%20documents%22.%0A%0AFinish%20with%20the%20URLs%20I%20should%20open%20and%20these%20commands%2C%20which%20only%20I%20can%20run%2C%20from%20my%20own%20computer%20%28with%20this%20VM%27s%20name%20in%20them%29%3A%0A%20%20ssh%20exe.dev%20ssh-key%20generate-api-key%20--vm%3Dmy-lightrag%20--label%3Dlightrag%20--exp%3D90d%0A",
    "terminal": "curl -fsSL https://exe.dev/deploy/lightrag/prompt.txt | ssh exe.dev new --prompt=/dev/stdin",
    "prompt": "Set up LightRAG on this VM by following the exe.dev recipe at https://exe.dev/deploy/lightrag.md?via=deploy from top to bottom.\n\nThe recipe's example VM name is my-lightrag. This VM's name is the output of `hostname`: use it wherever the recipe writes my-lightrag. Skip the step that creates the VM; you are on it.\n\nYou are done when all of these are true. Check each one yourself:\n- LightRAG Server 1.5.7 and PostgreSQL with pgvector in Docker Compose, back by themselves after a reboot\n- Entity extraction, answers and embeddings through exe.dev's LLM integration, with no OpenAI key on the VM\n- The web UI at `https://\u003cvm\u003e.exe.xyz/`, behind exe.dev login and LightRAG's own login, for documents, the knowledge graph and questions\n- The REST API and an Ollama-compatible chat API that need a VM token and LightRAG's API key from outside\n- Nightly backups of the database, the uploaded files and the settings in `~/lightrag-backups`\n\nRead the whole recipe, closed details included, and follow \"Set up by\nhand\" in order, skipping VM creation; the walkthrough above it is for the\nowner. Never overwrite an existing ~/lightrag/.env. Don't make the VM\npublic or share it. Don't run Restore or Update, and don't reboot. The\nVM can't reach its own https://\u003cvm\u003e.exe.xyz, so checks use localhost.\nFinish by telling the owner the web UI URL, the LightRAG username and\npassword from AUTH_ACCOUNTS in ~/lightrag/.env, that LIGHTRAG_API_KEY in\nthe same file is the API key, and point them to \"Add documents\".\n\nFinish with the URLs I should open and these commands, which only I can run, from my own computer (with this VM's name in them):\n  ssh exe.dev ssh-key generate-api-key --vm=my-lightrag --label=lightrag --exp=90d\n",
    "prompt_url": "https://exe.dev/deploy/lightrag/prompt.txt"
  },
  "published": "2026-11-25",
  "updated": "2026-11-22",
  "verified": "2026-11-22",
  "related": [
    "open-webui",
    "mem0",
    "firecrawl",
    "dify",
    "deeptutor",
    "postgres"
  ],
  "alternatives": [
    "Microsoft GraphRAG",
    "RAGFlow"
  ]
}
