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 setsDATABASE_URL in the same project environment automatically.
Or via CLI:
Step 3: Set environment variables
Required:Step 4: Deploy
From your local Vane repository:package.json start script and runs node dist/api/server.js. You need to run the TypeScript build first:
railway.toml (create at repo root):
Step 5: Verify
Environment variable reference
Railway setsDATABASE_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, updateVANE_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_URLis shared across replicas. PostgreSQL handles concurrent writes correctly.