Runners and hosts
A runner is a machine that runs workspaces. In the dashboard and the API a runner is also called a host. On AWS, runners are autoscaling groups of large EC2 machines with local NVMe disks and nested virtualization, spot by default: one group per host class, which the control plane makes.
What a runner does
Section titled “What a runner does”- Keeps a connection open to the control plane, and runs what the control plane says should run on it.
- Starts each workspace as a QEMU/KVM virtual machine, confined to its own user, cgroup and empty network namespace.
- Keeps each workspace’s disk on its local NVMe, and uploads its sealed layers to the bucket.
- Enforces each workspace’s network policies, in nftables, outside the machine.
- Opens sessions to the relay when someone connects to a workspace.
A runner opens every connection it has. It has no inbound rule at all.
Joining
Section titled “Joining”A runner in one of the installation’s groups joins by who it is: it signs an AWS request with its instance role, which the control plane has AWS check, and sends a NitroTPM document that says which build of Spin OS it booted, which the control plane checks against the builds it allows. There is no token to create, store or rotate. NitroTPM is the whole of it.
A machine outside the groups can join with a one-time registration token from Admin → Runners.
A runner must run the control plane’s release. One of any other, older or newer, is refused when it registers, and the refusal says which release to run.
Placement
Section titled “Placement”The control plane places a workspace on an active runner with room for its disk and memory. It prefers the runner holding fewer of the same team’s workspaces, so one team does not pile onto one machine. A runner whose local disk is more than 70% full stops taking new workspaces until it is back under 65%.
A preset may name a host class, a kind of runner, and its workspaces are placed only on
runners of that class. The module seeds one class,
default, from its runner_* variables, beside any the installation file declares; the dashboard
changes them after that. A spot class can be set to fall back: when AWS refuses spot
capacity for its group, the control plane runs the group on demand for 30 minutes, then tries spot
again.
Scaling from zero
Section titled “Scaling from zero”On AWS the control plane sizes the runners’ groups itself. It knows what nothing else does: that a workspace is waiting, and when the last one stopped.
- With no runner up, the first workspace to start waits in Waiting for a host while the control plane asks for one. It is placed on the runner as soon as it registers.
- If a workspace has waited ten minutes, and no runner was added in that time, the control plane adds one.
- When nothing has run for
runner_idle_minutes, it scales the groups back to none. During the installation’squiet_hours, it does so as soon as nothing is running. - It never asks for more than
max_runners.
While workspaces run and none waits, a runner that holds nothing only it has, for as long as
runner_idle_minutes, is emptied and given back to its group, one at a time.
When a runner goes away
Section titled “When a runner goes away”A runner that is going away empties itself first. It suspends each of its workspaces, with memory, to the bucket, and each one resumes on another runner from where it was. This happens when:
- AWS reclaims a spot runner (about two minutes’ notice),
- its autoscaling group removes a runner (the group holds it for
runner_drain_seconds), - a release is rolled out and runners are replaced.
A runner restarting its own process is not a drain: the virtual machines keep running, and the new process adopts them.
Operating runners
Section titled “Operating runners”An administrator can drain a runner, so it takes no new workspace, activate it again, or revoke it for good. Taking a runner out is what each does and how.
When a runner is lost
Section titled “When a runner is lost”A runner can vanish without draining: the machine loses power, or its network. The control plane does not guess. Its workspaces stay where they are, and each one has lost only what the runner had not yet uploaded.
-
The owner moves one, at a cost they accept:
Terminal window spin workspace recover api # says what moving it would losespin workspace recover api --accept-data-loss # moves it -
The control plane moves workspaces on its own, after a runner has been silent for
rehome_after_seconds, when no more thanrehome_max_unpublished_byteswould be lost: the workspace is moved, and its owner is told when it waits for them instead. By default it moves one only when nothing would be lost, andrehome_after_secondsset to 0 turns this off.
The owner is told by email: when a workspace is held after its host was lost, when a stop could not be taken, when it was stopped for not responding, and when it was moved off a lost host. Each event can be switched off.
Installations run Spinbox v20261121.03; the reference is generated from spin v20261121.03 (89c5eb5ea). This page as Markdown, for a model or a terminal.