Railway

Deploy AlphaClaw — OpenClaw Manager with Google Workspace

Run OpenClaw 24/7 with watchdog, GitHub backup & Google OAuth. One env var.

Deploy AlphaClaw — OpenClaw Manager with Google Workspace

Just deployed

/data

Deploy and Host AlphaClaw on Railway

AlphaClaw is the open-source management harness and watchdog for OpenClaw — the layer that keeps your AI assistant alive 24/7, version-controls your entire agent configuration to GitHub, and connects OpenClaw to Google Workspace (Gmail, Calendar, Drive, Contacts, Sheets) via built-in OAuth. Where a plain OpenClaw deployment gives you an AI agent, AlphaClaw gives you a production-grade AI assistant that monitors itself, backs up automatically, and never goes dark.

One environment variable at deploy time. Everything else is configured in the browser.


What This Template Deploys

ServicePurpose
AlphaClaw GatewayThe OpenClaw management harness and watchdog — control panel at /setup for model selection, channel configuration, Google OAuth, and GitHub backup. Serves setup UI and gateway routing on a single port
Persistent Volume (/data)Stores agent workspace, configuration, credentials, cron jobs, and memory — survives every redeploy and version update

Only SETUP_PASSWORD is required at deploy time. OPENCLAW_GATEWAY_TOKEN, WEBHOOK_TOKEN, and PORT are auto-generated by the template — no manual token management.


About Hosting AlphaClaw

Running OpenClaw reliably in production means more than just keeping a container alive — it means handling crashes and restarts without losing context, keeping agent config and memory backed up, managing API credentials securely without committing secrets to git, and connecting Google Workspace tools through a proper OAuth flow rather than manual token configuration.

AlphaClaw handles all of this as a management layer on top of OpenClaw. The watchdog monitors the OpenClaw process and restarts it automatically on failure. All configuration, cron jobs, and agent memory are continuously version-controlled to a private GitHub repository — your agent's entire state is recoverable from git at any point. Secrets are stored as Railway environment variables and replaced with ${ENV_VAR} references in git, so credentials are never committed.

Typical cost: ~$2–5/month on Railway's Hobby plan — one service plus a persistent volume. No database required. No Redis. The simplest production OpenClaw stack available.


Deploy in Under 5 Minutes

  1. Click Deploy on Railway and wait for the build to complete (~2–3 minutes)
  2. Set SETUP_PASSWORD — the only variable required at deploy time
  3. Open [your-domain]/setup — the setup wizard walks through model selection, GitHub backup repo, Telegram or Discord bot pairing, and optional Google Workspace OAuth
  4. Complete setup in the browser and start messaging your assistant from Telegram or Discord

No SSH. No token generation. No manual configuration files.


Common Use Cases

  • 24/7 personal AI assistant on Telegram or Discord — AlphaClaw keeps OpenClaw running permanently on Railway; message your assistant from anywhere without managing uptime yourself
  • Self-hosted OpenClaw with Google Workspace — connect Gmail, Google Calendar, Google Drive, Contacts, and Sheets to your AI assistant via built-in OAuth; no manual token setup required
  • OpenClaw with automatic GitHub backup — unlike a plain OpenClaw deploy where a redeploy can mean starting from scratch, AlphaClaw version-controls config, memory, and cron jobs to your GitHub repo continuously
  • Production OpenClaw without DevOps overhead — AlphaClaw's watchdog restarts OpenClaw automatically on crash; no process monitoring tools, no manual intervention, no downtime
  • AI assistant with persistent workspace across redeploys — the /data volume retains your entire agent state; redeploy, update, or migrate without losing any configuration or conversation history
  • Secure OpenClaw deployment with no committed secrets — API keys and tokens are stored as Railway environment variables and referenced by name in git; credentials are never exposed in your backup repository

Configuration

VariableRequiredDescription
SETUP_PASSWORD✅ RequiredProtects the /setup wizard — the only variable needed at deploy time
OPENCLAW_GATEWAY_TOKEN✅ Auto-generatedSecure token for UI-to-gateway connection — generated automatically
WEBHOOK_TOKEN✅ Auto-generatedWebhook authentication token — generated automatically
PORT✅ Auto-generatedSingle-port serving for setup UI and gateway routing — auto-configured

