Fix OpenClaw Docker "Missing config" / Gateway Won't Start
A deep-dive on the OpenClaw Docker error Missing config. Run openclaw setup or set gateway.mode=local. Part of the OpenClaw troubleshooting hub.
Stuck on this? Get 1:1 OpenClaw help
Remote rescue for Docker, gateway, and container config problems. See the rescue session →
If OpenClaw prints Missing config. Run openclaw setup or set gateway.mode=local, the gateway started before its configuration was initialized. The fix is three commands: set gateway.mode local, set gateway.bind lan, and restart the container. The rest of this page explains why it happens in Docker specifically so it does not come back on the next docker compose up.
Missing config. Run `openclaw setup` or set gateway.mode=local
Why this happens (and why it’s a Docker thing)
The OpenClaw gateway needs a minimum configuration before it can start: at least gateway.mode telling it whether it hosts the agent locally or connects to a remote gateway. On a normal desktop install, the onboarding wizard writes this for you. In Docker, people commonly run docker compose up first, before completing onboarding, so the config file inside the container’s volume is empty. The gateway boots, finds no gateway.mode, and refuses to run rather than guess.
The same message appears if the config volume was recreated (for example after docker compose down -v, which wipes named volumes) so a previously-working setup loses its config.
The fix
Run these against the CLI service in your compose file. The service name is usually openclaw-cli (check your docker-compose.yml).
# Tell the gateway it hosts the agent locally docker compose run --rm openclaw-cli config set gateway.mode local # Bind to the container network so the host Control UI can reach it docker compose run --rm openclaw-cli config set gateway.bind lan # Restart so the gateway picks up the new config docker compose restart
gateway.mode local is correct for the standard single-box Docker install where the gateway and agent live in the same container. gateway.bind lan is the part people miss: inside a container, binding to loopback makes the gateway unreachable from your host browser, so the Control UI on localhost:18709 never connects. Binding to the LAN interface exposes it on the container network.
Verify it started
# Gateway daemon + RPC health docker compose run --rm openclaw-cli gateway status # Watch the container logs during startup docker compose logs -f
A healthy gateway logs a clean bind on port 18709. If you still see Missing config, the config write did not land in the volume the gateway reads, which is almost always a compose-file mismatch (see below).
If it keeps reverting
- Config volume not shared. The CLI service and the gateway service must mount the same named volume for the config directory. If
openclaw-cliwrites to one volume and the gateway reads another, yourconfig setlooks ignored. Check thevolumes:block for both services indocker-compose.yml. docker compose down -vwiped it. The-vflag deletes named volumes, including your config. Use plaindocker compose downto keep config between restarts.- An env var is overriding config. If
OPENCLAW_GATEWAY_MODE(or similar) is set in the container env, it can win over the config file. Check withdocker compose run --rm openclaw-cli env | grep OPENCLAW.
Quick reference
| Symptom | Cause | First command |
|---|---|---|
Missing config on first run | Onboarding never completed | config set gateway.mode local |
| Control UI can't reach gateway | Bound to loopback in container | config set gateway.bind lan |
| Config "reverts" after down/up | Volume wiped or not shared | Check volumes: in compose |
Related OpenClaw guides
- Back to the full OpenClaw troubleshooting hub for all errors.
- Auth failing after the gateway starts? See gateway token missing / 1008 unauthorized.
- Gateway starts but the port never becomes healthy? See timed out waiting for gateway port 18709.
- Connected but getting nothing back? See blank or empty responses.
Need help?
If the container still won’t start a healthy gateway after this, we offer a fixed-scope remote rescue session. See OpenClaw troubleshooting help →
Get guides like this in your inbox every Wednesday.
No spam. Unsubscribe anytime.
You'll probably need this again.
Press Cmd+D (Mac) or Ctrl+D (Windows) to bookmark this page.
Need OpenClaw fixed live?
Remote rescue sessions for gateway, auth, tunnel, VPS, and model access problems.
See Rescue Session