Overview
Docker development provides the most consistent and hassle-free DeerFlow experience. All dependencies are pre-configured in containers, eliminating environment-specific issues.Docker is the recommended approach for most developers. You don’t need to install Node.js, Python, or nginx on your local machine.
Benefits
Consistency
Same environment across different machines and operating systems
Isolation
Services run in isolated containers without affecting your system
No Local Dependencies
No need to install Node.js, Python, uv, pnpm, or nginx locally
Easy Cleanup
Simple to reset and clean up with Docker commands
Prerequisites
Required
- Docker Desktop or Docker Engine
- Download Docker Desktop
- On macOS, OrbStack is a lightweight alternative
Optional
- pnpm - For dependency caching optimization
Docker Architecture
The Docker development environment consists of multiple services:All services have hot-reload enabled, so your code changes are automatically reflected without restarting containers.
Setup Steps
Configure the Application
Create and configure your settings:Edit Set your API keys:
config.yaml to configure your model and API keys:config.yaml
Initialize Docker Environment
Build Docker images and install dependencies (first time only):This command:
- Builds Docker images for all services
- Installs frontend dependencies using pnpm
- Installs backend dependencies using uv
- Shares pnpm cache with host for faster builds
- Pre-pulls the sandbox container image
This step may take several minutes on the first run as it downloads and builds everything.
Start Development Services
Start all services with hot-reload:DeerFlow automatically detects your sandbox mode from
config.yaml:- Local/Docker sandbox: Starts nginx, frontend, gateway, and langgraph
- Provisioner/Kubernetes sandbox: Additionally starts the provisioner service
- Frontend changes reload automatically
- Backend changes trigger automatic restart
- LangGraph server supports hot-reload
Access the Application
Once all services are running, access DeerFlow at:
- Web Interface: http://localhost:2026
- API Gateway: http://localhost:2026/api/*
- LangGraph API: http://localhost:2026/api/langgraph/*
Docker Commands
Essential Commands
Direct Docker Compose Commands
You can also use Docker Compose directly for more control:Sandbox Modes
The Docker environment supports multiple sandbox execution modes, automatically detected from yourconfig.yaml:
- Local Sandbox
- Docker Sandbox
- Provisioner/Kubernetes Sandbox
Runs sandbox code directly on the host machine.Docker services started:
config.yaml
- nginx, frontend, gateway, langgraph
Development Workflow
Making Code Changes
All services have hot-reload enabled:Edit Code
Make changes to source files:
- Frontend:
frontend/src/** - Backend:
backend/src/** - Config:
config.yaml
Volume Mounts
These directories are mounted from your host to containers for live editing:Dependency Caching
To speed up builds, these caches are mounted:Provisioner Setup (Advanced)
For Kubernetes-based sandbox isolation:
See docker/provisioner/README.md for detailed configuration.
Troubleshooting
Containers fail to start
Containers fail to start
Check Docker is running:View detailed logs:Rebuild from scratch:
Port already in use
Port already in use
Stop existing services:Or find and stop the conflicting process:
Changes not reflected
Changes not reflected
Ensure volumes are mounted correctly:Force restart:
Out of disk space
Out of disk space
Clean up Docker resources:
Next Steps
Local Development
Learn about running services without Docker
Configuration
Configure models, tools, and sandbox settings
Creating Skills
Extend DeerFlow with custom skills
File Uploads
Upload and process files in conversations