Complete installation guide for RAGFlow, the open-source RAG engine with deep document understanding.
| Component | Minimum | Recommended |
|---|---|---|
| CPU | 4 cores | 8+ cores |
| RAM | 16 GB | 32+ GB |
| Disk | 50 GB | 100+ GB |
| Component | Version |
|---|---|
| Docker | ≥24.0.0 |
| Docker Compose | ≥v2.26.1 |
| gVisor | Required for code executor |
Important:
Elasticsearch requires memory mapping to be configured:
# Check current value
sysctl vm.max_map_count
# Set temporarily (resets on reboot)
sudo sysctl -w vm.max_map_count=262144
# Make permanent - add to /etc/sysctl.conf
echo "vm.max_map_count=262144" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
git clone https://github.com/infiniflow/ragflow.git
cd ragflow/docker
Edit docker/.env to customize settings:
# Copy example environment file
cp .env.example .env
# Edit configuration
nano .env
Key settings in .env:
RAGFLOW_IMAGE - Select RAGFlow edition (default: v0.24.0)DEVICE=gpu - Enable GPU acceleration (uncomment for GPU)SVR_HTTP_PORT - Server HTTP port (default: 80)MYSQL_PASSWORD - MySQL root passwordMINIO_PASSWORD - MinIO root passworddocker compose -f docker-compose.yml up -d
# Enable GPU in .env
sed -i '1i DEVICE=gpu' .env
# Start with GPU
docker compose -f docker-compose.yml up -d
# View logs
docker logs -f docker-ragflow-cpu-1
# Check all containers
docker compose ps
Successful startup shows:
____ ___ ______ ______ __
/ __ \ / | / ____// ____// /____ _ __
/ /_/ // /| | / / __ / /_ / // __ \| |
/ / / _, _// ___ |/ /_/ // __/ / // /_/ /| |/ |/ / /_/ |_|/_/ |_|\____//_/ /_/ \____/ |__/|__/
* Running on all addresses (0.0.0.0)
Open your browser and navigate to:
http://localhost
(Default port 80, no port number needed)
Default credentials:
# Edit .env file
nano .env
# Uncomment or add:
DEVICE=gpu
# Restart
docker compose -f docker-compose.yml up -d
RAGFlow supports two document engines:
# Default configuration
docker compose -f docker-compose.yml up -d
# Stop and remove volumes
docker compose -f docker-compose.yml down -v
# Edit .env
nano .env
# Set: DOC_ENGINE=infinity
# Restart
docker compose -f docker-compose.yml up -d
⚠️ Warning:
-vdeletes all existing data!
# Navigate to ragflow directory
cd ragflow
# Pull latest changes
git pull
# Rebuild and restart
docker compose -f docker-compose.yml up -d --build --pull always
# Check logs
docker compose logs -f
# Verify vm.max_map_count
sysctl vm.max_map_count
# Restart Docker
sudo systemctl restart docker
# Verify memory mapping
sysctl vm.max_map_count
# Should be ≥262144
# Check if port 80 is in use
sudo lsof -i :80
# Change port in docker-compose.yml
# 8080:80 # Use port 8080 instead
# ARM64 requires custom build
docker build --platform linux/arm64 -f Dockerfile -t infiniflow/ragflow:custom .
Any questions?
Feel free to contact us. Find all contact information on our contact page.