All other configuration — AI provider API keys, GitHub backup credentials, Telegram or Discord bot tokens, Google OAuth credentials — is handled through the /setup browser wizard after deploy. Nothing else needs to be set manually in Railway Variables.


AlphaClaw vs. Plain OpenClaw on Railway

AlphaClawPlain OpenClawOpenClaw + Custom Setup
Watchdog / auto-restart✅ Built-in❌ No❌ Manual
GitHub backup (config + memory)✅ Automatic❌ No❌ Manual
Google Workspace OAuth✅ Built-in wizard❌ No❌ Manual setup
Browser setup UI/setup wizard❌ No❌ No
Secrets committed to git✅ Never — env refs⚠️ Risk⚠️ Risk
Env vars at deploy time✅ One (SETUP_PASSWORD)❌ Many❌ Many
Services required✅ One container + volume⚠️ Varies⚠️ Varies

Dependencies for AlphaClaw Hosting

  • Railway account — Hobby plan (~$2–5/month) for a single service and persistent volume
  • A GitHub account and private repository for automatic agent state backup
  • A Telegram or Discord account to create a bot and interact with your assistant
  • At least one AI provider credential: Anthropic, OpenAI, Google Gemini, or Codex OAuth
  • Optional: Google Cloud project for Google Workspace OAuth (Gmail, Calendar, Drive)

Deployment Dependencies

Implementation Details

AlphaClaw deploys as a single container with a persistent volume at /data storing the complete agent state: configuration, credentials (as env var references, never plain text), cron jobs, workspace files, and memory — all simultaneously backed up to your private GitHub repo.

The single-port architecture serves the setup UI and gateway routing through the same Railway domain. No database, no Redis, no inter-service networking. The watchdog runs inside the container and restarts OpenClaw on crash without Railway restarting the full service.


Frequently Asked Questions

What is the difference between AlphaClaw and OpenClaw? OpenClaw is the AI agent. AlphaClaw is the management layer that runs on top of it — watchdog monitoring, automatic GitHub backup of all configuration and memory, a browser-based setup wizard, and built-in Google Workspace OAuth. A plain OpenClaw deployment gives you an agent. AlphaClaw gives you a production-grade assistant that manages itself.

How much does AlphaClaw cost to run on Railway? Approximately $2–5/month on Railway's Hobby plan — one container plus a persistent volume with no additional database or cache services required. LLM API costs are separate and depend on your usage and chosen provider. It's the lowest-cost production OpenClaw stack available.

Do I lose my agent memory and config on redeploy? No. Agent configuration, memory, and workspace files are stored on the Railway persistent volume at /data and simultaneously backed up to your GitHub repository. Redeploys, version updates, and container restarts do not affect your agent state.

What AI providers does AlphaClaw support? Anthropic Claude, OpenAI (including Codex OAuth), and Google Gemini are supported natively. Configure your chosen provider through the /setup wizard after deploy — no manual environment variable editing required.

Does Google Workspace integration require a business account? No. Google Workspace OAuth works with a standard personal Google account. You need a Google Cloud project to create OAuth credentials, which is free. The setup wizard at /setup walks through the OAuth configuration step by step.

What happens if OpenClaw crashes? AlphaClaw's built-in watchdog detects the crash and restarts OpenClaw automatically — typically within seconds. You don't need Railway to restart the service, set up external monitoring, or take any manual action. Your assistant comes back online with the same configuration and memory intact.


Why Deploy AlphaClaw 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 AlphaClaw on Railway, you get a 24/7 OpenClaw assistant with automatic crash recovery, continuous GitHub backup, Google Workspace integration, and browser-based setup — all for ~$2–5/month with one environment variable at deploy time and zero server administration.


Template Content

More templates in this category

View Template
N8N Main + Worker
Deploy and Host N8N with Inactive worker.

jakemerson
View Template
Postgres Backup
Cron-based PostgreSQL backup to bucket storage

Railway Templates
View Template
Prefect [Updated May ’26]
Prefect [May ’26] (ETL & Automation alternative to Airflow) Self Host

shinyduo