Skip to main content

What this does

Install agentsfleet-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 the kvm module, then kvm_intel or kvm_amd for your processor.
  • The tun module, which gives each microVM its network device at /dev/net/tun.
  • A kernel with cgroup version 2 and its cpu and memory controllers 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_tables in the kernel and net.ipv4.ip_forward=1, which hold each microVM to its network policy.
  • The packages nftables, iproute2, ca-certificates, curl and jq.
The microVM isolates each run. You can install the host service without Git. Load 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.
A development runner reaches its control plane over a WireGuard peer. It also needs 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

  1. 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.gz archive, toolbox image, manifest, and signature. Also obtain the guest files firecracker, jailer, vmlinux, and guest.cpio.
  2. 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 -d makes 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.
  3. 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.
  4. Check the bundle contents.
  5. Install the binary where the service starts it.
  6. Make the directory the runner reads its toolbox from.
    This path sits under the default storage home. If you set RUNNER_STORAGE_HOME, use toolbox/incoming under that directory instead.
  7. 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. Every toolbox- file ending in .json counts as a manifest, and the runner refuses more than one.
  8. Install the monitor and its jailer where the runner starts them.
  9. Make the directory the runner boots each microVM from.
  10. 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.
    The initrd setting names the guest.cpio file. Keep all four paths outside /home and /root, which the shipped unit hides from the runner.
  11. Write the three required variables to /etc/default/agentsfleet-runner with 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 as https://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.
  12. 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/agentsfleet if needed. Install the matching runner profile there, or create an empty agentsfleet-runner.toml to use the defaults. If you set a custom RUNNER_STORAGE_HOME, add its absolute path to a service drop-in. This gives the runner write access under the shipped filesystem protections.
  13. Load the service and start it.

Verify it works

Check which version you installed.
Check the host capabilities visible to your current process. Exit code 0 means the kernel checks passed. The running service also checks its storage filesystem.
The 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/incoming directory 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.
  • probe exits 1. Read the first check with "ok": false. Its detail names what the host lacks, such as the KVM device, EROFS, nftables, or a cgroup controller.
  • The service stops at start and names kvm. /dev/kvm is missing or the runner cannot open it. Load kvm and kvm_intel or kvm_amd, and use a host that offers hardware virtualization.
  • The service stops at start and names cpu or memory. 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 on net.ipv4.ip_forward, check that the kernel has nf_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 from toolbox/incoming. The runner refuses that directory while it holds two releases’ manifests.
This deletes the staged toolbox files. Keep the rest of the storage home to retain repository mirrors and recovery data. If you set RUNNER_STORAGE_HOME, use toolbox/incoming under that directory instead.
Install the runner binary and signed toolbox from the release you are restoring. Use the same release on the daemon and runner.
  • 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 bubblewrap 0.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 with runner:write for a platform runner or runner:tenant for your account’s runner.
Revoking a runner permanently blocks its token. Deleting the runner record also removes its event history. Completed fleet runs retain their records without a link to that host.
  1. Revoke the token with agentsfleet platform runners revoke <RUNNER_ID> for a platform runner or agentsfleet runners revoke <RUNNER_ID> for an account runner.
  2. Wait for the runner’s last run to finish or expire and for billing to settle.
  3. To delete the record, use agentsfleet platform runners delete <RUNNER_ID> for a platform runner or agentsfleet runners delete <RUNNER_ID> for an account runner.
Removing /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:
  1. Create /etc/agentsfleet/agentsfleet-runner.toml using the settings below. The shipped service unit already selects this path.
  2. If you use a different file, set AGENTSFLEET_RUNNER_CONFIG_FILE to its path in /etc/default/agentsfleet-runner.
  3. Restart the runner to load the profile.
Repeat the restart after later file changes. Without a selected file, the runner uses built-in defaults. The following settings control inference, retries, file operations, and guest binaries.
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.