Skip to content

How to add a Linux runner

This turns a Debian 13 host into a runner in your hoard. install.sh is the only step that runs as root. You need a set-up laptop and sudo on the host. Linux runner lists everything the script installs. If the host ran the spike, start with If the host ran the spike.

Steps

  1. On the laptop, build the binaries and fetch gVisor:

    just build-linux        # dist/linux-amd64/{allmyram,allmyram-warden}
    curl -fsSLO https://storage.googleapis.com/gvisor/releases/release/20261116.0/x86_64/gvisor.tar.zstd
    
  2. Copy them and deploy/linux/ to the host:

    ssh smaug mkdir -p allmyram-install
    scp deploy/linux/* dist/linux-amd64/allmyram dist/linux-amd64/allmyram-warden \
      gvisor.tar.zstd smaug:allmyram-install/
    
  3. On the laptop, start the invite:

    allmyram invite
    

    It prints the tailnet IP the runner's egress self-check will prove a job can't reach, and an invite that is good for 15 minutes and one connection. Leave it waiting.

  4. On the host, run the script and paste the invite when it asks:

    sudo bash ~/allmyram-install/install.sh --name smaug --join
    

    It reads the invite from the terminal, never from an argument, so ps and shell history never hold it. A bad paste fails before anything is installed.

  5. The host prints a fingerprint. If the laptop shows the same fingerprint and the right name, approve on the laptop. Touch ID asks only when the day key needs renewing.

  6. Wait for the script to finish. It prints the units' state, the allmyram processes and their users (none may be root), and the egress self-check: egress self-check passed=true and one ok=true line per check. It exits 0 only when the self-check passed.

The runner is now in client.json under its name. When the laptop has a sink, the invite then waits up to 2 minutes for the runner to answer and hands it the sink record, so the sink starts collecting from it. A runner that doesn't answer in time gets the record the next time the laptop connects to it.

Options

  • If you want the egress self-check to prove jobs can't reach a different tailnet machine, add --tailnet-peer ADDR; pick one that is up. On a runner that has already joined it works without --join, changing the existing trust settings.
  • If you want to limit which registries jobs pull from, add --registries FILE, one host[:port] per line. To return to the defaults, sudo rm /etc/allmyram/registries and rerun install.sh.
  • If you want scratch pads cloned rather than copied and the host has ZFS, move the data onto its own dataset, naming the units to stop and restart:

    sudo bash ~/allmyram-install/move-to-zfs.sh minipool/allmyram /var/lib/allmyram \
      allmyram-runner allmyram-warden allmyram-egress
    

Running jobs end as RunnerRestarted. The script's header has the undo.

Upgrade a runner

Copy the new binaries to the host and rerun sudo bash install.sh without flags. It keeps the runner's identity, trust settings and configuration. Upgrade runners before clients: a runner refuses request fields it doesn't know, so a newer client's runs fail against an older runner.

A host installed when the warden was called the helper is renamed in place: install.sh stops the runner and its jobs, renames the allmyram-helper user, group, unit, binary and /var/lib/allmyram/helper, and carries on. Logs of runs that ended before the rename can no longer be read.

A host installed before joins existed has no trust.json, and the runner refuses its old runner.json, so it stays stopped until it joins with --join. install.sh no longer takes --ca-pub, --host-cert or --allowed.

Rejoin a runner

Pass --join again, with a fresh allmyram invite. --join is never remembered. Rejoin after allmyram init --new-owner, or to move a runner to a new owner key. A rejoin replaces trust.json, so add --tailnet-peer again if you used it.

Remove a runner

  1. On the laptop: allmyram remove smaug. The runner keeps admitting the laptop's key until you uninstall it.
  2. On the host, follow the header of install.sh, which lists every command. In short: disable and remove the four units, delete the nft tables and the bridge, remove the CNI config, restore /etc/containerd/config.toml.before-allmyram-install, remove /etc/containerd/allmyram-runsc.toml, /etc/allmyram, /var/lib/allmyram and the binaries, and delete the two users.

If the host ran the spike

Before the first install.sh, clear what the spike's scripts left:

sudo bash ~/allmyram-install/remove-spike.sh

It removes the spike's sudo rule, bridges, CNI configs, cgroup, debug wrapper and nerdctl. crictl stays, and egress.nft replaces the spike's nft tables. It refuses to run once allmyram is installed.