#cannot start openclaw
1 messages · Page 1 of 1 (latest)
That error means your config has gateway.auth.token set as a SecretRef to an env var, and at startup OpenClaw tries to resolve it — but the Gateway process doesn’t have OPENCLAW_GATEWAY_TOKEN set, so it fails “closed” and won’t start.
Fix = make sure the env var exists in the environment the Gateway service runs with (not just your interactive shell):
Option A (recommended): put it in the global OpenClaw env file
On the gateway host, add to:
~/.openclaw/.env(aka$OPENCLAW_STATE_DIR/.env)
Example:
echo 'OPENCLAW_GATEWAY_TOKEN=your-long-random-token' >> ~/.openclaw/.env
openclaw gateway restart
Then re-run: