
Deploy OpenClaw
Official OpenClaw gateway with built-in browser, pinned.
Just deployed
/data
Deploy and Host self hosted OpenClaw (Open-Source AI Assistant) on Railway
Deploy the official openclaw/openclaw:2026.10.3-browser container unmodified. Railway handles the public domain, logs, health checks, and persistent volume. One service, port 18789, /data volume. Chromium and Xvfb are baked in. You get the upstream Gateway, Control UI, browser, and device approval flow, not a repackaged npm service.
About Hosting OpenClaw open-source software on Railway (self hosted OpenClaw template)
OpenClaw is MIT-licensed. A local Gateway coordinates sessions, tools, model providers, and channels. On Railway, it listens on 18789 behind the proxy. State lives on /data. The image includes Chromium + Xvfb. Startup sets OPENCLAW_RAILWAY_CONFIG from RAILWAY_PUBLIC_DOMAIN. Pinned by digest and multi-arch, upstream migrations run normally. You approve your own browser once from the service shell the first time you open the Control UI. This replaces the old custom /setup wrapper.
Why Deploy OpenClaw, the ChatGPT alternative on Railway (Railway Free Trial)
ChatGPT lives in one app on someone else's servers. OpenClaw lives in the chat apps you already use, works with any model, and keeps state and credentials on your own volume. Older Railway OpenClaw templates wrap the npm package openclaw@2026.9.x behind a custom /setup page; this one runs the official 2026.10.3 container, so upstream docs and doctor migrations apply as written. Railway's $5 trial covers a first test.
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.
Railway vs Other Hosting Providers and VPS for OpenClaw self hosting
Railway removes reverse proxy setup, TLS, health checks, and volume management you would handle on a raw VPS.
| Provider | Setup style | OpenClaw fit | Typical monthly cost |
|---|---|---|---|
| DigitalOcean | Droplet or App Platform, manual reverse proxy | Good if you want root and custom cron jobs, but you manage OS updates and TLS | $6-12 for 1-2 GB RAM |
| AWS | EC2 or ECS, more IAM and VPC setup | Works for large scale or existing AWS accounts, but more moving parts | $10-25 for t3.small plus load balancer |
| Hetzner | Cloud VPS or dedicated, simple networking | Cheap RAM for the browser image; you run the proxy, TLS, and updates | EUR 4-10 for 2-4 GB RAM |
The template sets trustedProxies to 100.64.0.0/10, Railway's internal proxy range.
Common Use Cases for hosted OpenClaw
OpenClaw works as a personal assistant across many chat surfaces. Connect Telegram, WhatsApp, Slack, Discord, Google Chat, Signal, iMessage, Teams, and 20+ others to one Gateway. Session memory and tool output stay in one place. The built-in browser is key: Chromium and Xvfb are included, so it can open pages, take screenshots, read rendered content, and automate steps. Useful for research, forms, price checks. It also fits team or family use with per-channel pairing. Unknown DM senders are not trusted; approve with openclaw pairing approve <code>. Model providers are plugins, so you can test Claude, Codex, local models, or MCP tools without redeploying.
Dependencies for OpenClaw Docker hosted on Railway
Only the official image and Railway. The image bundles Node.js, Chromium, Xvfb, and OpenClaw 2026.10.3. No build steps. Railway provides domain, health check, volume. A model provider key is needed for chat, but the Gateway starts without one.
Deployment Dependencies for Managed OpenClaw Service (AI Assistant)
One container on port 18789, health check /healthz, volume at /data. Template generates a 48-char OPENCLAW_GATEWAY_TOKEN and sets fixed vars: PORT=18789, OPENCLAW_GATEWAY_PORT=18789, OPENCLAW_GATEWAY_BIND=lan, OPENCLAW_STATE_DIR, OPENCLAW_CONFIG_DIR, OPENCLAW_CONFIG_PATH, OPENCLAW_WORKSPACE_DIR, HOME, OPENCLAW_HOME, TZ, RAILWAY_RUN_UID. Optional empty: OPENAI_API_KEY, ANTHROPIC_API_KEY, TELEGRAM_BOT_TOKEN.
Implementation Details for OpenClaw (Using OpenClaw official docker image)
Start command chowns /data, applies OPENCLAW_RAILWAY_CONFIG as JSON (gateway.mode local, publicOrigin and controlUi.allowedOrigins from RAILWAY_PUBLIC_DOMAIN, trustedProxies 100.64.0.0/10), then runs openclaw gateway --bind lan --port 18789 --allow-unconfigured as node user. Doctor migrations run. Post-deploy: open domain, paste token into Control UI, run openclaw devices approve in shell, add a model key in Settings -> Models or env. Tools run inside container unless sandboxed.
How does OpenClaw compare against other AI assistant platforms
OpenClaw is a self-hosted assistant Gateway, not a chat frontend. It owns sessions, tools, events, and channel connections.
OpenClaw vs Hermes Agent
- Origin: OpenClaw Node.js Gateway; Hermes Agent Python (Nous Research, MIT).
- Providers and channels: Both plugin-based, but OpenClaw has more channel integrations and Control UI.
- Migration: Hermes can migrate from OpenClaw.
- Deployment: OpenClaw runs one Railway service; Hermes runs as Python process.
OpenClaw vs Open WebUI
- Purpose: Open WebUI is a model chat UI; OpenClaw is an agent Gateway with sessions and tools.
- Channels: Open WebUI lacks OpenClaw's cross-channel pairing (Telegram, WhatsApp, Slack).
- Browser: OpenClaw includes Chromium + Xvfb; Open WebUI needs external browser tools.
- State: OpenClaw uses /data/.openclaw; Open WebUI uses its own database.
OpenClaw vs n8n AI agents
- License: OpenClaw MIT; n8n fair-code, restricts some commercial redistribution.
- Focus: n8n is workflow automation with AI nodes; OpenClaw is persistent assistant with device approval and channels.
- Tools: Both support MCP; n8n excels at visual workflows, OpenClaw at long sessions.
- Deployment: n8n may need workers; OpenClaw single Gateway container.
OpenClaw vs ChatGPT
- Control: ChatGPT closed SaaS; OpenClaw MIT on your service.
- Models: ChatGPT uses OpenAI; OpenClaw supports Claude, Codex, local models, etc.
- Channels: ChatGPT limited integrations; OpenClaw 20+ channels.
- Cost: ChatGPT subscription; OpenClaw no paid plan, pay API + infra.
How to use OpenClaw (the OSS AI assistant)?
Open domain, paste token into Control UI. Run openclaw devices approve once in shell. Add model key via Settings -> Models or env. Chat in Control UI, connect a channel, or use CLI/TUI. For DMs, approve senders with openclaw pairing approve <code>. Tools run in container; workspace persists in /data.
How to self host OpenClaw on other VPS Services (OpenClaw self hosting guide)
On any Linux VPS, install with curl -fsSL https://openclaw.ai/install.sh | bash or npm install -g openclaw@latest (Node 24.16+ or 26.1+). Run openclaw onboard --install-daemon for systemd.
Clone the Repository
Source installs: clone repo and checkout release tag. Simpler: install script or npm global. Docker: openclaw/openclaw or ghcr.io/openclaw/openclaw; -browser variants include Chromium.
Install Dependencies
Run npm install if using source. On raw VPS, install Chromium separately. Railway browser image includes it.
Configure Environment Variables
Set OPENCLAW_GATEWAY_TOKEN (long random), plus OPENCLAW_STATE_DIR, OPENCLAW_CONFIG_DIR, OPENCLAW_WORKSPACE_DIR if non-default. Keep OPENCLAW_GATEWAY_BIND=lan behind reverse proxy. Optional provider keys later.
Start the OpenClaw Application
Run openclaw gateway --bind lan --port 18789 --allow-unconfigured. With onboard --install-daemon, systemd manages it. Approve devices and senders as above.
Official Pricing of OpenClaw (OpenClaw pricing)
MIT-licensed, free. No paid plan. Pay only model API usage + infra. npm and Docker images free.
OpenClaw cloud vs self hosted comparison (Pricing, features, costs, and more)
No first-party OpenClaw cloud. Self hosting is standard. Railway gives public domain, health checks, logs, volume without reverse proxy. Raw VPS gives root, often lower base cost, but you manage TLS, updates, supervision. Features identical because both use same upstream image or package.
Monthly cost of self hosting OpenClaw on Railway
Expect $10-25/month for browser variant (Chromium + Xvfb need 1-2 GB RAM). Model API costs extra. Railway $5 trial covers testing. Volume cost small.
System Requirements for Hosting OpenClaw on a VPS
Node 24.16+ or 26.1+ for package installs, about 1 GB RAM for the gateway alone and 2 GB with the browser, and a few GB of disk. Linux typical. Chromium optional unless browser automation needed.
Frequently Asked Questions (FAQs)
Do I need to bring my own model API key?
Yes. OpenClaw starts without a key, but you need one from a provider plugin to send prompts.
Is OpenClaw really free?
The software is MIT-licensed and free. You pay only for model usage and infrastructure.
Why does the Control UI ask me to approve my device?
Each new browser that opens the Control UI must be paired. Run openclaw devices approve once in the Railway service shell for the pending request.
Can I connect Telegram or WhatsApp?
Yes. Set channel credentials in Settings or environment variables, then restart the Gateway. DM channels may need pairing approval.
What is stored in /data?
OpenClaw state under /data/.openclaw and workspace under /data. This survives redeploys.
Will I lose chat history if I redeploy?
No. Chat history and session state are stored in the volume, not the container. Deleting the volume is what resets OpenClaw.
Template Content
