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

# Railway

> Connect Railway production deployments and their logs to NOFire AI

Connect Railway to give NOFire production deployments with their build and deploy logs. Before a change ships, NOFire sees what went live and when. When something breaks, the deployment, its commit or image, and its logs are the evidence NOFire reasons over.

You authenticate with a Railway account or workspace token. NOFire only reads production.

## What NOFire reads

| Signal | What NOFire reads |
| - | - |
| **Projects** | Each project the token can see, with its environments and services, listed on [Infrastructure](https://my.nofire.ai/dashboard/infrastructure) |
| **Deployments** | The newest production deployments of each service: status, the commit or image it shipped, and when |
| **Build logs** | The last lines of a production deployment's build output. A deployment built from an image has none. |
| **Deploy logs** | What the service of a production deployment wrote while it ran, crashes and errors included |

Production is the environment named `production` in each project. NOFire does not read a project with no environment of that name, and it refuses any deployment outside it.

NOFire also records each production deployment that went live as a change. A connection you add today also picks up the previous day. When errors start, NOFire checks the deploy that went live before them, by commit, author and message.

Railway projects show on Infrastructure, but not on the map yet, so NOFire does not draw the links between a Railway service and the rest of your system.

> [!NOTE]
>
> Railway tokens cannot be limited to reads. NOFire only sends read queries to Railway: it never deploys, redeploys, rolls back or changes a variable.

## Prerequisites

* A Railway account with at least one project that has an environment named `production`.
* Permission to create an account or workspace token.

## Step 1: Create a Railway token

> [accordion] Create a token in Railway
>
> 1. Open [Account Settings, Tokens](https://railway.com/account/tokens) in Railway.
>
> 2. Create an account token, or a workspace token for the workspace whose projects you want NOFire to read.
>
> 3. Copy the token now.
>
> > [!WARNING]
> >
> > A project token does not work. It reaches only one environment of one project, and Railway takes it in a different way.
>
> > [!NOTE]
> >
> > Use a dedicated token named `nofire` so you can rotate or revoke it without touching other integrations.

## Step 2: Add Railway connection to NOFire AI

1. Open [Connections](https://my.nofire.ai/dashboard/connections) and click **Connect** on **Railway**.
2. Fill in the form:
   * **Name**: defaults to `railway` (for example, `production-railway`)
   * **API token**: masked. The account or workspace token from step 1.
3. Click **Connect**.

NOFire checks the token before it saves the connection. It lists the projects the token can see, and saves the connection only when there is at least one. A saved connection shows the toast **Connection created** followed by its name.

## Test the connection

1. Open [Connections](https://my.nofire.ai/dashboard/connections) and make sure that the Railway connection shows **Connected**. A connection that shows **Failing** did not authenticate.
2. Open [Infrastructure](https://my.nofire.ai/dashboard/infrastructure) and check that your Railway projects are listed.
3. Ask NOFire a question that needs deploy context, for example "what shipped to production on Railway in the last day?". An answer that names your deployments confirms the connection works end to end.

## Troubleshooting

The form shows the toast **Railway connection test failed** with one of these reasons.

> [accordion] Railway rejected railway\_api\_token: check that it is valid and has not been deleted
>
> The token is wrong or was deleted, or it is a project token. Create an account or workspace token under Account Settings, Tokens.

> [accordion] The token sees no Railway projects: use an account token, or a workspace token for a workspace that has projects
>
> The token reads a workspace with no projects. Use an account token, or a workspace token for the workspace your projects are in.

> [accordion] Railway rate limit reached: wait a few minutes, then test again
>
> Railway limited the number of requests. Wait a few minutes, then connect again.

> [accordion] Railway did not answer in time: test again
>
> Railway did not answer before the test timed out. Connect again.

If the connection saves but NOFire finds no deployments, check that the project has an environment named exactly `production`, and that a deployment went live there.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.