Getting started
Attach your own machine as a compute node.
A node is one machine running the Unisrv runtime. It opens its own encrypted connection to Unisrv and runs the instances the control plane places on it. Nothing on the machine has to be reachable from the internet.
Requirements
- Linux with Docker, on
amd64orarm64. - Outbound network access. No open ports or public IP needed, so a node behind NAT works.
- Optional: a working
/dev/kvmfor microVM isolation. See Isolation.
Enroll a node
- In the web console, open Nodes and click Register node. You get a single-use enrollment token and the command to run.
- Run the command on the machine:
docker run -d --name unisrv-node \
--privileged --stop-timeout 120 \
-v unisrv:/srv/unisrv \
ghcr.io/unisrv/node \
<token>- Wait for the node to show up in the console. Follow its log with
docker logs -f unisrv-node.
The token works once and expires. If you lose it, register the node again.
--privileged lets the node run microVMs and containers and set up their networking. --stop-timeout 120 gives it time to stop its instances cleanly.
The unisrv volume holds the node's identity. Keep it. A node started on an empty volume needs a new token and joins
as a new node.
Isolation
The node picks an isolation mode when it starts:
| The machine has | Instances run as |
|---|---|
A working /dev/kvm, as on most bare metal | Firecracker microVMs, each with its own kernel |
| No KVM, as on most VPS and cloud VMs | Containers |
Your unisrv.hcl is the same either way. The console lists each node's architecture and isolation mode. To keep a deployment on one kind of node, use placement.
Node states
| State | Meaning |
|---|---|
active | Connected and taking instances. |
inactive | Shutting down. |
offline | Stopped cleanly. |
missing | Stopped reporting without shutting down. Gets no new instances. |
Pause placement keeps new instances off a node. What already runs there keeps running. Use it before maintenance, then Resume placement when you're done.
If a replica with a volume stops on a paused node, it can't start again until placement resumes, because its volume lives on that node.
When a node goes away
Stopping a node stops its instances. Their deployments replace them on other nodes that match their placement.
A node that stops reporting is marked missing. If it stays silent, the control plane gives up on its instances and their deployments replace them elsewhere. When the node comes back, it stops anything that was replaced.
A replica with a volume can't move, since the volume is on that node's disk. It waits for the node to return. With a single node, every replacement waits for it.
Upgrade a node
Pull the latest image and recreate the container on the same volume. No token is needed: the node reads its identity from the volume.
docker pull ghcr.io/unisrv/node
docker stop unisrv-node && docker rm unisrv-node
docker run -d --name unisrv-node \
--privileged --stop-timeout 120 \
-v unisrv:/srv/unisrv \
ghcr.io/unisrv/nodeRecreating the container stops the node's instances. Their deployments replace them, as on any other stop.
Remove a node
- Stop it with
docker stop unisrv-node. - Delete any volumes it holds. Their data is gone for good.
- Delete the node from Nodes in the console.
The console refuses to delete a node that is still online or still holds volumes. Once it's deleted, clean up the machine with docker rm unisrv-node && docker volume rm unisrv.
Next
Deploy something with the CLI and a unisrv.hcl.