Setup
Discord
Configure a Discord bot for OpenClaw, start the gateway, and approve pairing
After onboarding succeeds, configure the Discord bot:
openclaw config set channels.discord.enabled true --json
openclaw config set channels.discord.token "<DISCORD_BOT_TOKEN>"
openclaw config set channels.discord.groupPolicy allowlist
openclaw config set channels.discord.streaming offStart the gateway:
mkdir -p ~/.openclaw/logs
nohup openclaw gateway > ~/.openclaw/logs/gateway-sandbox.log 2>&1 & echo $! > ~/.openclaw/gateway-sandbox.pid
sleep 4Verify the gateway:
openclaw gateway status
tail -n 60 ~/.openclaw/logs/gateway-sandbox.logWhat you want to see:
RPC probe: ok- a log line like
logged in to discord as ...
Ignore the systemd warnings in the sandbox container.
Pair the Bot
When you DM the bot for the first time, it may answer with:
- your Discord user id
- a pairing code
Approve that pairing code in the sandbox:
openclaw pairing approve discord <PAIRING_CODE>Then DM the bot again.
Discord channel auth and model auth are separate. If Discord connects but the bot does not produce real replies, finish the model-auth step next.
Next: continue to /openclaw/setup/auth.