-
Notifications
You must be signed in to change notification settings - Fork 0
Connecting Railway
Stackwatch tracks memory and CPU usage across all your Railway projects and services. Per-project breakdowns are available on both Free and Pro. Network, disk, and peak metrics are Pro-only.
A Railway API Token from your Railway account settings.
- Go to railway.com/account/tokens
- Click Create Token
- Give it a name, e.g.
stackwatch - Copy the token
Railway tokens are account-scoped and give read access to all projects in your account.
- Navigate to your project in the Stackwatch dashboard
- Go to the project's Integrations tab
- Find Railway and click Add account
- Paste your token into the API Token field
- Give the integration a label (e.g.
railway-prod) - Click Connect
Stackwatch will automatically discover all projects and services in your Railway account — no project IDs needed.
Usage is measured from the start of the current calendar month to now.
| Metric | Description |
|---|---|
| Memory usage | Average memory used across all services (MB) vs 512 MB per-service limit |
| CPU usage | Average CPU usage across all services (%) vs 100% per-service limit |
| Per-project memory | Memory broken down per Railway project |
| Per-project CPU | CPU broken down per Railway project |
Limits scale with service count. If you have 3 services, the memory limit shown is 1,536 MB (3 × 512 MB).
| Metric | Description |
|---|---|
| Peak CPU | Highest CPU spike recorded this month |
| Peak memory | Highest memory spike recorded this month |
| Network outbound | Total data sent from your services (MB) vs 100 GB limit |
| Network inbound | Total data received by your services (MB) vs 100 GB limit |
| Disk usage | Disk used across all services (MB) vs 1 GB per-service limit |
| Per-project peak CPU | Peak CPU per project |
| Per-project peak memory | Peak memory per project |
| Per-project network | Network in/out per project |
| Per-project disk | Disk usage per project |
Railway's API returns cumulative sums of CPU and memory readings over the selected time period. Stackwatch divides these by the number of minutes elapsed since the start of the month to produce an average instantaneous reading. This means:
- Shortly after a billing period starts (e.g. the 1st of the month), values may appear lower than expected because there are fewer minutes of data to average over
- Values stabilize as the month progresses
- Peak values (Pro) are tracked separately and represent the highest single reading, not an average
The token was revoked or is incorrect. Generate a new token at railway.com/account/tokens and reconnect.
If all your Railway services are idle (sleeping or no traffic), the usage API may return zero values. This is expected — Stackwatch will still show the integration as connected and display 0 usage. Values will update once your services are active.
Stackwatch queries all projects accessible to the token. If a project is missing, check that the Railway account connected is the owner (not just a collaborator) of that project, as collaborator access may vary.
CPU and memory values shown are averages across the billing period, not current live values. A spike earlier in the month will be reflected in the average. Use the Peak CPU and Peak memory metrics (Pro) to identify spikes.
- Create a new token at railway.com/account/tokens
- In Stackwatch, go to the project's Integrations tab, find your Railway integration, and click the edit (pencil) icon
- Paste the new token and save