Keys / Railway
RAILWAY_TOKEN
The Railway project token the Railway CLI deploys with in CI. It's scoped to one environment of one project.
- Expires
- the docs don't say
- API
- create and delete (
projectTokenCreate,projectTokenDelete)
Get it
Create one on railway.com/dashboard. The steps aren't recorded yet.
Set it
RAILWAY_TOKEN=...
The Railway CLI reads it for project-level commands; RAILWAY_API_TOKEN holds an account or workspace token instead. Or keep it out of .env with keypin: keypin run -- npm run dev
Replace it
- In your project's settings, open Tokens and create a new token for the same environment.
- Deploy it everywhere that reads
RAILWAY_TOKEN. - Check that nothing still uses the old token, then delete it from the same page.
Set rotate_every on the key in keypin.toml and a rotated date on its vault item, and keypin status shows when it's due.