Job79andClaude Opus 5.5 3b10f60fab Fix what a real install showed
- systemd-sysusers failed after an update: the image has no login.defs,
  so its factory link pointed at itself. The link goes.
- The first boot had another hostname than later boots, because
  /etc/hostname only exists once tmpfiles links it. The first boot is
  when the runner registers, under that name. The kernel command line
  now sets the hostname, which PID 1 has from the start.
- The README promised a recovery key that doesn't exist. The disk only
  unlocks with the TPM.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 19:36:47 +00:00
2026-11-23 19:36:47 +00:00
2026-11-14 22:43:54 +01:00
2026-11-22 15:59:36 +00:00
2026-11-22 15:59:36 +00:00
2026-11-23 19:36:47 +00:00

runneros

A VM that runs a Gitea Actions runner. It is a minimal Fedora image built with mkosi, and it builds and publishes its own image.

  • Read-only OS: /usr is read-only. Secure Boot verifies the UKI (kernel, initrd and command line), which holds the dm-verity hash that verifies /usr.
  • Encrypted with a TPM: everything that isn't read-only, such as /etc and /var, is encrypted. The TPM unlocks it only for correctly signed UKIs. There is no recovery key: if the TPM is lost, reinstall.
  • Jobs in containers: each job runs in its own privileged container on root's podman. Jobs with runs-on: linux run in our job image: Fedora with git, Node.js 26 and dnf, built with the OS and shipped in /usr. Privileged jobs can build OS images, but can also take over the VM, so only use it for repositories you trust. Container storage is wiped at every boot.
  • Self-updating: the image rebuilds weekly. The VM lets running jobs finish before it reboots into an update, and a bad update rolls back by itself.

Install

Download the disk image, resize it to the disk size you want and boot it with UEFI and a TPM. At first boot, the screen asks for a timezone and a root password. Then it asks how many jobs to run at once, the Gitea URL and a registration token from Gitea's runner settings. It registers under the hostname, runneros- and four hex digits, and starts.

To change the number of parallel jobs later, run systemctl edit gitea-runner and set Environment=CAPACITY=<jobs> under [Service].

To start over, run systemctl start factory-reset.target as root. It reboots and wipes the root partition (/etc and /var), and the VM sets itself up as at first boot.

Development

mkosi -f genkey    # This replaces mkosi.crt for local tests. Don't commit it.
mkosi build

mkosi.output/ then holds the disk image (runneros_<version>.raw) and the UKI and /usr partitions that make up an update. To boot a test VM, see AGENTS.md.

S
Description
Gitea Actions runner OS built with mkosi
Readme
217 KiB
0 Stars 1 Watchers 0 Forks
Languages
Shell 100%