Prerequisites
- Organization Admin role in Kestrel
- Railway account with project access
Setup
1
Create an account API token
- Go to railway.com/account/tokens (Account Settings → Tokens)
- Leave the Workspace dropdown set to “No workspace” to mint an account-scoped token. An account-scoped token can read projects, services, deployments, and logs across your whole account.
- Create the token and copy it — you won’t be able to view it again.
2
Connect in Kestrel
- Navigate to Integrations → Railway in your Kestrel dashboard
- Click Connect
- Paste the API token. It is sent as a Bearer token to Railway’s GraphQL API (
https://backboard.railway.com/graphql/v2). - Save — your Railway account appears as connected.
3
Configure the webhook (for triggers)
Railway delivers deployment and platform events via outbound webhooks. Kestrel exposes a unique webhook URL on the Integrations → Railway page.
- Copy the webhook URL from Kestrel and choose a secret.
- Add the webhook URL to your Railway project’s Settings → Webhooks.
Railway does not sign webhooks, so the secret embedded in the URL is how Kestrel attributes incoming events to your account. Keep the URL private.
How It’s Used
In Workflows
Trigger blocks:- Deployment Failed — fires when a Railway deployment build fails
- Deployment Crashed — fires when a running deployment crashes
- Deployment Succeeded — fires when a deployment completes successfully
- Volume Usage Alert — fires when a volume crosses a usage threshold
- CPU/RAM Monitor Alert — fires when a service exceeds CPU or memory thresholds
- Get Deployment — retrieve deployment details including status and git commit
- Get Deployment Logs — fetch build/runtime log output for a deployment
- Rollback — roll a service back to its previous deployment
- Redeploy — redeploy the current deployment
- Restart — restart a service
- List Deployments — list recent deployments with optional filters
- Set Variables — set service environment variables
- Investigate Railway — run an AI investigation combining deployment logs, status, and history
{{signal.service_id}} and {{signal.environment_id}} from the trigger.
Example: A workflow triggers on a crashed deployment, fetches the logs, analyzes the failure with AI, rolls the service back, and posts a summary to Slack.
Disconnecting
- Navigate to Integrations → Railway
- Click Disconnect
- Confirm the disconnection