Skip to content
,

RAGFlow Guide (2026): Install RAGFlow 1.0 With Docker and Chat With Your Documents

8–12 minutes
Woman in a living room holding a tablet with a RAGFLOW card, hook RAGFlow chat with docs

RAGFlow is a free, open source RAG engine from InfiniFlow that lets you chat with your own documents and get answers with clickable citations.

You upload PDFs, Word files, spreadsheets, slides, scans, emails or even audio, RAGFlow parses them with its DeepDoc layout and OCR engine, and a chat model answers from the chunks it retrieves.

RAGFlow 1.0.0 shipped on 6 November 2026 with a new Go backend, Agentic Retrieval with Low to Ultra thinking modes, and Knowledge Compilation that turns documents into wikis, graphs, mind maps and timelines. It runs on your own server with Docker, and it works with cloud models or fully local ones through Ollama or vLLM.

This guide shows how to install RAGFlow 1.0 with Docker Compose, log in and secure the defaults, add chat and embedding models, build your first dataset, pick the right parsing template, connect Ollama, use the API, upgrade safely and fix common problems.

It follows the official README, quickstart, Docker README and FAQ as of November 2026.

TL;DR

  • What: self-hosted RAG engine with deep document parsing, citations and agents.
  • Needs: 4 CPU cores, 16 GB RAM, 50 GB disk, Docker 24+ and Compose v2.26.1+ on Linux.
  • Install: git clone, cd ragflow/docker, git checkout v1.0.0, docker compose -f docker-compose.yml up -d.
  • Open: http://YOUR_SERVER_IP (port 80) once /api/v1/system/healthz returns 200.
  • Security: change ADMIN_DEFAULT_PASSWORD (default admin) and other passwords in docker/.env first.
  • Local models: Ollama at http://host.docker.internal:11434 with no API key.

What RAGFlow Does

  • Deep document understanding: DeepDoc runs layout analysis, OCR and table recognition so complex PDFs and scans turn into clean chunks.
  • Template-based chunking: pick a parsing template that matches the document type (papers, books, laws, tables and more).
  • Grounded citations: every answer links back to the source chunk, and you can see and edit chunks by hand.
  • Agentic Retrieval: the model can break a hard question down, retrieve in several rounds and check evidence, with Low, Medium, High or Ultra thinking.
  • Knowledge Compilation: generate wikis, graphs, trees, PageIndex, mind maps, timelines and skills from a document or dataset.
  • Many sources: Word, PowerPoint, Excel, TXT, images, PDFs, scans, web pages, sitemaps and connectors such as Google BigQuery.
  • Hybrid retrieval: multiple recall with fused re-ranking, plus an HTTP API.

If you only need quick document chat inside a chat app, our Open WebUI RAG guide is simpler. RAGFlow is the better pick when parsing quality and citations matter, for example with manuals, contracts or research papers.

Requirements

Item Recommended starting point
CPU 4 cores (x86-64 or ARM64)
RAM 16 GB
Disk 50 GB free
Docker Docker 24.0.0+ and Docker Compose v2.26.1+
OS Linux host; the macOS compose file is temporarily not supported by the new Go backend
GPU Not needed for parsing; DeepDoc runs on CPU in the 1.0 open source release

These are starting numbers. Large datasets, local models and alternative engines need more memory. The docs say Docker images are available for Linux x86-64 and ARM64 from v1.0.0, and Docker picks the right one automatically. On Windows, run it inside Docker Desktop’s Linux VM (WSL2) and apply the vm.max_map_count setting there.

If you don’t want to host it, InfiniFlow also runs a cloud version at cloud.ragflow.io.

Install RAGFlow 1.0 With Docker

  1. Raise vm.max_map_count for the default Elasticsearch engine:
    sysctl vm.max_map_count
    sudo sysctl -w vm.max_map_count=262144

    Add vm.max_map_count=262144 to /etc/sysctl.conf so it survives a reboot.

  2. Clone the repository:
    git clone https://github.com/infiniflow/ragflow.git
    cd ragflow/docker
    git checkout v1.0.0
  3. Edit docker/.env and change the default passwords (see the next section).
  4. Start everything:
    docker compose -f docker-compose.yml up -d

    The container runs database migrations, then starts Admin, Syncer, Ingestor and the API.

  5. Watch it start: docker ps and docker logs -f ragflow-cpu.
  6. Check health:
    curl -f http://localhost/api/v1/system/healthz

    Wait for HTTP 200 before opening the web page.

  7. Open http://IP_OF_YOUR_MACHINE in your browser (no port needed on the default port 80) and register an account or log in.

