{
  "manifest_version": "1.0.0",
  "template": {
    "id": "b6d75a59-2f25-4a66-b97e-ab74f7d144ba",
    "slug": "openclaw-gateway",
    "name": "OpenClaw",
    "description": "Personal AI agent on your own server: Control UI, Telegram, Discord, more",
    "url": "https://railway.com/deploy/openclaw-gateway",
    "upstream": {
      "image": "ghcr.io/openclaw/openclaw:2026.10.8"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "OpenClaw",
      "source": {
        "image": "ghcr.io/openclaw/openclaw:2026.10.8"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "OpenClaw",
      "description": "Port Railway routes the domain and healthcheck to. Do not change.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "OpenClaw",
      "description": "Runs as root so the gateway can write to the volume, which Railway mounts root-owned. Do not change.",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "OPENCLAW_STATE_DIR",
      "service": "OpenClaw",
      "description": "Config, credentials and sessions, on the volume. Do not change.",
      "secret": false,
      "strategy": "default",
      "default": "/data/.openclaw"
    },
    {
      "key": "OPENCLAW_GATEWAY_PORT",
      "service": "OpenClaw",
      "description": "Gateway port. Do not change.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "OPENCLAW_GATEWAY_TOKEN",
      "service": "OpenClaw",
      "description": "Admin secret for the Control UI and every client that connects to the gateway. Generated for you; paste it on the Control UI login screen.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "OPENCLAW_WORKSPACE_DIR",
      "service": "OpenClaw",
      "description": "The agent's workspace, on the volume. Do not change.",
      "secret": false,
      "strategy": "default",
      "default": "/data/workspace"
    },
    {
      "key": "OPENCLAW_RAILWAY_GATEWAY",
      "service": "OpenClaw",
      "description": "Gateway settings merged into openclaw.json on every boot: local mode, the public URL the Control UI is served from (add your custom domain here), and Railway's proxy range so logins through the Railway edge are accepted. No spaces.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "RAILWAY_HEALTHCHECK_TIMEOUT_SEC",
      "service": "OpenClaw",
      "description": "First boot pulls a large image and runs the doctor; allow 10 minutes before the healthcheck gives up. Do not change.",
      "secret": false,
      "strategy": "default",
      "default": "600"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "openclaw-gateway"
      }
    },
    "cli": "railway deploy --template openclaw-gateway",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "b6d75a59-2f25-4a66-b97e-ab74f7d144ba",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "c6aabd3d-fdba-4f61-b09e-3a24dd6dbb55": {
                  "icon": "https://raw.githubusercontent.com/openclaw/openclaw/v2026.10.8/ui/public/apple-touch-icon.png",
                  "name": "OpenClaw",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"set -f; mkdir -p /data/.openclaw /data/workspace; node /app/openclaw.mjs config set gateway $OPENCLAW_RAILWAY_GATEWAY --strict-json --merge; exec tini -s -- node /app/docker-entrypoint.mjs node openclaw.mjs gateway --bind lan --port 8080\"",
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/openclaw/openclaw:2026.10.8"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Railway routes the domain and healthcheck to. Do not change.",
                      "defaultValue": "8080"
                    },
                    "OPENAI_API_KEY": {
                      "isOptional": true,
                      "description": "Optional. OpenAI API key.",
                      "defaultValue": ""
                    },
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "description": "Runs as root so the gateway can write to the volume, which Railway mounts root-owned. Do not change.",
                      "defaultValue": "0"
                    },
                    "ANTHROPIC_API_KEY": {
                      "isOptional": true,
                      "description": "Optional. Anthropic API key for Claude models.",
                      "defaultValue": ""
                    },
                    "OPENCLAW_STATE_DIR": {
                      "isOptional": false,
                      "description": "Config, credentials and sessions, on the volume. Do not change.",
                      "defaultValue": "/data/.openclaw"
                    },
                    "OPENROUTER_API_KEY": {
                      "isOptional": true,
                      "description": "Optional. OpenRouter key, one key for hundreds of models. Other providers can be added later in the Control UI or with `openclaw onboard` in the Railway shell.",
                      "defaultValue": ""
                    },
                    "TELEGRAM_BOT_TOKEN": {
                      "isOptional": true,
                      "description": "Optional. Bot token from @BotFather to talk to OpenClaw on Telegram. New chats get a pairing code you approve in the Control UI.",
                      "defaultValue": ""
                    },
                    "OPENCLAW_GATEWAY_PORT": {
                      "isOptional": false,
                      "description": "Gateway port. Do not change.",
                      "defaultValue": "8080"
                    },
                    "OPENCLAW_GATEWAY_TOKEN": {
                      "isOptional": false,
                      "description": "Admin secret for the Control UI and every client that connects to the gateway. Generated for you; paste it on the Control UI login screen.",
                      "defaultValue": "{{OPENCLAW_GATEWAY_TOKEN}}"
                    },
                    "OPENCLAW_WORKSPACE_DIR": {
                      "isOptional": false,
                      "description": "The agent's workspace, on the volume. Do not change.",
                      "defaultValue": "/data/workspace"
                    },
                    "OPENCLAW_RAILWAY_GATEWAY": {
                      "isOptional": false,
                      "description": "Gateway settings merged into openclaw.json on every boot: local mode, the public URL the Control UI is served from (add your custom domain here), and Railway's proxy range so logins through the Railway edge are accepted. No spaces.",
                      "defaultValue": "{\"mode\":\"local\",\"publicOrigin\":\"https://${{RAILWAY_PUBLIC_DOMAIN}}\",\"trustedProxies\":[\"100.64.0.0/10\"]}"
                    },
                    "RAILWAY_HEALTHCHECK_TIMEOUT_SEC": {
                      "isOptional": false,
                      "description": "First boot pulls a large image and runs the doctor; allow 10 minutes before the healthcheck gives up. Do not change.",
                      "defaultValue": "600"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  },
                  "volumeMounts": {
                    "48af6b6e-ec1e-4689-838f-c591c010253b": {
                      "mountPath": "/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "OpenClaw",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-10-28T16:14:58.566Z",
  "generator_version": "0.1.0"
}
