OpenClaw: disconnected (1008): unauthorized: gateway token missing
The Gateway runs in token auth mode and the client connected without the shared gateway token. The exact message, why OpenClaw prints it, and the fix.
Updated November 23, 2026
The message
disconnected (1008): unauthorized: gateway token missing
What it means
The Gateway runs in token auth mode and the client connected without the shared gateway token. In the browser this happens when the Control UI was opened without the token or lost it; a direct loopback connection doesn’t bypass token auth.
Fix
- On the Gateway host, print the token in an interactive terminal:
openclaw gateway auth-token --show. - Paste it into the Control UI’s Gateway secret field (login screen or Settings → Gateway) and connect.
- Or run
openclaw dashboardon the Gateway host, which opens the Control UI with a one-time pairing link so the browser no longer depends on the shared token. - If the Gateway started in token mode without a configured token, it generated a runtime token you can’t recover: run
openclaw doctor --generate-gateway-token, restart the Gateway, then repeat step 1.
In an EnvHaven workspace
Yes, until OpenClaw is signed in once. Sign in once from the workspace’s Launch menu (Sign in, or Set key for an API key); the sign-in stays on the workspace, across restarts and on every device.
Where this comes from
From OpenClaw’s documentation and issue tracker: