[ blog » 2026 ]Modernizing an Old Machine (by Philipp Gesang, location: Munich)
2026-11-22

Initially set up thirteen years ago in 2013, the machine running this blog, my website and email was ripe for an overhaul. While over time I had wrapped most steps of the deployment in scripts, I had only once set it up from scratch before, but that time preserved the distribution and filesystem layout. All the changes since had been incremental without bookkeeping, and the system state had drifted significantly.

The aging setup has served well but the cruft is getting in the way of further changes and all but prevented upgrading the machine itself. This time I wanted to do it right and ensure a clean, fully automatic deployment and provisioning with minimal manual intervention.

Starting Point and Modernization Goals

Back in 2013 the Linux distro ecosystem was so much simpler than it is today. Debian was the logical choice for a slow moving, rock solid server distro. It still is today, no doubt about that, but there’s a variety of competitors with different strengths. The obvious candidate for an infinitely customizable, reproducible environment would be NixOS which I only ruled out on the grounds of resource use - the target box was going to be a low spec virtual server on which rebuilding derivations would be excruciatingly slow. So in 2026 I chose Fedora for its excellent support for podman and never looked back.

More consequential however was the decision to fully automate the deployment with OpenTofu IaC and provisioning with cloud-init. My cloud hoster of choice, Hetzner, has first class support for OpenTofu and allows managing all relevant resources from the compute instance to DNS records. While not nearly as powerful and hassle-free as Nix, cloud-init gets the box provisioned eventually.

The declarative config enables the second most decisive improvement: mirroring the configuration in a separate Dev environment for staging changes. That machine simply runs locally through libvirt which to my positive surprise also supports managing through OpenTofu:

terraform {
# ...
  required_providers {
    libvirt = {
      source = "dmacvicar/libvirt"
      version = "~> 0.8.0"
    }
  }
}

With this disposable staging environment managing the server becomes a breeze. It allowed achieving an almost live production setup before even allocating the new instance!

The Diff

Hardware

The new deployment runs on Hetzner CAX11, the smallest available ARM64 instance (Ampère flavored Neoverse N1) with 2 cores and 4 GB RAM (up from 2 GB):

$ lscpu
Architecture:                aarch64
  CPU op-mode(s):            32-bit, 64-bit
  Byte Order:                Little Endian
CPU(s):                      2
  On-line CPU(s) list:       0,1
Vendor ID:                   ARM
  BIOS Vendor ID:            QEMU
  Model name:                Neoverse-N1
...
    Thread(s) per core:      1
    Core(s) per socket:      2
    Socket(s):               1
    Stepping:                r3p1
    BogoMIPS:                50.00
    Flags:                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcp
                             c dcpop asimddp
...

Hetzner only provide this setup in their datacenter in Finland so the server relocated to a different country in the process. At the moment of this writing, they are billing 7.13 € for this SKU, a little more than the equivalent AMD64 setup (CX23). openssl speed has it run circles around Intel in terms of accelerated algorithms (AES) but lag behind significantly for unaccelerated ones (Chacha20, RSA). sysbench has it outperform the old AMD box in terms of CPU by a factor of two and in terms of memory throughput by 1.5.

The performance is adequate. Actually the instance would be overpowered if it weren’t for the relentless LLM scraper bots that will cause high CPU load even when serving nothing but static pages.

Security

Over the years, service isolation evolved from the initial chroot approach - appropriate for 2013 - to systemd-nspawn. However the system was never systematically hardened and mainly relied on unix service users for confining services.

With the new machine every hosted service was containerized and SELinux would now run in enforcing mode. Inevitably the latter caused some trouble, mainly regarding an extra storage volume that got added later and had to be relabeled before SELinux would allow services to access it. Once it was set up, it remained in the background.

Containerization with podman replaces nspawn. I found Quadlets are a breeze to use and integrate well with systemd. The result is a neatly coherent service orchestration layer that makes compose files look like ancient tech.

Upgrades

acme.sh replaces the obsolete Certbot which had been fetching certs for the machine ever since Let’s Encrypt went public beta. One less Python user, good riddance!

The development environment is now encapsulated by a Nix flake and the most common operations are prepared as justfile rules.

Any code is checked by linters like shellcheck for scripts and hadolint for Containerfiles.

Fixes

The context mirror bot has been adapted to upstream changes and now retrieves the commit timestamp from the HTTP timestamp of the uploaded zipball. This became necessary after the timestamps vanished from the Pragma website.

cgit is back up again. A couple months back I disabled it after I noticed it was being hammered by LLM scraper bots, causing the machine to suffocate due to resource exhaustion. A common problem in the AI era that has been described in detail elsewhere. These scrapers just love hammering the HTML pages of insignificant ancient commit refs instead of checking out the code the normal way. To mitigate the exasperating stupidity of those LLMs, I set strict resource limits on the cgit quadlet and filtered a number of expensive routes - mainly relating to the Git history - on the biggest repo. That keeps the resource utilization manageable even on this weak system.

Dropped

mlmmj was dropped. Nothing wrong with it, just that there was no serious mailing list activity ever since the family moved to Matrix many years ago.

Constants

Twelve years later the workhorses remain the same:

The more things change … It’s not unlikely that this winning team will survive the next decade intact as well.

Surprises

One production failure was not caught by the staging environment: cloud-init had been accreting more and more provisioning instructions and eventually it hit the size limit of 32 KiB imposed by Hetzner’s API. This is easily sidestepped by factoring out the code into dedicated provisioning scripts, but it was kind of irritating to hit the condition only in production.

Significant effort was necessary to reach a viable deployment of the Nitrogen web framework that powers the home page. The last official Nitrogen release (2.4) has two issues:

Sadly Fedora no longer ships OTP and OpenSSL versions that old, and a foray into making Nitrogen work with more recent OTP went nowhere. In the end I went with a custom Containerfile that fetches a matching OpenSSL and OTP for AARCH64 from another container image during provisioning - a time consuming workaround.

In 2013 I chose Nitrogen to drive the website after reading the late Joe Armstrong’s excellent book “Programming in Erlang”. The goal to progressively make use of more of its dynamic features but I never got around to doing that, or more accurately I got an epiphany about static pages later on and never looked back. Plus the dynamic nature of Erlang makes it not great for coming back to the code only occasionally to add small improvements as most errors only occur during runtime. Considering the trouble required to set up this unnecessary - for my purposes - piece of software, I feel disinclined to carry it around for much longer. For the time being it will stay, however.

Takeaways

Outlook

The new setup is a tremendous improvement. The separate Dev deployment alone is worth the time invested in the migration. No more headaches because of every change being an “operation on the live patient” - it’s about fast iterating and debugging without risking downtime on the live instance.

Now that the box is up and humming, the next step will be to unify and the modernize stack: consolidate the OCaml toolchains used which are currently on 4.x due to library incompatibilities. Also after 14 reliable years, the fate of Nitrogen will have to be decided.

Whatever the future brings, we’ve finally caught up with the present.