To use another version, replace v1.0.0 with a tag from the Releases page and make sure RAGFLOW_IMAGE in docker/.env uses the matching image tag.

Secure the Default Settings

The docker/.env file controls the document engine, ports and every password. Change these before the first start, especially if the server is reachable from a network.

Setting Default What to do
ADMIN_DEFAULT_PASSWORD admin Set a strong password; it only applies when the first superuser is created
Admin port 9381 Published on the host Firewall it to trusted admins only
ELASTIC_PASSWORD, MYSQL_PASSWORD, MINIO_PASSWORD, REDIS_PASSWORD Sample values Replace all of them
SVR_WEB_HTTP_PORT / SVR_WEB_HTTPS_PORT 80 / 443 Change if those ports are taken
SVR_HTTP_PORT 9380 (API) Nginx proxies web API calls here
DOC_ENGINE Elasticsearch Switch to Infinity if you prefer (see the FAQ)

Other services publish ports too, such as MinIO (9000 and 9001), MySQL (3306) and Elasticsearch (1200). On a public server, block everything except your web port.

Add Chat and Embedding Models

RAGFlow needs two models: a Chat model that writes answers and an Embedding model that makes your documents searchable. A reranker is optional but improves results.

  1. Open User settings from your avatar and select Model providers.
  2. Pick a provider under Available models and create a provider instance.
  3. Enter the API Key and Base URL your provider needs.
  4. Add the Chat and Embedding models, verify them and save.
  5. Set default models for chat and embedding.

If chat and embeddings come from different providers, create an instance for each. Choose your embedding model before you parse any documents; changing it later means re-embedding.

Create a Dataset and Chat With It

  1. Create a dataset: click Dataset, then Create dataset, name it, choose your embedding model and set Parsing mode to General.
  2. Upload a file: on the Files page click Add file > Upload file, tick Parse on creation and save.
  3. Wait for parsing and confirm the document has chunks. If you skipped Parse on creation, select it and click Run.
  4. Create a chat: click Chat, then Create chat.
  5. Configure it: click the gear icon, pick your chat model and your dataset, open Advanced settings and turn on Show citations.
  6. Ask a question whose answer is in your document, then open the citations to check the source.

If answers look wrong, click the document name to read its chunks, then use Retrieval testing in the dataset to see exactly what a question pulls back. That tells you whether the problem is parsing, retrieval or the chat model.

Choose the Right Parsing Template

Template Best for
General Most normal documents; start here
Q&A Question-answer pairs, one chunk each
Manual PDF manuals with clear sections
Table XLSX and CSV/TXT; usually one row per chunk
Paper Research papers and reports
Book Long DOCX, PDF or TXT with chapters
Laws Legal documents
Presentation PDF and PPTX slides; one slide per chunk
Picture Images and video via OCR and vision models
One Short documents kept as a single chunk
Audio WAV, MP3, FLAC and more via an ASR model
Email EML and MSG files with attachments

For PDFs you can also choose the parser: DeepDOC (default; OCR, tables and layout, best for scans and complex pages) or Naive (faster for plain-text PDFs).

You can plug in an external vision-language model, MinerU, Docling or PaddleOCR for very hard layouts, at the cost of extra model calls. Options such as multi-column recognition and removing headers and footers also help.

Run It Fully Local With Ollama or vLLM

To keep documents and prompts on your own hardware, serve the models locally. The official guide uses Ollama in Docker:

sudo docker run -d --name ollama --restart unless-stopped \
  -p 11434:11434 -v ollama:/root/.ollama ollama/ollama

sudo docker exec ollama ollama pull openbmb/minicpm5-2b
sudo docker exec ollama ollama pull qwen3-embedding:0.6b
Where things run Ollama base URL in RAGFlow
RAGFlow in Docker, Ollama on the same host http://host.docker.internal:11434
Both directly on the same host http://localhost:11434
Ollama on another machine http://OLLAMA_HOST_IP:11434
  1. Open Model providers, find Ollama and add an instance.
  2. Enter the base URL from the table and leave API Key empty.
  3. Add the chat model (for example openbmb/minicpm5-2b) and the embedding model (qwen3-embedding:0.6b) with names that exactly match Ollama.
  4. Click Verify all models, then save.

