Skip to main content

Prerequisites

  • A Railway account
  • The Railway CLI installed
  • Your Vane repository on GitHub (or deploy directly from the CLI)

Step 1: Create a new Railway project

Step 2: Add a PostgreSQL database

From the Railway dashboard: New Service → Database → PostgreSQL. Railway provisions the database and sets DATABASE_URL in the same project environment automatically. Or via CLI:

Step 3: Set environment variables

Required:
Optional but recommended:
If you have a Sentry project:

Step 4: Deploy

From your local Vane repository:
Railway detects the package.json start script and runs node dist/api/server.js. You need to run the TypeScript build first:
Or configure Railway to build and start: In railway.toml (create at repo root):

Step 5: Verify

Environment variable reference

Railway sets DATABASE_URL automatically when a PostgreSQL plugin is added. All other variables must be set manually.

Custom domains

In the Railway dashboard: Settings → Domains → Add Domain. After adding your custom domain, update VANE_BASE_URL:

Scaling

Railway scales horizontally. If you run multiple replicas, note that:
  • Rate limiting is per-process (in-memory). With multiple replicas, the effective limit is N × per-process limit. Add a shared rate limiter (Redis + ioredis-rate-limiter) for cluster-wide limits.
  • The in-memory attestation chain per tenant is fully loaded on each replica startup. This is fine for development but becomes expensive at scale — each replica holds the full chain in memory.
  • DATABASE_URL is shared across replicas. PostgreSQL handles concurrent writes correctly.