One command
Add Railway to any Ashlr Stack project with a single command. Stack runs the auth flow, verifies the credential, and writes every secret slot into Phantom.
stack add railway
Or describe what you're building and let Claude pick it up via stack recommend:
stack recommend "host a Next.js frontend" Auth flow
Paste a long-lived API key once. Stack verifies it against the provider's API before writing to Phantom.
How-to: Paste an API token from https://railway.app/account/tokens.
Secret slots
stack add railway writes these 1 secret
slot into your Phantom vault:
RAILWAY_TOKEN
The values never leave Phantom in plaintext. Your .env file references slot
names, and stack exec -- <cmd> swaps them in at process-spawn time via
Phantom's local proxy.
Related providers in Deploy
- Modal — Serverless compute for AI + data. Token stored in Phantom.
- Vercel — Frontend platform. Stores a scoped access token for deploys + env sync.
- Fly.io — VMs at the edge. Machines API token stored in Phantom.
- Cloudflare — Workers, R2, D1. Account id inferred from the token's scope.
- Render — Zero-config hosting. API key stored in Phantom.
FAQ
Do I need a Railway account to use it with Stack?
Yes — Stack provisions Railway on your behalf, but it authenticates as you. Paste a long-lived API key once. Stack verifies it against the provider's API before writing to Phantom. If you don't have a credential yet, create one at https://railway.app/dashboard and paste it once.
Where does Stack store my Railway credentials?
In Phantom Secrets, an E2E-encrypted local vault. Stack writes the secret slot names (RAILWAY_TOKEN) into .stack.toml — the actual values live only in Phantom and never touch disk in plaintext.
Can I rotate or revoke this integration later?
Yes. Run `stack remove railway` to pull the Railway service back out (Phantom secrets deleted, MCP entry removed, .stack.toml cleaned up). Rotate the underlying Railway credentials in their dashboard — https://railway.app/dashboard — and Stack's next `doctor --fix` will pick up the new values.