Architecture
DeerFlow’s Docker deployment consists of four main services:Prerequisites
- Docker 20.10+ or Docker Desktop
- Docker Compose v2.0+
- 4GB RAM minimum (8GB recommended)
- 10GB disk space
Quick Start
1. Clone and Configure
2. Configure Your Model
Editconfig.yaml to add at least one LLM model:
3. Set API Keys
Edit.env file in the project root:
4. Initialize and Start
5. Access the Application
Open your browser to:- Application: http://localhost:2026
- API Gateway: http://localhost:2026/api/
- LangGraph: http://localhost:2026/api/langgraph/
- API Docs: http://localhost:2026/docs
Docker Compose Services
Frontend Service
- Next.js 14 with App Router
- Hot reload for development
- pnpm package manager
- Node.js 22-alpine base image
Gateway Service
- Models API (
/api/models) - MCP configuration (
/api/mcp) - Skills management (
/api/skills) - File uploads (
/api/threads/{id}/uploads) - Artifact serving (
/api/threads/{id}/artifacts)
LangGraph Service
- Agent runtime execution
- Thread state management
- SSE streaming responses
- Checkpoint persistence
- Tool execution
Nginx Service
/api/langgraph/*→ LangGraph server (2024)/api/*→ Gateway API (8001)/*→ Frontend (3000)
Volume Mounts
Development Volumes
For hot reload and development:Cache Volumes
For faster builds:Network Configuration
DeerFlow uses a custom bridge network:- Service discovery via DNS
- Internal service communication
- Isolation from other containers
- Predictable IP addressing
Environment Variables
Required Variables
Optional Variables
Building Images
Backend Image
Frombackend/Dockerfile:
Frontend Image
Fromfrontend/Dockerfile:
Management Commands
Start Services
Stop Services
View Logs
Restart Services
Production Optimizations
Multi-stage Build
For smaller production images:Environment-specific Compose
Createdocker-compose.prod.yaml:
Health Checks
Add health checks to services:Troubleshooting
Services Not Starting
Check logs:Port Conflicts
Check port usage:Volume Permission Issues
Fix permissions:Image Build Failures
Clear build cache:Network Issues
Recreate network:Next Steps
Kubernetes Deployment
Deploy DeerFlow on Kubernetes with pod-based sandboxes
Production Guide
Production deployment best practices and optimization
See Also
- Configuration Guide - Configure models, tools, and sandbox
- Sandbox Modes - Choose the right sandbox mode
- Environment Variables - Complete environment variable reference