backend/docs/SETUP.md
Quick setup instructions for DeerFlow.
DeerFlow uses a YAML configuration file that should be placed in the project root directory.
Navigate to project root:
cd /path/to/deer-flow
Copy example configuration:
cp config.example.yaml config.yaml
Edit configuration:
# Option A: Set environment variables (recommended)
export OPENAI_API_KEY="your-key-here"
# Option B: Edit config.yaml directly
vim config.yaml # or your preferred editor
Verify configuration:
cd backend
python -c "from deerflow.config import get_app_config; print('✓ Config loaded:', get_app_config().models[0].name)"
config.yaml should be in deer-flow/ (project root), not deer-flow/backend/config.yaml is automatically ignored by git (contains secrets)backend/config.yaml and ../config.yaml exist, backend version takes precedenceThe backend searches for config.yaml in this order:
DEER_FLOW_CONFIG_PATH environment variable (if set)backend/config.yaml (current directory when running from backend/)deer-flow/config.yaml (parent directory - recommended location)Recommended: Place config.yaml in project root (deer-flow/config.yaml).
If you plan to use Docker/Container-based sandbox (configured in config.yaml under sandbox.use: deerflow.community.aio_sandbox:AioSandboxProvider), it's highly recommended to pre-pull the container image:
# From project root
make setup-sandbox
Why pre-pull?
If you skip this step, the image will be automatically pulled on first agent execution, which may take several minutes depending on your network speed.
# Check where the backend is looking
cd deer-flow/backend
python -c "from deerflow.config.app_config import AppConfig; print(AppConfig.resolve_config_path())"
If it can't find the config:
config.example.yaml to config.yamlls -la ../config.yamlchmod 600 ../config.yaml # Protect sensitive configuration