Run This Ai
EN DE

How to Deploy LightRAG with Docker: Quick Start Tutorial

Step-by-step tutorial on deploying LightRAG with Docker. Quick start with Docker Compose, configuration tips, and best practices for self-hosting.

LightRAG Logo

Getting Started with LightRAG

LightRAG provides a full-featured Docker image hosted on GitHub Container Registry. This quick start tutorial walks you through deploying your own LightRAG instance.

Prerequisites

  • Docker and Docker Compose installed on your server
  • At least 2GB RAM (4GB recommended for larger datasets)
  • A modern browser for the WebUI

Quick Start with Docker Compose

Create a docker-compose.yml file:

services:
  lightrag:
    image: ghcr.io/hkuds/lightrag:latest
    restart: unless-stopped
    ports:
      - 8080:8080
    volumes:
      - ./data/lightrag:/data

Then start it:

docker compose up -d

Access the WebUI at http://localhost:8080

Configuration

LightRAG supports various backends for embeddings, reranking, and storage. Configure via environment variables or a .env file. For production, set LIGHTRAG_API_KEY to secure your instance.

LightRAG GitHub Repo

Managing Your Knowledge Base

Once running, upload documents through the WebUI, configure embedding models, and start querying. LightRAG supports PDF, TXT, and Markdown formats.

Why Use LightRAG?

With graph-based knowledge indexing, LightRAG delivers more accurate retrieval than traditional chunk-based systems. At 37k+ stars and published at EMNLP 2025, it is one of the most trusted open-source RAG frameworks.

Next Steps

  • Explore the GitHub repository for detailed documentation
  • Try different embedding models via configuration
  • Integrate with your existing LLM workflow
#rag #tutorial