What it is
RAGFlow is an open-source Retrieval-Augmented Generation engine that fuses RAG with Agent capabilities to provide a context layer for LLMs. It uses a converged context engine and pre-built agent templates to help developers turn complex data into production-ready AI systems. It can be used via a cloud service or deployed locally with Docker or from source.
Who it's for
- Developers building production RAG and agent-based AI systems
- Enterprises of any scale needing a streamlined RAG workflow
- Teams that need to ingest heterogeneous documents (Word, Slides, Excel, TXT, images, scans, web pages) into LLM applications
Requirements
Requirements
- Recommended starting configuration: 4 CPU cores, 16 GB RAM, and 50 GB of available disk space
- Docker >= 24.0.0 and Docker Compose >= v2.26.1
- vm.max_map_count of at least 262144 on the Docker host when using Elasticsearch
- gVisor, only when using the Self-Managed container Sandbox
- Linux x86_64 host for the Go backend (macOS is temporarily not supported)
- For source builds: Go version in go.mod (currently Go 1.27), Clang 20, LLD 20, CMake ≥ 4.0, PCRE2 development files, native CGO libraries; Node.js and npm only for frontend development
Setup
Set vm.max_map_count (Elasticsearch only)
If using Elasticsearch, check the value and raise it to at least 262144 if lower. Usually unnecessary with Infinity. Add it to /etc/sysctl.conf to persist across reboots.
bashsysctl vm.max_map_count sudo sysctl -w vm.max_map_count=262144Clone the repository
Clone the RAGFlow repository.
bashgit clone https://github.com/infiniflow/ragflow.gitCheck out the release tag and start with Docker Compose
Enter the docker directory, check out the Go v1.0.0-rc1 release tag, and start the services in the background.
bash# Enter the Docker deployment directory. cd ragflow/docker # Check out the Go v1.0.0-rc1 release tag. git checkout v1.0.0-rc1 # Start the Go services and their dependencies in the background. docker compose -f docker-compose.yml up -dVerify service status and readiness
docker ps shows dependency status. RAGFlow itself defines no Compose healthcheck, so confirm readiness through the API; HTTP 200 indicates readiness. If SVR_WEB_HTTP_PORT was changed, use that port.
bashdocker ps curl -f http://localhost/api/v1/system/healthzLog in and configure models
Open http://IP_OF_YOUR_MACHINE in a browser (port 80 can be omitted by default) and log in. Then add an LLM, embedding, and reranker on the model provider page, including model name, service address, and API key.
Examples
Inspect logs if startup fails
bashdocker logs --tail 50 <service>What it does: The README suggests inspecting the relevant service logs this way when startup fails.
Start local dependencies for a source build
bashsudo sysctl -w vm.max_map_count=262144
docker compose --env-file docker/.env -f docker/docker-compose-base.yml \
up -d --wait es01 mysql minio nats kvrocks clickhouseWhat it does: Brings up the dependency containers needed when running the Go services from source.
Migrate the database and start the API from source
bash./bin/ragflow_server --migrate
RAGFLOW_DEV_MODE=true ./bin/ragflow_server --apiWhat it does: Migration runs first (in its own terminal); then the API service starts on target port 9380. Admin, Ingestor and Syncer are started separately in their own terminals.
Run the React frontend for development
bashcd web
npm install
API_PROXY_SCHEME=go npm run devWhat it does: Only needed when developing the frontend.
Pros & cons
Pros
- Pro:Template-based chunking with visualization of text chunking allows human intervention and traceable citations to reduce hallucinations
- Pro:Agentic Retrieval with Low, Medium, High, or Ultra thinking modes for multi-step retrieval on complex questions
- Pro:Supports heterogeneous data sources including Word, Slides, Excel, TXT, images, scanned copies, structured data and web pages
- Pro:Configurable LLMs and embedding models, multiple recall with fused re-ranking, and APIs for integration
Cons
- Con:Docker deployment has a sizable recommended baseline (4 CPU cores, 16 GB RAM, 50 GB disk), with more needed for local models
- Con:The Go backend does not currently support macOS; a Linux x86_64 host is required
- Con:Building from source is involved, requiring Go, Clang 20, LLD 20, CMake ≥ 4.0, CGO native libraries and multiple service terminals
Images
