| name | railway-cli |
| description | Use the Railway CLI to deploy services, manage environment variables, view logs, and configure projects on Railway.app. Use this instead of the Railway MCP server. |
Railway CLI
Official CLI for Railway. Deploy apps, manage services, databases, and environment variables.
Authentication
railway login
railway login --browserless
railway whoami
Common Commands
Projects
railway init
railway link
railway status
railway list
Deployments
railway up
railway up --detach
railway logs
railway logs --follow
Environment Variables
railway variables
railway variables set KEY=value
railway variables delete KEY
Services
railway service
railway add
railway domain
Shell
railway shell
railway run <command>
Agent Best Practices
- Use
railway run to execute commands with the project's env vars injected
- Check
railway status to confirm you're linked to the correct project/environment
- Use
railway logs --follow for debugging deployment issues
- Use
railway variables to inspect and manage env vars without the dashboard
- Deploy with
railway up --detach for non-blocking deploys
Example Workflows
Deploy and check logs
railway up --detach
railway logs --num 50
Run database migration with Railway env vars
railway run npx prisma migrate deploy