Deploy openclaw-railway-lefant
run openclaw on railway with openai codex (chatgpt plus) based model
openclaw-railway-template
Just deployed
Deploy and Host OpenClaw on Railway
Source: https://github.com/lefant/openclaw-railway-template
Just like clawdbot-railway-template but with support for OpenAI Codex (ChatGPT Plus) authenticated GPT-5 models via device code OAuth flow.
About Hosting
OpenClaw is an AI coding assistant platform that runs as a self-hosted gateway. This template wraps OpenClaw with a web-based setup wizard, automatic reverse proxy, and persistent storage on Railway. Authentication with OpenAI is handled through a browser-based device code flow — no API keys needed if you have a ChatGPT Plus subscription.
Why Deploy
- No API key required — sign in with your ChatGPT account using device code auth (like Codex CLI)
- One-click Railway deployment — setup wizard guides you through configuration in the browser
- Persistent state — config, credentials, and workspace survive redeploys via Railway Volume
- Multi-provider support — works with Anthropic, OpenAI, Google, and custom OpenAI-compatible providers
- Built-in management — debug console, config editor, backup export/import, health checks
Common Use Cases
- Running an AI coding assistant accessible from anywhere via web UI
- Hosting a Telegram/Discord/Slack bot powered by GPT-5 or Claude
- Self-hosting an AI gateway with OAuth authentication instead of managing API keys
- Setting up a shared AI assistant for a team with persistent workspace
Dependencies for
Deployment Dependencies
- Railway Volume mounted at
/datafor persistent config and workspace storage - Public networking enabled (assigns a
*.up.railway.appdomain) - SETUP_PASSWORD environment variable (protects the setup wizard)
- Optional: OPENCLAW_GATEWAY_TOKEN for stable gateway auth across redeploys
- Optional: OPENCLAW_VERSION to pin a specific OpenClaw release tag
Template Content
openclaw-railway-template
lefant/openclaw-railway-templateSETUP_PASSWORD
Password to access /setup wizard
