| title | Operations and Troubleshooting |
|---|---|
| description | This page covers day-to-day operational tasks and solutions to common problems when running DeerFlow App. |
import { Callout } from "nextra/components";
This page covers day-to-day operational tasks and solutions to common problems when running DeerFlow App.
All services write logs to the logs/ directory when started with make dev:
| File | Service |
|---|---|
logs/gateway.log |
FastAPI Gateway API and agent runtime |
logs/frontend.log |
Next.js frontend dev server |
logs/nginx.log |
nginx reverse proxy |
Tail logs in real time:
tail -f logs/gateway.logAdjust the runtime log level in config.yaml:
log_level: debug # debug | info | warning | errorVerify each service is responding:
# Gateway health
curl http://localhost:8001/health
# Through nginx (verifies full proxy chain)
curl http://localhost:2026/api/modelsKeep your existing config.yaml, .env, and extensions_config.json; do not
run make config again. Stop the mode you currently use, pull the update, then
start the same mode again:
| Current mode | Stop | Pull and restart |
|---|---|---|
| Local development | make stop |
git pull --ff-only && make dev |
| Local production | make stop |
git pull --ff-only && make start |
| Docker development | make docker-stop |
git pull --ff-only && make docker-start |
| Docker production | make down |
git pull --ff-only && make up |
Do not run make docker-init after every git pull; it is for first-time
sandbox image setup. If the new version needs configuration fields, run
make config-upgrade before restarting. It preserves existing values and writes
config.yaml.bak before changing the file.
- Check
logs/gateway.logfor startup errors. - Verify your model is correctly configured in
config.yamlwith a valid API key. - Confirm the API key environment variable is set in the shell that ran
make dev. - Test the model endpoint directly with
curlto rule out network issues.
The agent reports an error like "No chat models are configured" or "model not found":
- Check that the
models:section inconfig.yamlhas at least one entry. - Verify the
name:field matches what you are requesting in the UI. - Check that
api_key:is referencing the correct environment variable and that the variable is set.
Error: BETTER_AUTH_SECRET is required
Set the environment variable before building:
export BETTER_AUTH_SECRET=$(openssl rand -base64 32)
pnpm buildOr set it in your .env file at the repo root.
If file tools (read_file, ls, bash) fail with permission or path errors:
- For
LocalSandboxProvider: check thatallow_host_bashis set correctly and that the agent has read/write access to the thread data directory. - For container sandboxes: verify Docker (or Apple Container) is running and the sandbox image is accessible.
- For K8s Provisioner: check that the provisioner service is healthy (
curl http://localhost:8002/health) and that the K8s cluster is reachable.
This usually means SQLite is handling concurrent writes from multiple users or long-running agent runs. SQLite supports concurrent reads, but only one writer can hold the database lock at a time. In DeerFlow, checkpoint writes and application writes share the same SQLite database file.
For production or multi-user deployments, switch to Postgres:
database:
backend: postgres
postgres_url: $DATABASE_URL
run_events:
backend: dbSQLite should be kept for local development, single-user deployments, or short-lived evaluation environments.
Connection refused: http://provisioner:8002
- Ensure the provisioner service is running:
docker compose ps. - Check that
K8S_API_SERVERis set correctly (should point to the K8s API from inside the container, notlocalhost). - Verify
~/.kube/configis mounted and the cluster is reachable from the container host.
If MCP tools appear in extensions_config.json but are not available in the agent:
- Check
logs/gateway.logfor MCP initialization errors. - Verify the MCP server command is installed (
npx,uvx, or the relevant binary). - Test the server command manually to confirm it starts without errors.
- Set
log_level: debugto see detailed MCP loading output.
- Verify
memory.enabled: trueinconfig.yaml. - Check that the storage path is writable:
ls -la backend/.deer-flow/. - Look for memory update errors in
logs/gateway.log(search for "memory").
Back up the storage backends you use:
backend/.deer-flow/threads/for thread working directories, uploads, and artifacts.backend/.deer-flow/memory.jsonandbackend/.deer-flow/agents/for learned memory.${database.sqlite_dir}/deerflow.dbwhen usingdatabase.backend: sqlite(default:.deer-flow/data/deerflow.db).- Regular database dumps when using
database.backend: postgres. - The legacy
checkpointer.connection_stringfile if your deployment still configures a standalonecheckpointer.
In Docker deployments, back up the bind-mounted host paths rather than the container filesystem.
To restart a single service (local deployment):
make stop
make devIndividual service restart scripts are in scripts/. For targeted restarts, you can kill and relaunch individual processes manually using the PIDs in the log files.