Skip to main content

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

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

1

Configure the Application

Create and configure your settings:
Edit config.yaml to configure your model and API keys:
config.yaml
Set your API keys:
2

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.
3

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
All services start with hot-reload enabled:
  • Frontend changes reload automatically
  • Backend changes trigger automatic restart
  • LangGraph server supports hot-reload
4

Access the Application

Once all services are running, access DeerFlow at:

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 your config.yaml:
Runs sandbox code directly on the host machine.
config.yaml
Docker services started:
  • nginx, frontend, gateway, langgraph

Development Workflow

Making Code Changes

All services have hot-reload enabled:
1

Edit Code

Make changes to source files:
  • Frontend: frontend/src/**
  • Backend: backend/src/**
  • Config: config.yaml
2

See Changes Automatically

  • Frontend: Browser refreshes automatically
  • Backend: Services restart automatically
  • Config: Restart services with make docker-stop && make docker-start

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:
1

Set Up Kubernetes

Enable Kubernetes in Docker Desktop or install k3s/OrbStack.
2

Configure Environment

Set required environment variables:
3

Update config.yaml

Enable provisioner mode:
config.yaml
4

Start Services

The provisioner service will start automatically.
See docker/provisioner/README.md for detailed configuration.

Troubleshooting

Check Docker is running:
View detailed logs:
Rebuild from scratch:
Stop existing services:
Or find and stop the conflicting process:
Ensure volumes are mounted correctly:
Force restart:
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