
Self-Host Rivet on Railway
Rivet is now a verified app on the Railway Marketplace. With a few clicks, you can deploy and self-host Rivet on Railway and start building stateful apps anywhere you can run Node.js or Bun—without vendor lock-in.
What’s New with Railway
- One-click deploy: Spin up Rivet on Railway in seconds.
- Two templates: Rivet Starter with example app; Rivet blank template to start fresh.
- Full Rivet Engine: Actors, state, routing, and persistence.
- Inspector included: Real-time actor visibility out of the box.
Why Rivet?
Open-source alternative to Durable Objects
Durable-Objects-style per-key isolation with portability: run it yourself, keep control of runtime, data, and costs.
Actors
Each Actor owns a key (e.g., a user, room, cart) with single-threaded execution, in-memory state, and persistence. That means no ad-hoc locks, no “who owns this?” routing, and no bolt-on caches.
Built-in visibility
Rivet Inspector gives live views of Actor state, messages, and performance for fast debugging.
How to build with Actors
AI Agents
- Per-agent memory lives in the Actor (no external cache glue).
- Tool calls/workflows run sequentially in one place—no race conditions.
- Simple long-running steps via Actor messages and scheduled work.
Real-Time & Collaboration
- Make each room/document a single Actor: ordered events, membership, and presence in one spot.
- Broadcast to clients from the room Actor (predictable fan-out, no custom pub/sub scaffolding).
Stateful APIs
- One Actor per entity (user/cart/session).
- Built-in idempotency per key (retries don’t double-apply).
- Consistent read-modify-write without database locks.
Distributed Workflows
- Decompose by key; Actors communicate via messages instead of shared locks.
- Timers/scheduled work per Actor for sagas and retries.
- Horizontal scale by sharding keys—no global coordination layer.
Get Started
Choose the Rivet Starter template to explore with an example chat app, or the Rivet template to build your own.
For detailed deployment instructions, see the Railway deployment documentation.