Railway
How an agent gets a Railway key through KeyKeeper, what to choose on railway.com, and how KeyKeeper verifies it.
| Template id | railway |
|---|---|
| Field | railway-token → RAILWAY_TOKEN · secret |
| Key looks like | whether it can be viewed again is unconfirmed |
| Created at | railway.com |
| Verified by KeyKeeper | not verified |
| Template checked | 2026-09-15 |
What the agent does
keykeeper providers show railway
keykeeper save --provider railway --from-clipboard --create --purpose "what this task does"
keykeeper run -c railway -- <your command>--provider railway fills in the credential id and the field. The environment
variable is the one Railway's own tools read, so nothing has to be mapped.
What only you can do
Sign in to Railway
Open the target Project → Environment → Tokens
Create a project token for that one environment
Copy the key, then approve the save in KeyKeeper's window.
What to choose
Use RAILWAY_TOKEN: a project token limited to one environment. Use the broader RAILWAY_API_TOKEN only for a task that genuinely spans projects or workspaces.
The agent is told the same thing. It opens the page for you and says what to pick; it never logs in, passes 2FA or pays on your behalf.
What KeyKeeper checks
- Before writing: the value must look like a Railway key (whether it can be viewed again is unconfirmed). A wrong paste is refused before anything is stored, and the agent is told why — without the value.
- After saving: Railway offers no read-only endpoint KeyKeeper can use, so the first real call is the test.
Rotation and expiry
No universal expiry policy was confirmed for this credential type. Record the date shown by the provider, or leave it unknown. Rotate or revoke at railway.com.