---
title: "Deploy OpenClaw"
description: "[Jun '26] Self Host OpenClaw on Railway. All in one Bundle."
category: "Automation"
url: https://railway.com/deploy/openclaw-moltbotclawdbot-autonomous-ai-a
---

# Deploy OpenClaw

[Jun '26] Self Host OpenClaw on Railway. All in one Bundle.

**[Deploy OpenClaw on Railway](https://railway.com/template/openclaw-moltbotclawdbot-autonomous-ai-a)**

- **Creator:** Heimdall
- **Category:** Automation
- **Total deploys:** 369

## Template content

### OpenClaw (Prev Moltbot, Clawdbot) https://openclaw.ai/favicon.svg

- **Source:** https://github.com/praveen-ks-2001/openclaw-railway-template-enhanced
- **Public domain:** Yes

## Documentation

![OpenCrawl Logo](https://res.cloudinary.com/asset-cloudinary/image/upload/v1769907898/openclaw-logo-text_w3qcgl.avif)
# Deploy and Host OpenClaw (Moltbot/Clawdbot) – Autonomous AI Agent Platform on Railway

**OpenClaw** (formerly Clawdbot/Moltbot) is a powerful, open-source AI agent framework that lets you run **Claude, ChatGPT, or Gemini** as your own self-hosted private personal assistant. 

Chat securely through the built-in web dashboard, or integrate with Telegram, Discord, and Slack. OpenClaw can execute code, browse the web autonomously, schedule cron tasks, and maintain infinite long-term conversation context. Deploy your own privacy-first AI alternative to ChatGPT on Railway in just one click!


## 🚀 Quick Start Deployment Guide

### Step 1: Deploy on Railway

1. Click the **"Deploy on Railway"** button at the top of this page &amp; 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

1. Click on the URL provided by Railway in your project dashboard (e.g., `https://your-app-xyz.up.railway.app`)
2. 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:

![OpenClaw setup using UI](https://res.cloudinary.com/asset-cloudinary/image/upload/v1772221059/setup_done_l8tzjn.png)

1. Select your **provider & auth type**, then paste your API key
2. Add **channels** (optional — can be done later)
3. Click **Run Setup**
4. If you added a channel token, click **Authorize Channel** 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.)*
5. Click **Launch Dashboard**
6. First login? Click **Approve Pairing** → **Approve Latest Request**
   *(New browsers need a one-time device approval. After clicking "Launch Dashboard", come back here, click "Approve Pairing", and approve the pending request.)*
7. You should now see **Health: OK** in the OpenClaw UI.

![Health Ok](https://res.cloudinary.com/asset-cloudinary/image/upload/v1772139788/health_ok_swgk94.png)

### Step 5: Start Chatting

1. Click **"Chat"** in the sidebar of the newly opened OpenClaw UI
2. Type your first message
3. 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](https://github.com/openclaw/openclaw) - Source code for the AI agent framework
- [Anthropic API Keys](https://platform.claude.com/) - Claude AI models (recommended)
- [OpenAI API Keys](https://platform.openai.com/) - GPT models (alternative)
- [Google AI Studio](https://aistudio.google.com/) - Gemini models (alternative)
- [Telegram BotFather](https://t.me/botfather) - Create Telegram bots for messaging
- [Discord Developer Portal](https://discord.com/developers/applications) - Create Discord bots

---

### 🔑 How to Get API Keys for Different AI Providers

#### How to Get an Anthropic API Key? (Claude - Recommended)

1. Visit [Anthropic Console](https://platform.claude.com/dashboard)
2. Sign up/log in → Navigate to **"API Keys"** in the left sidebar → Click **"Create Key"**
3. Name your key (e.g., "OpenClaw Railway") → Copy the key → Paste into the setup wizard

#### How to Get an OpenAI API Key? (GPT)

1. Go to [OpenAI Platform](https://platform.openai.com/)
2. Create an account or sign in → Click on your profile → **"View API Keys"**
3. Click **"Create new secret key"** → Name it (optional) and click **"Create"**
4. Copy the key → Paste into the setup wizard

#### How to Get a Google Gemini API Key?

1. Visit [Google AI Studio](https://aistudio.google.com/)
2. Sign in with your Google account
3. Click **"Get API Key"** in the left menu
4. Select existing project or create new
5. Click **"Create API Key"**
6. Copy the generated key
7. Paste into the setup wizard

---

### 💬 How to Add Messaging Channels to OpenClaw

#### How to Add a Telegram Bot?

**Step 1: Create Your Bot**
1. Open Telegram and search for `@BotFather`
2. Send the command: `/newbot`
3. Choose a display name: "My OpenClaw Assistant"
4. Choose a username: `my_openclaw_bot` (must end with 'bot')
5. BotFather will give you a token (format: `123456789:ABCdef...`)
6. Copy this token

**Step 2: Add to OpenClaw**
1. Go to your setup wizard: `/setup`
2. Scroll to **"Optional: Channels"** section
3. Paste token in **"Telegram bot token"** field
4. Click **"Run Setup"**
5. Wait for completion

**Step 3: Start Chatting**
1. Search for your bot username in Telegram
2. Click **"Start"** or send `/start`
3. Begin chatting with your AI agent!

#### How to Add a Discord Bot?

**Step 1: Create Discord Application**
1. Go to [Discord Developer Portal](https://discord.com/developers/applications)
2. Click **"New Application"**
3. Name it (e.g., "OpenClaw Bot")
4. Go to **"Bot"** tab in left sidebar
5. Click **"Add Bot"** → Confirm

**Step 2: Configure Bot**
1. Under **"Privileged Gateway Intents"**:
   - ✅ Enable **"MESSAGE CONTENT INTENT"** (Required!)
2. Click **"Reset Token"** → Copy the token
3. Save the token securely

**Step 3: Invite Bot to Your Server**
1. Go to **"OAuth2"** → **"URL Generator"**
2. Select scopes:
   - ✅ `bot`
   - ✅ `applications.commands`
3. Select permissions:
   - ✅ Read Messages/View Channels
   - ✅ Send Messages
   - ✅ Read Message History
   - ✅ Embed Links
4. Copy the generated URL
5. Open URL in browser → Select server → Authorize

**Step 4: Add to OpenClaw**
1. Go to your setup wizard: `/setup`
2. Paste token in **"Discord bot token"** field
3. Click **"Run Setup"**
4. Mention `@YourBotName` in 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. 


#### 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:

1. Export a backup via `/setup`
2. Download the `.tar.gz` file
3. Deploy OpenClaw on another platform (VPS, Docker, home server)
4. Import the backup on your new instance


#### 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


#### How to fix: disconnected (1008): pairing required

If you see this error in your dashboard logs or get instantly disconnected when opening the UI, it's a security feature! New browsers/devices need to be manually approved.
**Solution**: Go back to your `/setup` wizard page, click the **Approve Pairing** button on the right side, and approve the pending connection request.

#### 🖥️ How do I access the Terminal UI (TUI)?

If you prefer a hacker-style terminal interface over the web dashboard, you can access the OpenClaw TUI! Ensure you have set the `ENABLE_WEB_TUI` to True in Railway Variables. You can access the TUI at /tui.


---

## 🤝 Found an Issue? Need Help?

If you notice a bug with this Railway template  
👉 **[Raise an issue on GitHub here!](https://github.com/praveen-ks-2001/openclaw-railway-template-enhanced/issues)**



## Why Deploy OpenClaw (Moltbot/Clawdbot) – Autonomous AI Agent Platform 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 (Moltbot/Clawdbot) – Autonomous AI Agent Platform 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.


## Similar templates

- [N8N Main + Worker](https://railway.com/deploy/n8n-main-worker) — Deploy and Host N8N with Inactive worker.
- [Evolution API with n8n](https://railway.com/deploy/evolution-api-with-n8n) — Automate WhatsApp workflows with Evolution API, n8n, and Postgres.
- [Postgres Backup](https://railway.com/deploy/postgres-s3-backups) — Cron-based PostgreSQL backup to bucket storage

Open this page in a browser: https://railway.com/deploy/openclaw-moltbotclawdbot-autonomous-ai-a
