Custom Platform
Run Rivet nodes on any platform that can run your app.
A node is your app plus two environment variables. Any platform that can run your app and reach the control plane can host it.
Requirements
A namespace and a node pool created with PUT /pools/{pool} (see Nodes & Node Pools). In local development, RivetKit creates the default pool for you.
Your platform must provide:
- A long-running process for your app, as a container or a plain process.
- Environment variables, to carry the connection.
- Outbound network access to the control plane.
Steps
Deploy your app
Deploy however your platform expects. A node listens on no port, so it needs no public URL.
Set the environment variables
RIVET_ENDPOINT=https://<namespace>:<rivet-token>@<control-plane-host>
On a self-hosted control plane, the Rivet token is the value of its auth.admin_token setting. See Deploy Nodes.
Configure graceful shutdown
Each Rivet Actor gets up to 15 seconds to save its state. Give the process at least 60 seconds between SIGTERM and SIGKILL, and make sure the signal reaches it: a wrapper such as npm start becomes PID 1 and swallows it.
Verify
Call one of your Rivet Actors from a client.
Troubleshooting
Rivet Actors stay pending. Check outbound network access, and that RIVET_ENDPOINT carries the right namespace and token. Check the node’s logs for connection errors.
The connection drops every 30 to 60 seconds. A proxy in front of the control plane is timing out idle WebSockets. Raise its idle timeout to 3600 seconds. See Ports.