Skip to main content
Platforms

VM & Bare Metal

Run Rivet nodes on a Linux VM or bare metal host.

Your process runs as a node: it opens a connection out to the control plane on startup. The host needs no public URL, only outbound network access.

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.

  • A Linux host with SSH access and Node.js installed. Hetzner, DigitalOcean, Linode, EC2, and bare metal all work the same way.
  • A running control plane

Steps

Upload your build

Build locally, then copy the output somewhere readable by the service user:

scp -r ./dist user@server:/opt/rivet-node

Create the systemd unit

TimeoutStopSec is the important line. Each Rivet Actor gets up to 15 seconds to save its state, so allow a minute.

[Unit]
Description=Rivet Node
After=network.target

[Service]
Type=simple
WorkingDirectory=/opt/rivet-node
ExecStart=/usr/bin/node server.js
Restart=on-failure
TimeoutStopSec=60
Environment=RIVET_ENDPOINT=<your-rivet-endpoint>

[Install]
WantedBy=multi-user.target

The endpoint value is described in Deploy Nodes. For secrets, prefer EnvironmentFile= pointing at a root-owned file over inline Environment= lines.

Start the service

sudo systemctl daemon-reload
sudo systemctl enable --now rivet-node.service

Verify

systemctl is-active rivet-node.service

Expect active. Call one of your Rivet Actors to confirm it responds.

Scaling

There is no autoscaler on a bare host. Nodes are interchangeable, so capacity is added by running the same unit on more hosts, each with its own RIVET_ENDPOINT. They all join the same pool and start serving Rivet Actors. To autoscale instead, move the node to a platform that has one, such as Kubernetes or ECS.

Running two units on one host works but shares the host’s CPU and memory, so it adds concurrency rather than capacity.

Operating

Restart after deploying a new build or changing environment variables:

sudo systemctl restart rivet-node.service

Follow logs while debugging:

sudo journalctl -u rivet-node.service -f

Next steps