Rescue OpenClaw stuck? Gateway, auth, tunnel, and VPS troubleshooting. Get help →
← Back to Blog

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-cli writes to one volume and the gateway reads another, your config set looks ignored. Check the volumes: block for both services in docker-compose.yml.
  • docker compose down -v wiped it. The -v flag deletes named volumes, including your config. Use plain docker compose down to 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 with docker compose run --rm openclaw-cli env | grep OPENCLAW.

Quick reference

Symptom Cause First command
Missing config on first runOnboarding never completedconfig set gateway.mode local
Control UI can't reach gatewayBound to loopback in containerconfig set gateway.bind lan
Config "reverts" after down/upVolume wiped or not sharedCheck volumes: in compose

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

Next useful step

Read next

Fix OpenClaw "Bundled Chrome Extension Is Missing"
Fix the OpenClaw error "bundled Chrome extension is missing". Install the extension files, find the folder path, and load it unpacked in Chrome Developer mode.
Fix OpenClaw macOS: Gateway Won't Stay Running / Telegram Bot Silent
Fix OpenClaw on macOS: gateway dies when you close the terminal, and the Telegram bot stops responding. Install the launchd service and fix binding + permissions.
Fix OpenClaw / Ollama Out of Memory: "killed", OOM, Model Won't Load
Fix out-of-memory errors running local models in OpenClaw: process "killed", CUDA out of memory, model won't load. Free memory now, or step up to a rig that fits the model.