#How to Enable WhatsApp in OpenClaw UI on Railway.app
1 messages · Page 1 of 1 (latest)
True
WhatsApp on Railway is a WhatsApp Web (Baileys) QR-pairing flow — there’s no “token” like Telegram. You enable it by (a) having the WhatsApp web channel enabled + persisted state, then (b) scanning the QR once.
1) Make sure your Railway deploy is persistent (otherwise you’ll re-scan every redeploy)
Railway needs a Volume mounted at /data and (recommended) vars like:
OPENCLAW_STATE_DIR=/data/.openclawOPENCLAW_WORKSPACE_DIR=/data/workspace
Docs: https://docs.openclaw.ai/install/railway
2) Ensure WhatsApp + web channel are enabled in config
In the Control UI you can edit config, but the minimum shape is:
{
web: { enabled: true },
channels: {
whatsapp: {
dmPolicy: "pairing",
allowFrom: ["+15551234567"]
}
}
}
(You can tighten/expand group settings later.)
Config reference: https://docs.openclaw.ai/gateway/configuration-reference#whatsapp
WhatsApp doc: https://docs.openclaw.ai/channels/whatsapp
3) Pair it from the Web UI (QR)
Open the Control UI (Railway template uses /openclaw):
https://<your-railway-domain>/openclaw- Go to Channels → WhatsApp → Login (it should show a QR)
- On your phone: WhatsApp → Settings → Linked devices → Link a device and scan
Control UI doc (Channels tab supports QR login): https://docs.openclaw.ai/web/control-ui
If you don’t see a WhatsApp login/QR in the Channels panel, paste the relevant bits of your current config (web + channels.whatsapp) and I’ll point out what’s missing.
If you’ve got the Railway volume + OPENCLAW_STATE_DIR set correctly, then the next step is simply the QR link.
In the Control UI (/openclaw):
- Channels → WhatsApp
- You should see a WhatsApp card with status like “Not linked (QR required)” and a Login button.
- Click Login → scan the QR in WhatsApp mobile:
- WhatsApp → Settings → Linked devices → Link a device
- After it links, send your bot account a DM and (if you left
dmPolicy: "pairing") approve:
- Pairing → list/approve (or check pending in the UI if it shows it)
If you don’t see the WhatsApp card / Login button, paste the relevant config snippet from Control UI → Config:
web: { enabled: ... }channels.whatsapp: { ... }
That’s usually the missing piece on hosted setups.
I added the following on https://openclaw-production-400a.up.railway.app/openclaw/config
{
"web": {
"enabled": true
},
}
When clicking the "Save" button, it gives an error: GatewayRequestError: config changed since last load; re-run config.get and retry
That error is the Control UI’s safety guard: it won’t let you write config if the underlying openclaw.json changed since you loaded it (prevents overwriting someone else’s edits / the setup wizard / auto-migrations).
What to do:
- Reload the config, then re-apply your change
- Easiest: hard refresh the page (
Ctrl/Cmd+R), or use any Reload / Refresh button in the config panel (if shown). - Then add
web: { enabled: true }into the freshly-loaded full config and hit Save again.
- Don’t save only this partial object
If you replace the whole file with just:
{ web: { enabled: true } }
you’ll wipe your Telegram config (and anything else) if the save succeeds. Make sure you’re editing the existing config and just adding the web block.
- If it keeps happening: make sure you don’t have two tabs open (e.g.
/setup+/openclaw/config) both editing config. Close one, reload, then save.
Once that’s saved, next is adding channels.whatsapp: { … }, then go to Channels → WhatsApp → Login to scan the QR.
I did refresh it and re-applied it. It still didn't work.
If a full page refresh still immediately hits “config changed since last load”, something else is writing openclaw.json between your load and your save (or your requests are landing on different gateway instances).
The two most common causes on Railway:
A) You have >1 running instance (or a rolling deploy briefly left two up)
If Railway is load-balancing across two containers, config.get can hit instance A and config.apply hits instance B → base-hash will never match.
Check: Railway service settings → make sure you’re running exactly 1 instance/replica. (If you recently redeployed, wait until the old one is fully gone, then retry.)
B) Something is auto-patching config in the background
Open Control UI → Logs and search for lines like:
config.patch write ...config.apply write ...
If you see those happening repeatedly, paste a few lines (they don’t include secrets) and we can identify what’s touching the config.