What this does
Installagentsfleet-runner when you operate your own Linux host. Hosted fleets can use platform runners. The runner receives work from agentsfleetd and runs tools in a Firecracker microVM.
A runner needs three things from the same release. The first is the runner binary, a single static file. The second is the toolbox, a read-only disk image that becomes the root of every sandbox.
The third is the guest set: the firecracker monitor, its jailer, the vmlinux guest kernel and the guest.cpio initial file system.
At start, the runner checks the toolbox’s release manifest against a signing key built into the binary. It also checks that the release is for this host’s architecture and this runner’s version. Only then does it copy the image under toolbox/images in its storage home and mount it read-only.
Before you begin
You need a host with these:- Linux on
x86_64, also called amd64. Each release ships an amd64 runner only. - systemd 254 or later, which can hand the runner a control group (cgroup) subtree of its own.
- A processor with hardware virtualization, and a usable
/dev/kvm. Load thekvmmodule, thenkvm_intelorkvm_amdfor your processor. - The
tunmodule, which gives each microVM its network device at/dev/net/tun. - A kernel with cgroup version 2 and its
cpuandmemorycontrollers delegated to the runner. - A storage filesystem that supports direct input/output and allows device nodes. The default storage path is
/var/lib/agentsfleet-runner. - The Enhanced Read-Only File System (EROFS), as a module or built into the kernel.
nf_tablesin the kernel andnet.ipv4.ip_forward=1, which hold each microVM to its network policy.- The packages
nftables,iproute2,ca-certificates,curlandjq.
kvm, your processor’s module and tun at every boot, for example from a file in /etc/modules-load.d/. The shipped service unit loads erofs at each start. Run modprobe erofs yourself before you run probe by hand.
On Debian or Ubuntu, install the packages with this command.
wireguard-tools and openssl.
You also need a runner token. Runners shows how to create one.
Run every step below as root.
Your service operator supplies the private listener’s Hypertext Transfer Protocol Secure (HTTPS) origin.
They also supply a network route to it.
Allow User Datagram Protocol (UDP) for HTTP/3 and Transmission Control Protocol (TCP) for HTTP/2 on its port, normally 4443.
Both transports require Transport Layer Security (TLS) 1.3 with X25519MLKEM768 key exchange.
If the listener uses a private certificate issuer, obtain its public certificate bundle from your operator.
The certificate must match the listener’s hostname or address.
Steps
-
Obtain the bundle matching your daemon version. Use its published release files when available, or request that version’s signed bundle from your service operator.
You need the
agentsfleet-runner-linux-amd64.tar.gzarchive, toolbox image, manifest, and signature. Also obtain the guest filesfirecracker,jailer,vmlinux, andguest.cpio. -
Make a private scratch directory for the release files, and keep its path in
BUNDLE_DIR. Keep the same shell open. Run the archive command from the directory containing your downloads.mktemp -dmakes a new directory that only root can open. Do not reuse a fixed path under/tmp. Another user who creates it first could swap the binary before you install it. -
Unpack the runner archive.
Copy the matching toolbox and guest files into the same directory. Replace
<SHA256>with the digest in the toolbox image filename. -
Check the bundle contents.
-
Install the binary where the service starts it.
-
Make the directory the runner reads its toolbox from.
This path sits under the default storage home. If you set
RUNNER_STORAGE_HOME, usetoolbox/incomingunder that directory instead. -
Copy the toolbox image, its manifest, and the signature. Replace every
<SHA256>with the digest you found in step 4.Leave the bill of materials and the scan out. Everytoolbox-file ending in.jsoncounts as a manifest, and the runner refuses more than one. -
Install the monitor and its jailer where the runner starts them.
-
Make the directory the runner boots each microVM from.
-
Install the guest kernel and initial file system there.
These are the default paths. To keep any of the four files elsewhere, name its path in the
[firecracker]table of the runner’s file. Runner-local settings shows how to select that file.Theinitrdsetting names theguest.cpiofile. Keep all four paths outside/homeand/root, which the shipped unit hides from the runner. -
Write the three required variables to
/etc/default/agentsfleet-runnerwith root-only read permissions. Replace<API_URL>with your control-plane address and<RUNNER_TOKEN>with the token issued by the registration command. Your operator supplies<STREAM_ORIGIN>, such ashttps://runner.example.net:4443, without a path, query, fragment or embedded credentials.For a private issuer, add the public bundle’s local path as<CA_CERT_FILE>:Keep the token file and the environment file readable only by the service operator. -
Install the service unit from the matching release’s source tree. Replace
<UNIT_FILE>with the downloaded file’s local path.The shipped unit sets resource limits, filesystem protections, and its restart policy. It selects/etc/agentsfleet/agentsfleet-runner.toml. Create the directory/etc/agentsfleetif needed. Install the matching runner profile there, or create an emptyagentsfleet-runner.tomlto use the defaults. If you set a customRUNNER_STORAGE_HOME, add its absolute path to a service drop-in. This gives the runner write access under the shipped filesystem protections. -
Load the service and start it.
Verify it works
Check which version you installed.kvm check reports whether /dev/kvm, the Kernel-based Virtual Machine (KVM) device, opens. A failed kvm, cgroup_controllers, nftables or toolbox_filesystem check stops the runner at start.
Use agentsfleet platform runners show <RUNNER_ID> to check a platform host, or agentsfleet runners show <RUNNER_ID> for your account’s host. Read the identifier from the corresponding list command. A healthy, idle host reports online and Ready after its first heartbeat.
Common problems
- The service names
AGENTSFLEET_RUNNER_STREAM_URL. Set the operator-provided HTTPS origin, with no path or embedded credentials. - The runner cannot connect. Check its private network route, listener port and certificate issuer. A certificate mismatch requires a corrected certificate or origin.
- The service reports
workspace_direct_io. Move the storage home to a filesystem that supports direct input/output. The mount must also allow device nodes so each microVM can open its devices. - The service stops at start and names the toolbox. The
toolbox/incomingdirectory must hold one release’s image, manifest, and signature, from the same release as the binary. A manifest for another runner version or another architecture is refused. probeexits 1. Read the first check with"ok": false. Itsdetailnames what the host lacks, such as the KVM device, EROFS,nftables, or a cgroup controller.- The service stops at start and names
kvm./dev/kvmis missing or the runner cannot open it. Loadkvmandkvm_intelorkvm_amd, and use a host that offers hardware virtualization. - The service stops at start and names
cpuormemory. The runner’s cgroup does not hold that controller. Start the runner from the shipped unit, which delegates both, on a host with cgroup version 2. - The service stops at start and names
nftables. The kernel would not build an egress table, or IPv4 forwarding is off. Turn onnet.ipv4.ip_forward, check that the kernel hasnf_tables, and restart the service.
Remove or undo
Let active runs finish before stopping the service. If a run is interrupted, its next steps depend on runner recovery.Roll back to a previous release
First clear the current release’s toolbox fromtoolbox/incoming.
The runner refuses that directory while it holds two releases’ manifests.
- Firecracker releases need the matching monitor, jailer, guest kernel, and initial file system. Install those files as in steps 8 to 10, then start the matching service unit.
- Bubblewrap releases need
bubblewrap0.8.0 or later and a kernel with Landlock and seccomp enabled. Install that release’s service unit. You can skip the Firecracker guest files.
Retire a runner
Use a credential withrunner:write for a platform runner or runner:tenant for your account’s runner.
- Revoke the token with
agentsfleet platform runners revoke <RUNNER_ID>for a platform runner oragentsfleet runners revoke <RUNNER_ID>for an account runner. - Wait for the runner’s last run to finish or expire and for billing to settle.
- To delete the record, use
agentsfleet platform runners delete <RUNNER_ID>for a platform runner oragentsfleet runners delete <RUNNER_ID>for an account runner.
/var/lib/agentsfleet-runner also deletes the local toolbox, repository mirrors, and sandbox files. A process that stops before the daemon accepts a result can lose that result.
Runner-local settings
The managed host deploy installs/etc/agentsfleet/agentsfleet-runner.toml and selects it through AGENTSFLEET_RUNNER_CONFIG_FILE.
For a manually installed service:
-
Create
/etc/agentsfleet/agentsfleet-runner.tomlusing the settings below. The shipped service unit already selects this path. -
If you use a different file, set
AGENTSFLEET_RUNNER_CONFIG_FILEto its path in/etc/default/agentsfleet-runner. -
Restart the runner to load the profile.
Attempt counts include the first send.
Provider HTTP retries and eligible stream reopenings have separate limits, allowing at most nine generation-request sends per turn with these defaults.
Native token-count requests are separate and send once per opening when needed.
Known spend, visible output, and single-attempt requests prevent automatic stream reopening.
Daemon connection recovery and owed-report delivery retry until cancellation or their deadline.
They use the configured backoff without a retry-count limit.
Earlier lease and turn deadlines still stop work.
Jitter can extend a pause beyond
daemon_max_backoff_ms.
Connection recovery also applies a compiled 30-second final pause limit.
Use the following settings to adjust how much of the host each run can use. The values are defaults.
See the complete runner configuration reference for tool, network, and provider settings.
Required file restores wait for a runner-wide admission slot while lease renewal continues.
Optional captures skip a busy boundary and preserve the previous committed checkpoint.
Each admitted operation retains the compiled four-transfer window.
The runner refuses unreadable files, unknown settings, and invalid bounds.
Keep tokens in the environment file.
Worker count remains assigned per runner by the daemon.