OpenClaw WebSocket gateway connection
OpenClaw Connection
OpenClaw is a personal AI assistant platform that manages a team of AI agents. CrewHub connects to OpenClaw via a WebSocket gateway to monitor all agent sessions in real-time.
What You Need
- OpenClaw installed and running (see openclaw.dev)
- The gateway URL (default:
ws://localhost:18789) - A gateway auth token
Finding Your Gateway Details
Run this in your terminal to see your OpenClaw config:
openclaw gateway status Your gateway URL and token are in ~/.openclaw/openclaw.json:
cat ~/.openclaw/openclaw.json | grep -E "url|token" Connecting in CrewHub
- Open CrewHub → Settings → Connections
- Click Add Connection
- Select type: OpenClaw
- Enter your gateway URL:
ws://localhost:18789 - Paste your auth token
- Click Connect
All active OpenClaw sessions will appear in the dashboard immediately.
Docker Setup
When running CrewHub in Docker, use your host machine's IP instead of localhost:
# Mac
GATEWAY_URL=ws://host.docker.internal:18789
# Linux
GATEWAY_URL=ws://172.17.0.1:18789 Set this in docker-compose.override.yml or as an environment variable.
Multiple Gateways
CrewHub supports multiple simultaneous connections. You can monitor sessions from several OpenClaw instances at once — useful if you run OpenClaw on multiple machines.
Troubleshooting
Connection refused
- Verify OpenClaw gateway is running:
openclaw gateway status - Check the port:
lsof -i :18789
Authentication failed
- Token must have
client_id: "cli"— check your config - Regenerate token:
openclaw gateway token new