Gateway
Clawdbot's WebSocket server for channels, nodes, sessions, and hooks
The Gateway is Clawdbot's WebSocket server (channels, nodes, sessions, hooks). Subcommands in this page live under clawdbot gateway ….
Run the Gateway
Run a local Gateway process:
clawdbot gatewayForeground alias:
clawdbot gateway runNotes:
- By default, the Gateway refuses to start unless
gateway.mode=localis set in~/.clawdbot/clawdbot.json. - Use
--allow-unconfiguredfor ad-hoc/dev runs. - Binding beyond loopback without auth is blocked (safety guardrail).
SIGUSR1triggers an in-process restart when authorized.SIGINT/SIGTERMhandlers stop the gateway process.
Options
| Option | Description |
|---|---|
--port <port> | WebSocket port (default: 18789) |
--bind <mode> | loopback|lan|tailnet|auto|custom |
--auth <mode> | token|password |
--token <token> | Token override |
--password <password> | Password override |
--tailscale <mode> | off|serve|funnel |
--allow-unconfigured | Allow start without gateway.mode=local |
--dev | Create dev config + workspace if missing |
--reset | Reset dev config + credentials + sessions |
--force | Kill existing listener on selected port |
--verbose | Verbose logs |
Query a running Gateway
All query commands use WebSocket RPC.
Output modes:
- Default: human-readable (colored in TTY)
--json: machine-readable JSON (no styling/spinner)--no-color(orNO_COLOR=1): disable ANSI
Shared options:
--url <url>: Gateway WebSocket URL--token <token>: Gateway token--password <password>: Gateway password--timeout <ms>: timeout/budget
gateway health
clawdbot gateway health --url ws://127.0.0.1:18789gateway status
Shows the Gateway service (launchd/systemd/schtasks) plus an optional RPC probe.
clawdbot gateway status
clawdbot gateway status --jsonOptions:
--url <url>: override the probe URL--token <token>: token auth for the probe--timeout <ms>: probe timeout (default 10000)--no-probe: skip the RPC probe (service-only view)--deep: scan system-level services too
gateway probe
The "debug everything" command. It always probes:
- Your configured remote gateway (if set)
- localhost (loopback) even if remote is configured
clawdbot gateway probe
clawdbot gateway probe --jsonManage the Gateway service
# Install as service
clawdbot gateway install
# Uninstall service
clawdbot gateway uninstall
# Restart service
clawdbot gateway restartDiscover gateways (Bonjour)
clawdbot gateway discoverDiscovers gateways on the local network using Bonjour/mDNS.