> ## Documentation Index
> Fetch the complete documentation index at: https://docs.squasher.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Railway

> Connect Railway to Squasher for deployment status, runtime logs, deployment failure webhooks, and restart actions.

Connect your Railway account in the Squasher dashboard so Squasher can inspect Railway
deployments, read runtime logs, configure a Railway webhook, and restart or redeploy services for
the bound Railway project.

<Note>
  Railway's OAuth and GraphQL surfaces are still evolving. If Railway changes consent copy, project
  selection, or log labels, use Railway's latest UI wording and keep the Squasher callback URL
  exactly as configured.
</Note>

## Connect Railway to Squasher

<Steps>
  <Step title="Open Integrations in Squasher">
    In the dashboard, open your project, go to **Integrations**, and choose **Railway**.
  </Step>

  <Step title="Connect Railway">
    Click **Connect Railway** and finish the Railway consent flow. Squasher requests the Railway
    project access it needs to inspect deployments and logs on your behalf.
  </Step>

  <Step title="Bind the correct Railway project">
    After the OAuth flow finishes, choose the Railway project that matches your Squasher project and
    save the binding.
  </Step>

  <Step title="Verify telemetry">
    Select a service and environment, then run the opt-in verification. Squasher reads a small log
    and metric window before continuous collection starts.
  </Step>

  <Step title="Use Railway inside Squasher">
    Once bound, Squasher can answer questions about recent Railway deployments, inspect Railway
    runtime logs, restart or redeploy Railway services, and ingest Railway deployment failure
    webhooks for alerting and automation. If the Railway project has multiple services or
    environments, Squasher will ask which one you want.
  </Step>
</Steps>

## What the Railway connection is for

* Deployment status and recent deploy history for the bound Railway project.
* Continuous runtime logs and metrics for the selected Railway service and environment.
* Deployment webhooks from the bound Railway project, stored as first-class deployment records and matched to telemetry when service/version metadata is present.
* Restarting the latest active deployment.
* Redeploying the latest Railway deployment.

## Railway runtime logs

Railway does not expose a native stdout log drain. After OAuth project binding, Squasher reads logs
and metrics through Railway's API and advances its cursor only after Squasher accepts the batch.
Collection obeys Railway rate-limit and retry responses. The optional Railway webhook remains useful
for immediate deployment failure events.

Railway OAuth must be enabled for the Squasher application. Squasher requests project member access
and offline access so collection can continue after the browser session ends. The Railway plan sets
the API rate limit, so large projects can need a narrower service or environment scope. See
Railway's [OAuth guide](https://docs.railway.com/integrations/oauth/quickstart) and [Public API
limits](https://docs.railway.com/integrations/api).

## Detection behavior for forwarded logs

Squasher creates error groups from severity fields and message patterns commonly used for crashes, exceptions, and fatal failures.

## Agent handoff

Use this prompt for safe Railway operations:

```text theme={null}
Inspect the Railway integration for Squasher project <project_id>. Start read-only: list deployments and logs with service/environment filters. Ask before restart, redeploy, webhook changes, or connector key rotation.
```

Use `squasher providers railway-*`, `squasher integrations connect railway`, or MCP
`search("providerCapabilities.railway")` followed by `execute`.

## Related guides

* Use [Node.js SDK](/sdks/node) for richer in-app context inside the service itself.
* Use [alerts](/features/alerts) so production failures notify your team.
* Use [OpenTelemetry](/integrations/opentelemetry) if you want application traces and logs in addition to Railway platform data.
