Skip to content
Back to skills

railway-gateway

ASecurity

Deploy, fix, and monitor the OpenClaw gateway on Railway. Use when working with the openclaw-gateway service, deploying OpenClaw to Railway, fixing gateway 502 or "Invalid --bind" errors, changing gateway config, or checking gateway health. Triggers on keywords such as gateway, openclaw-gateway, railway gateway, 502, bind, control-ui, healthz.

  • 17 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added June 4, 2026
ai-agentsrustbashdockerdebugginggitapi

Works with

  • api

Security analysis

A96/100
  • mediumUses curl or wget to download content

Pro scans all 18 files and shows the line behind each finding

Scanned June 4, 2026

npx -y skills add Eskyee/agentbot-opensource --skill skills --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of railway-gateway?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for railway-gateway
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/eskyee-railway-gateway/badge)](https://www.skillsdirectory.com/skills/eskyee-railway-gateway)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: railway-gateway
description: |
  Deploy, fix, and monitor the OpenClaw gateway on Railway. Use when working with the openclaw-gateway service, deploying OpenClaw to Railway, fixing gateway 502 or "Invalid --bind" errors, changing gateway config, or checking gateway health. Triggers on keywords such as gateway, openclaw-gateway, railway gateway, 502, bind, control-ui, healthz.
---

# Railway Gateway Skill

Manage the OpenClaw Control UI gateway on Railway.

## Service Info

- **URL:** https://openclaw-gateway-production-ad37.up.railway.app
- **Project:** OpenClaw-Agentbot (proj_cxA5FUU5aqWoH6Wz6zpyTE9)
- **Service:** openclaw-gateway (def185af-8af6-412c-9f8f-ed50e531a331)
- **Region:** us-west1
- **Image:** ghcr.io/openclaw/openclaw:2026.5.28 (wrapped by gateway/Dockerfile)
- **Gateway Token:** f0dc61a4b42057275eab13e0eb7ede8f17f0709ae06ae9984a5b019850370710

## Architecture

```
Dockerfile → wraps ghcr.io/openclaw/openclaw:2026.5.28
entrypoint.sh → writes config → exec openclaw gateway
railway.json → healthcheck at /healthz
```

Config is written fresh on EVERY container start. No volumes, no env var overrides.

## Rules (NEVER BREAK)

1. **Source must be "GitHub Repo"** (NOT "Docker Image")
2. **Never change env vars on a live gateway** — use entrypoint.sh
3. **Never set OPENCLAW_CONFIG env var** — overrides the config file
4. **Never use `--bind 0.0.0.0`** — legacy, rejected by newer versions
5. **Read `docs/gateway-recovery-checkpoint.md` FIRST** before debugging
6. **Only required env var:** `OPENROUTER_API_KEY`

## Valid Bind Modes

| Mode | Use |
|------|-----|
| `lan` | All interfaces — use for Railway/cloud |
| `loopback` | Localhost — default, local dev only |
| `tailnet` | Tailscale network |
| `auto` | Auto-detect |
| `custom` | Manual |

⚠️ `0.0.0.0` is LEGACY. `lan` is the correct value.

## Health Check

```bash
curl -s https://openclaw-gateway-production-ad37.up.railway.app/health
```

Expected: `{"ok":true,"status":"live"}`
Not: `{"status":"error","code":502,...}`

## Recovery (502 or Invalid --bind)

**FIRST: Run the SOS script:**
```bash
./scripts/gateway-sos.sh
```

If SOS fails, then:

1. Railway dashboard → openclaw-gateway → Settings → Source
2. Verify it says **"GitHub Repo"** (not "Docker Image")
3. Dockerfile Path: `gateway/Dockerfile`
4. Healthcheck Path: `/healthz`
5. Variables: ONLY `OPENROUTER_API_KEY` — delete all OPENCLAW_* and OC_BOOT vars
6. Deploy
7. Wait 60s, check `/healthz`

## Config Written by entrypoint.sh

```json
{
  "gateway": {
    "mode": "local",
    "bind": "lan",
    "auth": { "mode": "token", "token": "<OPENROUTER_API_KEY>" },
    "trustedProxies": ["127.0.0.1", "10.0.0.0/8", "100.64.0.0/10", "172.16.0.0/12", "192.168.0.0/16"],
    "controlUi": {
      "allowedOrigins": ["*"],
      "dangerouslyDisableDeviceAuth": true,
      "dangerouslyAllowHostHeaderOriginFallback": true
    }
  },
  "agents": {
    "defaults": {
      "model": { "primary": "openrouter/xiaomi/mimo-v2-pro" }
    }
  }
}
```

## Files

| File | Purpose |
|------|---------|
| `gateway/Dockerfile` | Wraps official image with custom entrypoint |
| `gateway/entrypoint.sh` | Writes config, starts gateway |
| `gateway/railway.json` | Healthcheck config |
| `docs/openclaw-railway-deployment.md` | Full deployment guide |
| `docs/gateway-recovery-checkpoint.md` | Recovery checklist |

Files in this skill

  • add-discord.md1.4 KB
  • add-telegram.md1.4 KB
  • add-whatsapp.md1.6 KB
  • agent-bridge-skill.md2.1 KB
  • agentbot-docs.md667 B
  • agentkit-x402.md2.7 KB
  • bankr.md679 B
  • basefm-dj-streaming.js3 KB
  • basefm-dj-streaming.md2.2 KB
  • debug-agentbot.md2 KB
  • get-api-docs/SKILL.md2.9 KB
  • mintlify-docs.md787 B
  • monetize-service.md1.8 KB
  • provisioning-v1/SKILL.md1015 B
  • railway-costs-skill.md1.5 KB
  • railway-gateway-skill.md3.3 KB
  • setup-agentbot.md2.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.