Railway

Deploy OpenClaw – Self-Hosted AI Agent

Self-hosted OpenClaw: deploy your private AI agent on Railway in one click.

Deploy OpenClaw – Self-Hosted AI Agent

Just deployed

/data

Deploy and Host OpenClaw on Railway

OpenClaw AI Agent

OpenClaw (formerly Clawdbot and Moltbot) is the open-source AI agent with 328k+ GitHub stars that goes beyond chat — it browses the web, manages files, runs commands, handles email, and works autonomously on your behalf, accessible from WhatsApp, Telegram, Discord, Slack, iMessage, and 20+ other messaging platforms.

Self-host a personal AI agent for ~$1–3/month — compared to $20/month for ChatGPT Plus, $20/month for Claude Pro, or Manus AI which remains cloud-only and waitlisted. Full data ownership. No usage caps. No subscription.


What This Template Deploys

ServicePurpose
OpenClaw GatewayCore agent runtime — LLM routing, channel connections, autonomous task execution, and Control UI at /openclaw
Persistent Volume (5 GB)Railway volume at /data — config, credentials, memory, and workspace files survive every redeploy

No database. No Redis. No inter-service networking to configure. State lives entirely on the persistent volume — the simplest production OpenClaw stack available on Railway.


About Hosting OpenClaw

Running OpenClaw in production means keeping a persistent Node.js gateway alive 24/7, managing secure credentials for your LLM provider and messaging platforms, handling HTTPS termination, and ensuring config and memory survive redeploys. Without a managed host, you're looking at VPS setup, Nginx config, SSL certificates, process managers, and manual Docker maintenance.

Railway handles all of it. This template mounts a 5 GB persistent volume at /data, provisions the gateway with automatic HTTPS, and injects secrets as environment variables. OpenClaw's memory, channel auth, and workspace survive every redeploy without manual intervention. The browser-based /setup wizard configures everything after deploy — no SSH, no terminal, no config files.

Typical cost: ~$1–3/month on Railway's Hobby plan. ChatGPT Plus costs $20/month. Claude Pro costs $20/month. Manus AI is cloud-only with no self-host option. OpenClaw on Railway gives you an autonomous AI agent at a fraction of the cost with full data ownership.


Deploy in Under 5 Minutes

  1. Click Deploy on Railway and let the initial build complete (~3–5 minutes)
  2. Open your Railway URL and complete the /setup wizard — pick your AI provider and paste your API key
  3. Optionally connect a messaging channel — Telegram bot token, Discord bot token, or Slack app
  4. Start chatting from your browser or messaging app

No SSH. No command line. No server administration.

OpenClaw setup wizard and channel configuration

OpenClaw setup


Common Use Cases

  • Self-hosted alternative to ChatGPT Plus and Claude Pro — your conversations stay on your Railway instance, not OpenAI or Anthropic servers; swap providers freely without losing memory or configuration
  • Self-hosted alternative to Manus AI — get the same autonomous agent capability without a waitlist or cloud-only restriction; deploy in minutes on infrastructure you control
  • Personal AI assistant via WhatsApp or Telegram — message your agent to browse the web, summarize documents, draft emails, or run scheduled tasks from any messaging app you already use
  • Autonomous task scheduling — configure the heartbeat daemon to run recurring tasks (daily briefings, price monitoring, data pipelines) on a schedule without manual prompting
  • Multi-platform bot — connect one agent to Telegram, Discord, and Slack simultaneously with shared memory and session context across all channels
  • Private LLM experimentation — test Anthropic, OpenAI, Gemini, and OpenRouter behind a consistent interface without reconfiguring your setup each time you switch providers

Configuration

VariableRequiredDescription
ANTHROPIC_API_KEYRecommendedAPI key for Anthropic Claude — best results for autonomous tasks and long-context reasoning
OPENAI_API_KEYAlternativeAPI key for OpenAI GPT models
GEMINI_API_KEYAlternativeAPI key for Google Gemini
OPENROUTER_API_KEYAlternativeSingle key for multiple providers — useful for fallback routing
SETUP_PASSWORDRecommendedProtects the /setup wizard — set before sharing your Railway URL
OPENCLAW_GATEWAY_TOKENAuto-generatedSecure UI-to-gateway token — generated at deploy time
TELEGRAM_BOT_TOKENOptionalFrom BotFather — enables Telegram channel
DISCORD_BOT_TOKENOptionalFrom Discord Developer Portal — enables Discord channel
SLACK_BOT_TOKENOptionalFrom Slack API — enables Slack channel
OPENCLAW_STATE_DIRPre-setDefaults to /data/.openclaw — do not change unless migrating
OPENCLAW_VERSIONOptionalPin to a specific release e.g. v2026.2.16 — omit for latest

