Folio IV10°46′N 106°42′E
Homelab: self-hosted infrastructure
- Kind
- Self-hosted infrastructure
- Machines
- 3: a headless server, a workstation, a thin client
- Stack
- Arch Linux, Docker Compose, Tailscale (WireGuard), Cloudflare Tunnel, nftables, systemd
- Status
- Running
Three Arch Linux machines on a Tailscale mesh: a headless server, a workstation and a thin client.
The server sits behind triple NAT, so its Git forge (Forgejo) and resume editor run in Docker Compose behind an outbound-only Cloudflare Tunnel. Git over SSH listens on the tailnet only. The web container runs unprivileged, with a read-only root filesystem and no Linux capabilities. A systemd timer dumps the forge every night.
Lab changes are treated like production changes. The nftables default-drop firewall and key-only SSH went in behind an automatic 3-minute rollback, cancelled only after fresh connections were verified. Tunnel and DNS changes go through the Cloudflare API with a dry run and a config backup. Desktop configuration lives in a repo with drift detection; it provisioned the thin client from scratch in about 15 minutes, including a from-source compositor build.
A 10-minute workstation freeze was memory exhaustion, not CPU load. Pressure-stall (PSI) metrics showed all tasks stalled on memory 41% of the time over five minutes, with no swap and 8.3 GB sitting in a RAM-backed /tmp, including 135 temp directories a test suite never deleted. The fix was zstd zram swap and PSI-based systemd-oomd, scoped so it can stop a single application but never the desktop session.
A display outage in my fork of the Wayfire compositor (C++, wlroots) came down to one loop. strace showed about 860 failed page-flip commits per second after a monitor disconnected mid-flip; stack sampling and DRM state located it: a repaint after every failed commit, with no backoff. I wrote a postmortem with the raw evidence and recovered with a session restart instead of a reboot.