Deploy Rivet
Rivet 3 control plane for stateful actors and AI agents, data on a volume
Just deployed
/var/lib/rivet
Deploy and Host Rivet on Railway
Rivet is an open-source (Apache-2.0) orchestrator for Rivet Actors: long-lived, stateful processes with their own SQLite and key-value storage, used for AI agents, durable workflows and realtime apps. The control plane schedules actors onto your app's processes ("nodes"), routes traffic to them and stores their state.
About Hosting Rivet
This template runs one Rivet control plane instance (Rivet Engine 3.1.1, the official rivetdev/engine image pinned by digest) from the public repo aalfath/rivet-railway-template. Rivet 3 needs no database: its disk log and object store both live on one Railway volume at /var/lib/rivet, so actor data survives restarts and redeploys. The Rivet token is generated for you, the health check is /health, and the default node pool is created on first start. After deploy, copy RIVET__AUTH__ADMIN_TOKEN from the Rivet service's variables and point your RivetKit app at the public URL with RIVET_ENDPOINT.
Common Use Cases
- Stateful AI agents that keep memory and tool state between requests
- Durable workflows, schedules and background jobs
- Realtime and multiplayer backends (chat rooms, collaborative documents, presence)
Dependencies for Rivet Hosting
- A Railway volume (included) for the disk log and object store
- Your app running the RivetKit SDK (Node.js 22+, Rust or other SDKs), deployed as a separate service
Deployment Dependencies
- Rivet self-hosting guide: https://rivet.dev/docs/deploy/self-host/control-plane/
- Rivet on Railway: https://rivet.dev/docs/deploy/self-host/control-plane/railway/
- Release 3.1.1: https://github.com/rivet-dev/rivet/releases/tag/v3.1.1
- Template source and changelog: https://github.com/aalfath/rivet-railway-template
Implementation Details
Connect a RivetKit app in the same project over the private network by setting this on its service:
RIVET_ENDPOINT=http://default:${{Rivet.RIVET__AUTH__ADMIN_TOKEN}}@${{Rivet.RAILWAY_PRIVATE_DOMAIN}}:6420
From outside Railway use https://default:YOUR-RIVET-TOKEN@YOUR-DOMAIN.up.railway.app. Check the node joined with GET /pools/default/nodes?namespace=default and the token as a Bearer header. Every API route except /health needs the token. There is no web UI on the control plane itself.
Optional: set RIVET__OBJECT_STORAGE__PRIMARY__S3__BUCKET (plus __REGION, __ENDPOINT, __ACCESS_KEY_ID, __SECRET_ACCESS_KEY under the same prefix) before the first start to keep the durable copy in an S3-compatible bucket. RIVET__TELEMETRY__ENABLED=false turns off Rivet's crash reports.
Updates: the service builds from the repo's main branch, so Railway shows an update notice when the pinned version is bumped. Read the repo's CHANGELOG.md first. Keep one replica: Rivet's single-instance setup keeps one copy of the data on the volume, and back it up if the data matters. Rivet recommends 3+ instances with a bucket for production.
Why Deploy Rivet on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Rivet on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
