Skip to content

Railway

Railway is a PaaS that deploys Docker containers with zero configuration.

Deploy on Railway

Or deploy manually from the CLI:

Terminal window
npm i -g @railway/cli
railway login
Terminal window
railway init

Railway containers are ephemeral. You need a volume so the SQLite database survives redeploys.

Terminal window
railway volume add --mount /data
Terminal window
railway variables set WCP_DB_PATH=/data/sync.db
railway variables set WCP_CONFIG_PATH=/data/config.json
railway variables set WCP_CORS_ORIGINS=https://your-dashboard.example.com

From the WCP repository root:

Terminal window
railway up

Railway detects the Dockerfile and builds automatically.

Terminal window
railway domain

Your WCP instance is live at https://<project>.up.railway.app.

For reproducible deploys, add this to the repo root:

[build]
builder = "dockerfile"
[deploy]
healthcheckPath = "/health"
healthcheckTimeout = 30
restartPolicyType = "on_failure"
restartPolicyMaxRetries = 3

Deploy the React dashboard as a separate Railway service:

  1. Set the build command to cd dashboard && npm ci && npm run build
  2. Set the start command to npx serve dashboard/dist -l 3000
  3. Set VITE_API_URL to your WCP API Railway URL