Skip to main content

Overview

The Railway integration inspects the latest successful deployment of any configured Railway service and can request a redeploy after explicit confirmation.

Prerequisites

  • Railway CLI installed (@railway/cli)
  • Either an authenticated Railway CLI session (railway login) or a Railway token
  • Optional defaults: project, service, and environment to inspect or redeploy

Setup

Option 1: Interactive CLI

The setup flow accepts an optional token and default project, service, and environment. The token is used when present; an authenticated Railway CLI can be used without one. Tool calls can override any configured default scope.

Option 2: Environment variables

Credentials

  1. Install the Railway CLI and run railway login, or create a Railway token in the Railway dashboard.
  2. Optionally set default project / service / environment so inspect and redeploy calls need fewer parameters.
  3. Store the token in .env as RAILWAY_TOKEN or enter it during opensre integrations setup railway.
Verify requires a token or a complete default project + service + environment scope.

Tools

Inspect a deployment

When a default scope is configured, no parameters are required. Otherwise provide the service scope:
The result includes deployment ID, status, and source commit hash/message when Railway provides them.

Redeploy a service

confirm must be explicitly true. Railway reuses the latest deployment and returns its new deployment ID. Commands always use explicit project, service, and environment flags and never write Railway link state into the workspace.

Verify

Troubleshooting

Security

  • Railway tokens are never returned in tool output; Railway commands are non-interactive and errors are redacted.
  • Redeploy is a mutating action and requires explicit confirm=true (and approval when your surface enforces it).
  • Prefer a dedicated token scoped to the projects OpenSRE should touch.
  • Store tokens in .env or your secret manager — not in source control.