Install
What the host needs
Section titled “What the host needs”- Linux with cgroup v2, and Docker with the systemd cgroup driver.
- Sysbox, so runner containers run Docker unprivileged. When it is missing,
runnerd doctorprints the install for this distribution: Nestybox’s.debon Ubuntu and Debian, the AUR packagesysbox-ce-binon Arch, a source build on Fedora, CentOS Stream, Rocky, Alma and Amazon Linux, and Nestybox’s support table elsewhere. Nestybox supports Red Hat Enterprise Linux with Sysbox-EE only. - A systemd slice whose
MemoryMaxis the budget for all runners.runnerd initprints one sized for the host. - The GitHub CLI, logged in with the
reposcope.
runnerd doctor checks each of these, the slice the config names and that the config fits in it, and prints the fix for what is missing. It reads ~/.config/runnerd/runnerd.toml when it exists; runnerd doctor <file> checks another.
The binaries are built for x86_64 and aarch64. The runner images are linux/amd64 only, so on aarch64 runners do not start yet.
First run
Section titled “First run”curl -fsSL https://github.com/ayagmar/runnerd/releases/latest/download/install.sh | shrunnerd init halyard/ledger halyard/storefrontThe installer checks the SHA-256 of runnerd and runnerctl, copies them to ~/.local/bin and runs runnerd doctor. It never uses sudo.
init writes two files, runs the doctor against them and prints what is left. On a 62G, 32-CPU host with no slice yet:
$ runnerd init halyard/ledger halyard/storefrontwrote ~/.config/runnerd/runnerd.toml: 5 slots of 8G and 6 CPUs in runnerd.slice (46.5G)wrote ~/.config/systemd/user/runnerd.service
runnerd doctor:ok Docker: reachable, Docker 29.9.2ok cgroups: cgroup v2 with the systemd driverinfo isolation: sysbox: runners run unprivilegedok sysbox: Docker has the sysbox-runc runtime and sysbox's services runFAIL slice: runnerd.slice has no unit file with a MemoryMax, so nothing holds runners to the budget fix: sudo tee /etc/systemd/system/runnerd.slice >/dev/null <<'EOF' [Slice] MemoryMax=46.5G EOF sudo systemctl daemon-reloadok config: valid, with warnings: the slice runnerd.slice has no MemoryMax, so nothing holds runners to their 40.5G of caps; install a unit file for itok image: ghcr.io/ayagmar/runnerd-runner:base-0.0.20: not pulled yet; runnerd pulls it before the first runnerinfo records: the records of failed jobs take 0B of [records] max_total = 20Gok gh: logged in to github.com with the repo scopeinfo /dev/kvm: present, for a future Kata Containers backend
First run the fixes above for slice; runnerd init runs nothing as root.Start runnerd and have it start at login; it pulls ghcr.io/ayagmar/runnerd-runner:base-0.0.20 before the first runner: systemctl --user daemon-reload systemctl --user enable --now runnerd runnerctl statusTo keep it running while you are logged out: loginctl enable-linger "$USER"
Send a workflow job here with: runs-on: [self-hosted, linux, x64]A job runs here only when every label in its runs-on is in its repository's labels in runnerd.toml; other jobs, such as runs-on: ubuntu-latest, stay on GitHub's runners.Run the root commands your init printed, then:
systemctl --user daemon-reloadsystemctl --user enable --now runnerdrunnerctl statusThen point a job at the runners. init gives each repository the labels GitHub gives its own self-hosted runners, so a workflow written for those runs here unchanged:
jobs: build: runs-on: [self-hosted, linux, x64]| Flag | |
|---|---|
--slice NAME |
another slice than runnerd.slice |
--config PATH |
write the config elsewhere |
--force |
replace files that exist; without it init writes neither |
init sizes slots of up to 8G, one per 4 CPUs, inside three quarters of the host’s memory, or the slice’s MemoryMax if smaller. Configuration says what to change.
Pick a directory or release
Section titled “Pick a directory or release”curl -fsSL https://github.com/ayagmar/runnerd/releases/latest/download/install.sh | sh -s -- --prefix /opt/runnerd --version v0.0.20From crates.io, runnerctl is in runnerd-cli:
cargo install --locked runnerd runnerd-cli # Rust 1.99 or latercargo binstall runnerd runnerd-cli # the release archivesVerify a release
Section titled “Verify a release”Every release archive, install.sh and sha256.sum has a GitHub build provenance attestation, and so does every runner image:
curl -fsSLO https://github.com/ayagmar/runnerd/releases/latest/download/install.shgh attestation verify install.sh -R ayagmar/runnerdsh install.shgh attestation verify oci://ghcr.io/ayagmar/runnerd-runner:base-0.0.20 --repo ayagmar/runnerd