Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 60 additions & 0 deletions site/src/posts/2025-10-01-railway-selfhost/page.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
export const author = "nicholas-kissel"
export const published = "2025-10-01"
export const category = "changelog"
export const keywords = ["railway", "self-host", "marketplace", "open-source", "deployment", "stateful", "durable objects alternative", "actors"]

# 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](https://railway.com/deploy/rivet-starter) with example app; [Rivet](https://railway.com/deploy/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](https://railway.com/deploy/rivet-starter) template to explore with an example chat app, or the [Rivet](https://railway.com/deploy/rivet) template to build your own.

For detailed deployment instructions, see the [Railway deployment documentation](https://www.rivet.dev/docs/self-hosting/railway).

## Support

- [GitHub Issues](https://github.com/rivet-gg/rivet/issues)
- [Discord](https://rivet.gg/discord)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file is missing a newline at the end, which is a common best practice in text files. Many Unix tools and version control systems expect files to end with a newline character. Adding one will prevent potential issues with diffs and concatenation operations.

Spotted by Diamond

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

Loading