---
title: "Deploy openclaw-railway-lefant"
description: "run openclaw on railway with openai codex (chatgpt plus) based model"
category: "AI/ML"
url: https://railway.com/deploy/openclaw-railway-lefant
---

# Deploy openclaw-railway-lefant

run openclaw on railway with openai codex (chatgpt plus) based model

**[Deploy openclaw-railway-lefant on Railway](https://railway.com/template/openclaw-railway-lefant)**

- **Creator:** Fabian Linzberger's Projects
- **Category:** AI/ML
- **Total deploys:** 5

## Template content

### openclaw-railway-template

- **Source:** lefant/openclaw-railway-template

## Documentation

  # Deploy and Host OpenClaw on Railway

  Source: https://github.com/lefant/openclaw-railway-template

  Just like [clawdbot-railway-template](https://railway.com/deploy/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 `/data` for persistent config and workspace storage
  - **Public networking** enabled (assigns a `*.up.railway.app` domain)
  - **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

## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [stella](https://railway.com/deploy/stella) — Self-host stella with web, API, Postgres, Redis, and object storage.
- [Hermes Agent | OpenClaw Alternative with Dashboard](https://railway.com/deploy/hermes-agent-or-openclaw-alternative-wit) — Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

Open this page in a browser: https://railway.com/deploy/openclaw-railway-lefant
