Self-hosted AI gateway deployed on Railway. Serves as a shared engineering assistant across Discord, Telegram, and WebUI.
gh repo clone iota-uz/openclawEdit config/openclaw.json and fill in:
- Discord Guild ID and user allowlist IDs
- Telegram group chat IDs and user allowlist IDs
- Create a new project on Railway
- Connect the
iota-uz/openclawGitHub repo - Add a volume:
- Name:
openclaw-data - Mount path:
/home/node/.openclaw
- Name:
- Set environment variables (see below)
- Push to
main— Railway auto-deploys via GitHub webhook
| Variable | Required | Description |
|---|---|---|
OPENROUTER_API_KEY |
Yes | OpenRouter API key |
DISCORD_BOT_TOKEN |
Yes | Discord bot token |
TELEGRAM_BOT_TOKEN |
Yes | Telegram bot token |
OPENCLAW_GATEWAY_PASSWORD |
Yes | Gateway auth password (openssl rand -hex 32) |
GH_TOKEN |
Yes | GitHub PAT scoped to iota-uz org |
AUTH_USERNAME |
Recommended | WebUI login username |
AUTH_PASSWORD |
Recommended | WebUI login password |
CLAUDE_CODE_OAUTH_TOKEN |
Optional | OAuth token from Claude Max subscription |
Railway
├── OpenClaw Gateway (port 18789)
│ ├── WebUI (browser access with auth)
│ ├── Discord channel (bot in guild + DMs)
│ └── Telegram channel (groups + DMs)
├── Volume: /home/node/.openclaw
│ ├── openclaw.json (config)
│ ├── SOUL.md, USER.md, AGENTS.md
│ └── SQLite (memory, sessions, state)
└── OpenRouter API (model provider)
All config lives in config/ and gets seeded to the volume on first boot. After that, the volume copy is authoritative — redeploys won't overwrite your runtime config.
SSH into the Railway service or use the Railway CLI:
railway shell
# Edit config directly on the volume
vi ~/.openclaw/openclaw.json
# Restart the service to applyOr update config/openclaw.json in the repo, delete the volume, and redeploy to re-seed.
Server Settings → Widget → Server ID, or run:
# With the bot token
curl -H "Authorization: Bot $DISCORD_BOT_TOKEN" \
https://discord.com/api/v10/users/@me/guilds | jq '.[].id'Add the bot to your group, send a message, then:
curl "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/getUpdates" | jq '.result[].message.chat.id'Message the bot directly, then use the same getUpdates call.
Build locally:
docker build -t openclaw .
docker run --env-file .env -p 18789:18789 -v openclaw-data:/home/node/.openclaw openclaw