Gateway Operations
Gateway Operations
The Gateway is OpenClaw's always-on control plane. It connects chat channels, serves WebSocket and HTTP interfaces, coordinates nodes and tools and keeps health checks, logs, state and remote access together.
What the Gateway Is
Unified access layer
Holds channel connections such as WhatsApp and Telegram and exposes the control surface for Dashboard, WebChat and nodes.
One port, many interfaces
The same port can carry WebSocket control traffic, the Control UI, OpenAI-style interfaces and tool-related endpoints.
Built for supervision
It should usually run under launchd or systemd and exit non-zero on fatal errors so the supervisor can restart it.
Use a token even locally
Even when bound to loopback, keep an auth token so other local processes cannot connect without permission.
Common Runtime Commands
Run locally
openclaw gateway --port 18789 Verbose logs
openclaw gateway --port 18789 --verbose Force recovery when the port is stuck
openclaw gateway --force Watch mode for development
pnpm gateway:watch Operational Notes
Remote access
Prefer Tailscale or a VPN. SSH tunnels remain the next-best option, for example ssh -N -L 18789:127.0.0.1:18789 user@host.
Multiple instances
If isolation is really required, give each instance its own gateway.port, config file, state directory and workspace.
Hot reload and restart
The Gateway watches config changes and may hot-apply safe changes while restarting on more critical ones. Disable reload only when you need total manual control.
Service management
LaunchAgent is common on macOS and systemd user services are common on Linux / WSL2. A service reported as loaded is not the same as a healthy RPC endpoint.