| name | railway-deploy |
| description | Deploy an app to Railway — build/start command detection, service config, environment variables, private networking, databases, and health checks. Use when deploying any web app or service to Railway. |
| origin | Matrix |
Railway Deploy Playbook
Deploy a web app or service to Railway. Railway builds from a repo (Nixpacks or a
Dockerfile), runs a detected or declared start command, and wires services together over a
private network. This playbook covers the config that matters and the mistakes that cost a
redeploy.
Use when: shipping any of the stack-selection frameworks (React Router, Astro SSR,
SvelteKit, Angular static, a Go/Python service) to Railway.
Concepts
- Project contains services; a service is one deployable (your app, a database, a
worker). Each has its own env vars, domain, and networking.
- Build: Nixpacks auto-detects the stack, or Railway uses your
Dockerfile if present.
- Start command: detected from the framework, or set explicitly (do this — see below).
Start command detection and override
Railway/Nixpacks infers the start from the ecosystem, but inference is where deploys go
wrong. Be explicit per stack:
| Stack | Build | Start |
|---|
| React Router (framework/SSR) | npm run build | npm start (react-router-serve ./build/server/index.js) |
| Astro (static) |