PORT is injected automatically by Railway. Do not set it manually.

You only need one API key to get started. Everything else is optional and configurable through the /setup wizard after deploy.


OpenClaw vs. Alternatives

OpenClaw (self-hosted)ChatGPT PlusClaude ProManus AI
Monthly cost~$1–3 (Railway)$20/month$20/monthCloud-only
Self-hostable✅ Yes❌ No❌ No❌ No
Data ownership✅ Your instance❌ OpenAI servers❌ Anthropic servers❌ Cloud servers
Usage caps✅ None❌ Rate limited❌ Rate limited❌ Yes
LLM provider choice✅ Any provider❌ OpenAI only❌ Anthropic only❌ Fixed
Messaging platforms✅ 20+ (Telegram, WhatsApp, Discord…)❌ Web only❌ Web only❌ Web only
Autonomous task scheduling✅ Heartbeat daemon❌ No❌ No✅ Limited
Open source✅ Yes❌ No❌ No❌ No

Dependencies for OpenClaw Hosting

  • API key from at least one LLM provider — Anthropic Claude recommended
  • Railway account (Hobby plan — ~$5/month base, template itself ~$1–3/month)
  • Optional: bot tokens for Telegram, Discord, or Slack

Deployment Dependencies

Implementation Details

This template deploys OpenClaw's gateway as a persistent container with a 5 GB Railway volume at /data — larger than most competing OpenClaw templates. All agent state lives on the volume: LLM provider config, channel auth tokens, persistent memory, and workspace files. The container is fully stateless — redeploy, version update, or restart without losing anything.

The gateway exposes a Control UI at /openclaw and a setup wizard at /setup, both protected by token-based authentication. No database or Redis instance required — all state is filesystem-based on the persistent volume, keeping the stack simple and the cost low.


Frequently Asked Questions

Is OpenClaw the same as Clawdbot or Moltbot? Yes. OpenClaw was previously known as Clawdbot and before that as Moltbot. The project was rebranded to OpenClaw. It is the same agent — same team, same codebase, continued development. Existing Clawdbot or Moltbot users can migrate their data by moving the /data volume contents.

How much does OpenClaw cost to run on Railway vs ChatGPT or Claude? The Railway container costs ~$1–3/month on the Hobby plan. ChatGPT Plus is $20/month with rate limits. Claude Pro is $20/month with usage caps. Manus AI has no self-hosted option. LLM API costs are separate and depend on usage — Claude Haiku or GPT-4o-mini keep inference costs low for personal use.

What makes this template different from other OpenClaw Railway templates? This template ships with a 5 GB persistent volume — larger than the standard 1–2 GB most competing templates configure. It also requires zero manual environment variable setup beyond your API key: the /setup wizard handles channel configuration, provider selection, and credential management entirely in the browser. No SSH, no config files, no token generation.

Is my data private? Yes. OpenClaw is fully self-hosted. Conversations stay on your Railway instance. API keys are stored as encrypted Railway environment variables. No data is sent to third-party analytics.

Do I lose config and memory when Railway redeploys? No. All state is stored on the persistent volume at /data, not inside the container. Redeploys, version updates, and restarts do not affect your data.

How do I update OpenClaw to a newer version? Set OPENCLAW_VERSION to the target release (e.g. v2026.2.16) in Railway Variables and redeploy. Set to latest to always pull the newest release on each deploy.


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 get a 24/7 personal AI agent with persistent memory, secure credential management, automatic HTTPS, and zero server administration — for ~$1–3/month. Own your data. Control your AI provider. Scale when you need to.


Template Content

More templates in this category

View Template
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
View Template
Hermes Agent | OpenClaw Alternative with Dashboard
Self-improving AI agent with memory, skills, and web dashboard 🤖

codestorm
View Template
EchoDeck
Generate a mp4 from powerpoint with TTS

Fixed Scope