Deploy to Railway
Deploy PraisonAI to Railway in one command
Deploy your agents to Railway with a starter railway.json and a single deploy command.
Quick Start
- Scaffold the project
The starter drops
railway.jsonandagents.yamlinto the current directory.bash praisonai deploy create --template railway - Authenticate with Railway
Log in with the Railway CLI.
bash railway login - Deploy
Push the service to Railway.
bash praisonai deploy railway
How It Works
The command shells out to railway up --detach.
CloudConfig support (not yet wired)
praisonai deploy railway runs railway up --detach alone — it does not apply any CloudConfig fields yet. Set them in the Railway dashboard until CLI wiring lands (PraisonAI PR #4876).
| CloudConfig field | Applied? | Workaround |
|---|---|---|
env_vars | Not applied (names logged only) | Add as service variables in the Railway dashboard |
image | Not applied | Set the service source image in Railway settings |
cpu | Not applied | Set resources in the Railway dashboard |
memory | Not applied | Set resources in the Railway dashboard |
region | Not applied | Choose the region in the Railway dashboard |
min_instances / max_instances | Not applied | Configure scaling in the Railway dashboard |
Every set field is surfaced via logger.warning(...) and echoed in DeployResult.metadata["unapplied"]. Secret names appear; secret values never reach a log line.
Command Options
| Argument | Default | Description |
|---|---|---|
FILE (positional) | agents.yaml | Agent file to deploy. |
Starter railway.json
The railway starter deploys the prebuilt image (no Dockerfile needed).
| Setting | Value |
|---|---|
healthcheckPath | /health |
healthcheckTimeout | 300 |
restartPolicyType | ON_FAILURE |
Doctor
Check Railway readiness before deploying.
praisonai deploy doctor --provider railwayBest Practices
Pin the image tag for production
Use a released ghcr.io/mervinpraison/praisonai tag instead of latest in the Railway service settings.
Store secrets as Railway variables
Add OPENAI_API_KEY and other secrets as service variables in the Railway dashboard, not in Git.
Destroy from the dashboard
praisonai deploy destroy is not automated for Railway — remove the service in the Railway dashboard or run railway down manually.