#cannot start openclaw

1 messages · Page 1 of 1 (latest)

haughty pine
#


Health check failed: gateway.auth.token secret reference could not be resolved: Environment variable "OPENCLAW_GATEWAY_TOKEN" is missing or empty.

tulip robinBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

inland jettyBOT
#

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: