This page provides an overview of DeerFlow's deployment architecture, service components, and available deployment modes. It covers the multi-service architecture, port configurations, and different execution environments supported by the system.
For detailed step-by-step setup instructions, see:
make commands.For initial configuration and first-time setup, see Getting Started.
DeerFlow is deployed as a multi-service application with clear separation of concerns. The system consists of four core services that communicate over HTTP, with Nginx acting as a unified reverse proxy entry point.
Sources: docker/docker-compose-dev.yaml5-9 docker/docker-compose.yaml28-43 docker/docker-compose.yaml122 CONTRIBUTING.md128-136
| Service | Port | Route Pattern | Purpose |
|---|---|---|---|
| Nginx | 2026 | All traffic | Unified entry point, routing, and SSE support docker/docker-compose.yaml49-54 |
| Gateway API | 8001 | /api/* | Models, skills, memory, artifacts, and agent runtime backend/Dockerfile112-113 |
| Frontend | 3000 | / (non-API) | Next.js web application docker/docker-compose-dev.yaml6 |
| Provisioner | 8002 | /health | K8s sandbox pod lifecycle management (optional) docker/docker-compose-dev.yaml78-82 |
| Redis | 6379 | N/A | Stream bridge for cross-worker SSE delivery docker/docker-compose.yaml28-42 |
The Nginx configuration determines routing behavior based on the environment:
scripts/nginx.sh which launches nginx with local dev config CONTRIBUTING.md197-202gateway and frontend docker/docker-compose.yaml132-133DeerFlow supports multiple deployment modes optimized for different use cases, from rapid local iteration to production-scale isolation.
Sources: Makefile102-104 scripts/docker.sh177-197 docker/docker-compose.yaml1-10 deploy/helm/deer-flow/README.md1-10
| Mode | Command | Use Case | Persistence Backend | Hot Reload |
|---|---|---|---|---|
| Local Development | make dev | Native iteration on host | SQLite / Memory | ✅ Full Makefile102-104 |
| Docker Development | make docker-start | Isolated dev environment | SQLite / Postgres | ✅ Full CONTRIBUTING.md46-50 |
| Docker Production | make up | Standard production deploy | Postgres / SQLite | ❌ No docker/docker-compose.yaml98 |
| Kubernetes (Helm) | helm install ... | Enterprise-scale deployment | PostgreSQL + PVC | ❌ No deploy/helm/deer-flow/README.md1-10 |
DeerFlow uses a layered configuration system. Configuration files and persistent data volumes are shared across all deployment modes.
The DatabaseConfig class controls both the LangGraph checkpointer and application data backend/packages/harness/deerflow/config/database_config.py3-5
asyncpg driver backend/packages/harness/deerflow/persistence/engine.py111-118In containerized environments, UV_EXTRAS is used to install optional dependencies (e.g., postgres) during the image build backend/Dockerfile16-18 Persistent data is stored in DEER_FLOW_HOME (defaulting to .deer-flow), which is mounted as a volume in Docker docker/docker-compose.yaml103
The sandbox system provides isolated execution environments for agent code. DeerFlow supports multiple configurations via the AioSandboxProvider and LocalSandboxProvider.
Sources: scripts/docker.sh44-87 docker/docker-compose.yaml104-107 docker/docker-compose-dev.yaml33-36
The make setup-sandbox command or make docker-init allows pre-pulling the required sandbox container image Makefile98-99 scripts/docker.sh114-174 For production Kubernetes environments, the provisioner service manages the lifecycle of these Pods via the Kubernetes API deploy/helm/deer-flow/values.yaml84-86
Sources: Makefile19-50 docker/docker-compose.yaml1-10 CONTRIBUTING.md9-71
Refresh this wiki