Deploy Your Own DeerFlow
This tutorial guides you through deploying DeerFlow to a production environment using Docker Compose for multi-user access.
Prerequisites
- Docker and Docker Compose installed
- A server or VM (Linux recommended)
- LLM API key
Steps
Clone the repository
git clone https://github.com/bytedance/deer-flow.git
cd deer-flowCreate the configuration file
cp config.example.yaml config.yamlEdit config.yaml to add your model configuration.
Create the environment variables file
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
EOFStart the services
docker compose -f docker/docker-compose-dev.yaml up -dVerify the deployment
# Check all services are healthy
curl http://localhost:2026/api/models
# Follow logs
docker compose -f docker/docker-compose-dev.yaml logs -fOpen http://your-server:2026 in your browser.
Production checklist
- Configure HTTPS/TLS for nginx
- Set
BETTER_AUTH_SECRETto a strong random string (minimum 32 characters) - Configure firewall rules to allow only necessary ports
- Back up
backend/.deer-flow/directory regularly - Consider using a container-based sandbox (
AioSandboxProvider) for multi-user isolation
Next steps
Last updated on