Skip to main content
Reference

Self-Hosting (Hosted)

Run hosted agentOS VMs on your own infrastructure with Rivet Services.

Self-hosting runs the hosted agentOS API on your own infrastructure instead of Rivet Cloud. It needs two processes: the Rivet control plane, and Rivet Services, which runs the agentOS actor and its VMs. If you only need VMs inside your own Node.js process, use the library instead; it needs neither.

Which one should I use?

HostedLibrary
RunsAs a durable instance on Rivet Cloud or a self-hosted Docker imageEmbedded inside your process as a library
LifecycleDurable, sleeps when idle unless a process is running; see actor lifecycleEphemeral, runs until dispose() or process exit
Package@rivet-dev/agentos, or plain HTTP@rivet-dev/agentos-core
VM identityA durable VM you create by key and reach by IDA handle your process owns until dispose()
ConfigurationStored with the VM and versionedPassed to AgentOs.create()
ClientsYour backend, or browsers with a scoped JWTYour backend
Host accessNoneHost functions, host mounts, external sandboxes
PreviewsExpiring preview URLsNone
Best forLong-lived VMs shared across clientsEmbedding VMs in an existing backend

Run it

Hosted agentOS runs on Rivet Services, the prebuilt node that hosts Rivet’s own Actors. Follow that page to run the control plane and Services, then point your client at your control plane.

Set RIVET_TOKEN to your Rivet token, then create a VM by ID on your control plane from TypeScript or plain HTTP:

Everything in the hosted quickstart and the Hosted HTTP API works the same way. Use http://localhost:6420, or wherever your control plane is reachable, as the base URL instead of https://api.rivet.dev.

Edit this page Last updated November 10, 2026