Deploy OpenClaw Private Gateway
Private OpenClaw Gateway on Railway, reachable only through your Tailscale.
openclaw-railway-template
Just deployed
/data
Deploy and Host OpenClaw (Private, Tailscale) on Railway
OpenClaw is an open-source personal AI assistant Gateway. This template deploys it as a single private Railway service that you reach only through your Tailscale network. There is no public domain.
About Hosting OpenClaw (Private, Tailscale)
This template runs the official OpenClaw image (pinned by digest) as the main process. A short entrypoint prepares the volume, logs Tailscale in on first boot, and drops root before OpenClaw starts. A small sidecar runs tailscaled and relays Railway's health checks.
The Gateway listens only on loopback. OpenClaw manages Tailscale Serve itself and publishes it at https://..ts.net. Browsers and apps on your tailnet sign in with their Tailscale identity.
Setup asks for two things: a name for your Gateway and a Tailscale auth key. The Gateway token is generated automatically. All state (OpenClaw data, Tailscale identity, home directory, Homebrew) is stored on a persistent volume at /data. Tools for skills (gh, gog, Claude Code, Codex, jq, tmux, ImageMagick) are included.
Why Deploy OpenClaw (Private, Tailscale) on Railway
- Private by default: no public Railway domain, and nothing else in the project can reach the Gateway.
- Always on: your assistant keeps running when your laptop is off.
- Persistent: a Railway volume keeps your configuration, credentials, and Tailscale identity across redeploys.
- Simple: one service, one volume, two inputs.
- Easy to upgrade: the OpenClaw version is pinned, and upgrading means changing one
FROMline.
Common Use Cases
- A personal AI assistant you can reach from the Mac app, a browser, or your phone, anywhere on your tailnet
- A 24/7 private agent that runs skills with
gh, Claude Code, Codex, and other bundled CLI tools - Webhook-triggered automations and Gmail push, using the opt-in webhook mode with a Railway domain
- A private alternative to exposing an AI gateway on the public internet
Dependencies for OpenClaw (Private, Tailscale) Hosting
- A Tailscale account on a tailnet, with HTTPS and MagicDNS enabled
- A Tailscale auth key, which you paste in when deploying
- An API key from a model provider, which you add during OpenClaw onboarding after deploy
- A Railway volume mounted at
/data
Deployment Dependencies
Template Content
openclaw-railway-template
Zain-ul-din/openclaw-railway-templateTS_AUTHKEY
Tailscale auth key (tskey-auth-...) used to join this Gateway to your tailnet on first boot. Create one at login.tailscale.com/admin/settings/keys.
OPENCLAW_MACHINE_DISPLAY_NAME
Name for your Gateway. It becomes the tailnet address, e.g. "My Gateway" gives https://my-gateway..ts.net.
