#gateway keeps closing (no reason)
1 messages · Page 1 of 1 (latest)
That output doesn’t look like the gateway process is crashing — it’s your client connection getting immediately kicked with WebSocket close 1008 “pairing required”.
So the fix is: approve the device that’s trying to connect.
Run:
openclaw devices list
openclaw devices approve --latest
Then retry:
openclaw status
# or openclaw dashboard
A couple notes from the same status block:
- “Port 18789 is already in use” just means the systemd user service is already running on that port — don’t start a second gateway instance on the same port. Use
openclaw gateway status(or stop it withopenclaw gateway stopif you truly want to restart manually). - If
devices listshows nothing pending, paste the output ofopenclaw devices list --jsonand we’ll sanity-check what identity it thinks you’re connecting as.
Docs (exact issue/commands): https://docs.openclaw.ai/web/control-ui#device-pairing-first-connection and https://docs.openclaw.ai/cli/devices
🦞 OpenClaw 2026.2.19-2 (45d9b20) — Pairing codes exist because even bots believe in consent—and good security hygiene.
│
gateway connect failed: Error: pairing required
â—‡
Service: systemd (enabled)
File logs: /tmp/openclaw/openclaw-2026-02-20.log
Command: /usr/bin/node /home/parker/.npm-global/lib/node_modules/openclaw/dist/index.js gateway --port 18789
Service file: ~/.config/systemd/user/openclaw-gateway.service
Service env: OPENCLAW_GATEWAY_PORT=18789
Config (cli): ~/.openclaw/openclaw.json
Config (service): ~/.openclaw/openclaw.json
Gateway: bind=loopback (127.0.0.1), port=18789 (service args)
Probe target: ws://127.0.0.1:18789
Dashboard: http://127.0.0.1:18789/
Probe note: Loopback-only gateway; only local clients can connect.
Runtime: running (pid 572531, state active, sub running, last exit 0, reason 0)
Warm-up: launch agents can take a few seconds. Try again shortly.
RPC probe: failed
RPC target: ws://127.0.0.1:18789
gateway closed (1008): pairing required
Gateway target: ws://127.0.0.1:18789
Source: cli --url
Config: /home/parker/.openclaw/openclaw.json
Port 18789 is already in use.
- pid 572531 parker: openclaw-gateway (127.0.0.1:18789)
- Gateway already running locally. Stop it (openclaw gateway stop) or use a different port.
Listening: 127.0.0.1:18789
Troubles: run openclaw status
Troubleshooting: https://docs.openclaw.ai/troubleshooting
It’s not “closing for no reason” — the Gateway is intentionally closing the WebSocket with 1008: pairing required because the client (your CLI / browser Control UI) is an unpaired device.
On the machine running the gateway, do:
openclaw devices list
openclaw devices approve --latest
Then reload the dashboard / re-run openclaw status.
If devices list shows nothing, keep the dashboard page open while you run it (pending requests can expire), and paste:
openclaw devices list --json
@sacred lake what is this issue
hey mate were you able to get this figured out?