Sign up through our link and receive $20 in Railway credits. Follow this step-by-step guide to get your OpenClaw agent live in under 10 minutes โ no CLI required.
Sign Up & Get $20 in Credits โRunning an OpenClaw agent locally is great, but hosting it in the cloud means your assistant is always online, ready to handle tasks across Telegram, Discord, or Slack. Railway makes this incredibly simple with their 1-click deployment templates. You won't need to touch the terminal once.
Before starting, gather these essentials:
Upgrading to the Hobby plan ($5/month) is highly recommended. OpenClaw builds from source and usually needs 2GB+ of memory to avoid "Out of Memory" (OOM) errors during the build phase. Use our link below to get $20 in credits โ that covers your first 4 months.
Grab your API key for a modern model like Gemini 3, Claude Opus 4.5, or Codex 5.1.
If you want your bot on Telegram, message @BotFather to generate a Bot Token.
We are using the community-standard OpenClaw template, which automatically provisions the Gateway, the Control UI, and persistent storage so your bot doesn't lose its memory when the server restarts.
Railway will prompt you to set up a few vital environment variables before building the container.
| Variable | What It Does | What to Enter |
|---|---|---|
SETUP_PASSWORD |
Secures your web-based setup wizard. | Create a strong, memorable password. |
OPENCLAW_STATE_DIR |
Defines where to save persistent config data. | Use the default: /data/.openclaw |
OPENCLAW_WORKSPACE_DIR |
Defines where to save workspace files. | Use the default: /data/workspace |
/data to keep your bot's state intact across redeploys.
Click Deploy and give Railway about 3โ5 minutes to build the image.
Once the deployment shows a green "Success" badge, you need to expose your gateway to the web:
your-app-xyz.up.railway.app).Now we configure the actual brain of your agent.
/setuphttps://your-app-xyz.up.railway.app/setup).Inside the Setup Wizard, you will configure how your OpenClaw agent thinks and communicates:
To monitor your agent and manage advanced skills:
OPENCLAW_GATEWAY_TOKEN (it is a 64-character string) and copy it.OPENCLAW_GATEWAY_TOKEN into the gateway access field and click Connect.Your self-hosted AI assistant is now running 24/7. Open your connected chat app, send your first message, and watch it respond!
Sign Up for Railway โ Get $20 in Free Credits โYou'll receive $20 in credits when you sign up through our partner link above.
Affiliate disclosure: We may earn a commission when you sign up through our Railway link at no extra cost to you. Learn more