Discord OpenClaw Relay is a practical LAN bridge for real-world OpenClaw setups, connecting a Discord bot on one machine to OpenClaw Gateway on another via WebSocket.

Architecture:

Host A (any machine)                   Host B (any machine)
┌─────────────────────┐                ┌──────────────────────────┐
│  python src/main.py │── WebSocket ──>│  OpenClaw Gateway        │
│  (Discord Bot)      │   LAN          │  ws://192.168.0.108:18789│
└─────────────────────┘                └──────────────────────────┘

Key Features:

Problems Solved:

Problem Solution
Gateway binds to 127.0.0.1 only LAN bind configuration guide included
Remote connection needs gateway token OPENCLAW_TOKEN in .env
New device needs pairing approval Ed25519 identity generation, one-time approval
Long AI responses exceed Discord limit Auto-split on newline/space boundaries
git pull overwrites local config All host-specific values in .env

Use Cases:

For self-hosters running OpenClaw on a GPU box, homelab, or VPS who want their Discord bot on a separate machine. Fills the operational gaps not covered by OpenClaw’s built-in same-host Discord integration.

GitHub Repository