This repo packages Clawdbot for Railway with a small /setup web wizard so users can deploy and onboard without running any commands.
- Clawdbot Gateway + Control UI (served at
/and/clawdbot) - A friendly Setup Wizard at
/setup(protected by a password) - Persistent state via Railway Volume (so config/credentials/memory survive redeploys)
- One-click Export backup (so users can migrate off Railway later)
- The container runs a wrapper web server.
- The wrapper protects
/setupwithSETUP_PASSWORD. - During setup, the wrapper runs
clawdbot onboard --non-interactive ...inside the container, writes state to the volume, and then starts the gateway. - After setup,
/is Clawdbot. The wrapper reverse-proxies all traffic (including WebSockets) to the local gateway process.
In Railway Template Composer:
- Create a new template from this GitHub repo.
- Add a Volume mounted at
/data. - Set the following variables:
Required:
SETUP_PASSWORD— user-provided password to access/setup
Recommended:
CLAWDBOT_STATE_DIR=/data/.clawdbotCLAWDBOT_WORKSPACE_DIR=/data/workspace
Optional:
CLAWDBOT_GATEWAY_TOKEN— if not set, the wrapper generates one (not ideal). In a template, set it using a generated secret.
Notes:
- This template pins Clawdbot to a known-good version by default via Docker build arg
CLAWDBOT_VERSION.
- Enable Public Networking (HTTP). Railway will assign a domain.
- Deploy.
Then:
- Visit
https://<your-app>.up.railway.app/setup - Complete setup
- Visit
https://<your-app>.up.railway.app/and/clawdbot
- Open Telegram and message @BotFather
- Run
/newbotand follow the prompts - BotFather will give you a token that looks like:
123456789:AA... - Paste that token into
/setup
- Go to the Discord Developer Portal: https://discord.com/developers/applications
- New Application → pick a name
- Open the Bot tab → Add Bot
- Copy the Bot Token and paste it into
/setup - Invite the bot to your server (OAuth2 URL Generator → scopes:
bot,applications.commands; then choose permissions)
docker build -t clawdbot-railway-template .
docker run --rm -p 8080:8080 \
-e PORT=8080 \
-e SETUP_PASSWORD=test \
-e CLAWDBOT_STATE_DIR=/data/.clawdbot \
-e CLAWDBOT_WORKSPACE_DIR=/data/workspace \
-v $(pwd)/.tmpdata:/data \
clawdbot-railway-template
# open http://localhost:8080/setup (password: test)