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.

Diagram

Railway Deploy

💻 create –template railway

📝 Edit railway.json

🚀 deploy railway

✅ Railway service

Quick Start

  1. Scaffold the project

    The starter drops railway.json and agents.yaml into the current directory.

    bash
    praisonai deploy create --template railway
  2. Authenticate with Railway

    Log in with the Railway CLI.

    bash
    railway login
  3. Deploy

    Push the service to Railway.

    bash
    praisonai deploy railway

How It Works

The command shells out to railway up --detach.

Diagram
railway CLIdeploy railwayUserrailway CLIdeploy railwayUserpraisonai deploy railwayrailway up –detachDeploy initiated

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).

Diagram

CloudConfig fields

logger.warning + metadata.unapplied

Set in Railway dashboard

CloudConfig fieldApplied?Workaround
env_varsNot applied (names logged only)Add as service variables in the Railway dashboard
imageNot appliedSet the service source image in Railway settings
cpuNot appliedSet resources in the Railway dashboard
memoryNot appliedSet resources in the Railway dashboard
regionNot appliedChoose the region in the Railway dashboard
min_instances / max_instancesNot appliedConfigure 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

ArgumentDefaultDescription
FILE (positional)agents.yamlAgent file to deploy.

Starter railway.json

The railway starter deploys the prebuilt image (no Dockerfile needed).

SettingValue
healthcheckPath/health
healthcheckTimeout300
restartPolicyTypeON_FAILURE

Doctor

Check Railway readiness before deploying.

bash
praisonai deploy doctor --provider railway

Best 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.


Related