Skip to Content

CodeCraft


Deploy Your Own DeerFlow

Prerequisites

  • Docker and Docker Compose
  • A server or VM (Linux recommended)
  • LLM API key

Steps

Clone the repository

git clone https://github.com/bytedance/deer-flow.git cd deer-flow

Create config.yaml

cp config.example.yaml config.yaml

Edit config.yaml for models and other settings.

Create .env

cat > .env << EOF OPENAI_API_KEY=sk-your-key-here DEER_FLOW_ROOT=$(pwd) BETTER_AUTH_SECRET=$(openssl rand -base64 32) BETTER_AUTH_URL=https://your-domain.com AUTH_JWT_SECRET=$(openssl rand -hex 32) DEER_FLOW_WORKER_SECRET=$(openssl rand -hex 32) EOF

You can omit the last two and run ./scripts/deploy.sh so secrets are generated under backend/.deer-flow/.

Start the stack

From the repo root:

./scripts/deploy.sh

Verify

curl -sf http://localhost:2026/health curl -sf http://localhost:2026/api/models docker compose -p deer-flow -f docker/docker-compose.yaml logs -f

Open http://your-server:2026 (terminate TLS in front of nginx in production).

Production checklist

  • HTTPS/TLS in front of nginx
  • Firewall only where needed
  • Back up backend/.deer-flow/
  • Prefer AioSandboxProvider for multi-user isolation

Next steps