
Deploy OpenClaw (Prev Clawdbot, Moltbot) | Self Host OpenClaw on Railway
[Mar '26] 1-Click Deploy AI Agent Securely (TUI Support, Manage Devices)
OpenClaw (Prev Moltbot, Clawdbot)
Just deployed
/data

Deploy and Host OpenClaw (Prev Clawdbot, Moltbot) β Self-Hosted AI Agents on Railway
OpenClaw is a powerful AI agent framework that enables you to run Claude, GPT, or Gemini as your personal assistant. Chat via web, Telegram, Discord, or Slack. Execute code, browse the web, schedule tasks, and maintain conversation context.
π Quick Start Deployment Guide
Step 1: Deploy on Railway
- Click the "Deploy on Railway" button at the top of this page & wait for the initial deployment to complete (~3-5 minutes)
Step 2: Note Your Credentials
Check the Variables tab and save following:
- SETUP_PASSWORD: Your password for accessing the setup wizard
β οΈ Keep this secure! You'll need this in the next steps.
Step 3: Access Setup Wizard
- Click on the URL provided by Railway in your project dashboard (e.g.,
https://your-app-xyz.up.railway.app) - Login prompt appears:
- Username: Leave blank (press Enter)
- Password: Enter your
SETUP_PASSWORD
Step 4: Complete the Setup Wizard
Once you log in, follow the intuitive 7-step guide on the left side of the setup screen to bring your AI agent online:

- Select your provider & auth type, then paste your API key
- Add channels (optional β can be done later)
- Click Run Setup
- If you added a channel token, click Approve Pairing and enter the code (After setup, message your bot on the channel. It will reply with a pairing code. Enter that code here to grant DM access.)
- Click Open OpenClaw UI
- First login? Click Manage Devices β Approve Latest Request (New browsers need a one-time device approval. After clicking "Open OpenClaw UI", come back here, click "Manage Devices", and approve the pending request.)
- You should now see Health: OK in the OpenClaw UI.

Step 5: Start Chatting
- Click "Chat" in the sidebar of the newly opened OpenClaw UI
- Type your first message
- Enjoy your self-hosted AI assistant! π
About Hosting OpenClaw (Prev Clawdbot, Moltbot) β Self-Hosted AI Agents
Deploying OpenClaw on Railway traditionally requires interactive terminal access for onboarding, which Railway doesn't provide. This template solves that challenge by wrapping OpenClaw's gateway with a web-based setup wizard. You get a one-click deployment with browser-based configurationβno CLI commands needed. This template lets you deploy OpenClaw in 1 click.
Common Use Cases
- Personal AI Assistant: Chat with Claude/GPT via web interface or messaging apps for research, coding help, writing, and daily tasks
- Automated Workflows: Schedule recurring tasks, monitor websites, send notifications, and automate repetitive processes using cron jobs
Dependencies for OpenClaw (Prev Clawdbot, Moltbot) β Self-Hosted AI Agents Hosting
- AI Provider API Key: Anthropic Claude, OpenAI GPT, Google Gemini, or other supported providers
Deployment Dependencies
- OpenClaw GitHub Repository - Source code for the AI agent framework
- Anthropic API Keys - Claude AI models (recommended)
- OpenAI API Keys - GPT models (alternative)
- Google AI Studio - Gemini models (alternative)
- Telegram BotFather - Create Telegram bots for messaging
- Discord Developer Portal - Create Discord bots
π How to Get API Keys for Different AI Providers
How to Get an Anthropic API Key? (Claude - Recommended)
- Visit Anthropic Console
- Sign up/log in β Navigate to "API Keys" in the left sidebar β Click "Create Key"
- Name your key (e.g., "OpenClaw Railway") β Copy the key β Paste into the setup wizard
How to Get an OpenAI API Key? (GPT)
- Go to OpenAI Platform
- Create an account or sign in β Click on your profile β "View API Keys"
- Click "Create new secret key" β Name it (optional) and click "Create"
- Copy the key β Paste into the setup wizard
How to Get a Google Gemini API Key?
- Visit Google AI Studio
- Sign in with your Google account
- Click "Get API Key" in the left menu
- Select existing project or create new
- Click "Create API Key"
- Copy the generated key
- Paste into the setup wizard
π¬ How to Add Messaging Channels to OpenClaw
How to Add a Telegram Bot?
Step 1: Create Your Bot
- Open Telegram and search for
@BotFather - Send the command:
/newbot - Choose a display name: "My OpenClaw Assistant"
- Choose a username:
my_openclaw_bot(must end with 'bot') - BotFather will give you a token (format:
123456789:ABCdef...) - Copy this token
Step 2: Add to OpenClaw
- Go to your setup wizard:
/setup - Scroll to "Optional: Channels" section
- Paste token in "Telegram bot token" field
- Click "Run Setup"
- Wait for completion
Step 3: Start Chatting
- Search for your bot username in Telegram
- Click "Start" or send
/start - Begin chatting with your AI agent!
How to Add a Discord Bot?
Step 1: Create Discord Application
- Go to Discord Developer Portal
- Click "New Application"
- Name it (e.g., "OpenClaw Bot")
- Go to "Bot" tab in left sidebar
- Click "Add Bot" β Confirm
Step 2: Configure Bot
- Under "Privileged Gateway Intents":
- β Enable "MESSAGE CONTENT INTENT" (Required!)
- Click "Reset Token" β Copy the token
- Save the token securely
Step 3: Invite Bot to Your Server
- Go to "OAuth2" β "URL Generator"
- Select scopes:
- β
bot - β
applications.commands
- β
- Select permissions:
- β Read Messages/View Channels
- β Send Messages
- β Read Message History
- β Embed Links
- Copy the generated URL
- Open URL in browser β Select server β Authorize
Step 4: Add to OpenClaw
- Go to your setup wizard:
/setup - Paste token in "Discord bot token" field
- Click "Run Setup"
- Mention
@YourBotNamein Discord to chat!
β Frequently Asked Questions (FAQ)
What is the difference between OpenClaw, Clawdbot, and Moltbot?
OpenClaw is the current official name of the project. It was previously known as "Clawdbot" and "Moltbot" - these are older names for the same framework.
Can I use multiple AI providers at once in OpenClaw?
Currently, OpenClaw is configured to use one primary AI provider at a time. However, you can switch providers by editing the configuration via the setup wizard's config editor or by re-running the setup wizard.
How much does it cost to run OpenClaw on Railway?
Railway costs: $5-10/month on the Hobby plan ($5/month subscription + ~$5 usage). Free tier available with limitations.
AI API costs: Varies by usage and provider:
- Anthropic Claude: ~$5-30/month for moderate personal use
- OpenAI GPT: ~$5-40/month depending on model and usage
- Google Gemini: Often free for personal use
Is my data private and secure on OpenClaw?
Yes! OpenClaw is self-hosted, meaning:
- All data stays on your Railway instance
- API keys are encrypted and stored in your volume
- Communication between browser and gateway is encrypted (HTTPS)
Can I migrate my OpenClaw instance off Railway?
Absolutely! That's the beauty of self-hosting:
- Export a backup via
/setup - Download the
.tar.gzfile - Deploy OpenClaw on another platform (VPS, Docker, home server)
- Import the backup on your new instance
Why is my OpenClaw UI gateway showing "Disconnected" after setup?
This usually means:
- You haven't pasted the
OPENCLAW_GATEWAY_TOKENin the UI - Solution: Go to Overview β Gateway Access β Paste token β Click Connect
Or:
- The gateway process crashed due to invalid API key
- Solution: Check Railway logs, verify API key, re-run setup if needed
Can I use OpenClaw without any messaging channels?
Yes! The web UI at / provides a full-featured chat interface. Telegram, Discord, and Slack are optional additions for convenience. You can use OpenClaw entirely through the web interface if you prefer.
How do I access OpenClaw from my phone?
- Web Interface: Just visit your Railway URL in your mobile browser
- Telegram: Add the Telegram bot and chat from the Telegram app
- Discord: Use Discord mobile app with your bot
- Slack: Use Slack mobile app with your bot
Can I run multiple OpenClaw instances?
Yes! Each Railway service can run its own independent OpenClaw instance:
- Deploy the template multiple times
- Each gets its own domain, volume, and configuration
- You can have separate instances for different purposes (personal, work, testing)
- Each instance needs its own API keys (or can share, depending on your API limits)
Why Deploy OpenClaw (Prev Clawdbot, Moltbot) β Self-Hosted AI Agents 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 (Prev Clawdbot, Moltbot) β Self-Hosted AI Agents 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
OpenClaw (Prev Moltbot, Clawdbot)
praveen-ks-2001/openclaw-railway-template-new