For more speed on an NVIDIA GPU, serve the chat model with vLLM (vllm serve ... --served-model-name ...) and add it as an OpenAI-compatible provider; our vLLM install guide covers setup. Never expose port 11434 or 8000 to the internet.

API, Embedding and Upgrades

API key: click your avatar, open the API page and create a key, then call the RAGFlow HTTP API. You can also embed a chat on your website from the chat’s settings.

Upload limits: dataset files are limited to 128 MiB each by default (MAX_DOCUMENT_UPLOAD_SIZE), and multipart uploads to 1 GiB in total (MAX_MULTIPART_CONTENT_LENGTH). Above 1 GiB, also raise client_max_body_size in Nginx.

Upgrading safely:

  1. Back up the database, object storage and your .env.
  2. Stop without deleting volumes: docker compose --env-file docker/.env -f docker/docker-compose.yml down (never add -v unless you want to wipe data).
  3. Update the repo to the new tag and set RAGFLOW_IMAGE to match.
  4. Pull and start: docker compose ... pull then docker compose ... up -d.
  5. Check /api/v1/system/healthz. Migrations run automatically.

RAGFlow vs Open WebUI vs AnythingLLM vs Dify

Tool Strength Pick it when
RAGFlow Best parsing, chunk control and citations Complex PDFs, scans, tables, compliance-grade answers
Open WebUI Chat app with simple knowledge bases You already chat with Ollama models
AnythingLLM Easy desktop app One person, quick setup, no Docker
Dify App and workflow builder You need RAG inside larger AI apps

See our AnythingLLM guide and Dify guide to compare setups.

Troubleshooting

Problem Fix
Elasticsearch won’t start Set vm.max_map_count=262144 on the host (or Docker Desktop VM)
Web page shows a network error Wait for /api/v1/system/healthz to return 200; check docker logs ragflow-cpu
Port 80 already in use Change SVR_WEB_HTTP_PORT and add the port to the URL
Parsing stalls below 1% Cancel and restart parsing; check ingestor and NATS errors in the logs
Tasks stuck in the queue Check the ingestor is running and registered; don’t clear the queue first
RAGFlow can’t reach Ollama Use host.docker.internal, check the exact model name and memory
Model not selectable Add and verify it in User settings, Model providers
Answers have no citations Enable Show citations; check documents are parsed and enabled
“database was migrated by a newer version” You’re running an older checkout; use the matching release tag

FAQ

Is RAGFlow free?

Yes. RAGFlow is open source and free to self-host. InfiniFlow also runs a hosted cloud version at cloud.ragflow.io.

Does RAGFlow need a GPU?

No. In the 1.0 open source release, DeepDoc parsing runs on CPU. A GPU only helps if you run local LLMs or embeddings.

Can I run RAGFlow on a Mac?

Not with the 1.0 Go backend right now; the docs say the macOS compose file is temporarily unsupported. Use a Linux machine or server.

What is the default RAGFlow admin password?

The checked-in ADMIN_DEFAULT_PASSWORD is admin. Change it in docker/.env before the first start.

Can RAGFlow use local models?

Yes. Connect Ollama or vLLM for chat and embeddings so nothing leaves your network.

Which file types does RAGFlow support?

Word, PowerPoint, Excel, TXT, Markdown, PDFs, scans, images, web pages, email files and audio, among others.

How do I switch from Elasticsearch to Infinity?

Change DOC_ENGINE in docker/.env and follow the FAQ’s Infinity steps; existing data does not move over automatically.

Does RAGFlow have an API?

Yes. Create a key on the API page and use the HTTP API to manage datasets and ask questions from your own apps.

Sources

Free weekly email

Get new AI guides every week

One short weekly email with our newest local AI, ComfyUI and AI tool guides. No spam, no pop-ups, just the good stuff.

Free. Unsubscribe anytime in one click. We only use your email to send this newsletter. See our privacy policy.

Woman in a living room holding a tablet with a RAGFLOW card, hook RAGFlow chat with docs