Deploy OpenClaw
Self-hosted AI agent gateway: Control UI, chat apps, persistent volume
Just deployed
/data
Deploy and Host OpenClaw on Railway
OpenClaw is an open-source (MIT) personal AI agent that you run yourself. Its gateway connects AI models from Anthropic, OpenAI, OpenRouter and other providers to a web Control UI and to chat apps such as Telegram, Discord, Slack and WhatsApp. The agent keeps memory, runs scheduled jobs and uses tools: shell, files, browser and GitHub.
About Hosting OpenClaw
This template runs one OpenClaw gateway built from the official image (version 2026.11.3, pinned by digest) through a small public wrapper repo, so Railway can offer you updates. Config, credentials, SQLite state, sessions and the agent workspace live on a volume at /data, so they survive redeploys. A gateway token is generated at deploy, and every new browser also needs a one-time approval from the service shell. On each boot, OpenClaw's own doctor checks and migrates the state before the gateway starts. You add your AI provider and chat channels after the first login.
Common Use Cases
- A personal assistant on Telegram, Discord, Slack or WhatsApp that keeps working when your laptop is closed
- Scheduled agent jobs: daily briefings, monitoring and reports delivered to chat
- One always-on gateway for the OpenClaw web, desktop and mobile apps
Dependencies for OpenClaw Hosting
- An API key or account for an AI provider (Anthropic, OpenAI, OpenRouter, Google and others), added after deploy
- Optional: chat channel credentials, such as a Telegram bot token from @BotFather
Deployment Dependencies
- OpenClaw on GitHub and its releases
- OpenClaw documentation and security guide
- Template source and changelog
Implementation Details
First login
- Open the service's Railway domain. Paste
OPENCLAW_GATEWAY_TOKEN(service, then Variables) into Gateway secret and click Connect. - The page shows Approve this browser with a command like
openclaw devices approve REQUEST-ID. - Open the service shell (
railway ssh, or right-click the service and choose SSH) and run that command. The page connects by itself.
Connect a model: in the Control UI, open Settings, then Models, then Connect provider, or run openclaw onboard in the shell. Add chat apps under Settings, then Channels.
Custom domain: add it in Railway, set the variable OPENCLAW_PUBLIC_ORIGIN to https://YOUR-DOMAIN and redeploy.
Updates: new OpenClaw versions arrive as template updates, listed in the repo's CHANGELOG. Back up first with openclaw backup create in the shell.
Notes
- Give the service 2 GB of memory (Hobby plan or higher). The gateway uses about 1 to 1.3 GB.
- The gateway runs as an unprivileged user, and
openclawin the shell does too. The agent's shell and file tools run inside this container, with/data/workspaceas their workspace. - The token is an admin credential for an agent that can run commands. Keep it secret; to rotate it, change the variable and redeploy.
- Keep one replica: one gateway per volume.
Why Deploy OpenClaw on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying OpenClaw on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content

