Notes from Building a Home Server

I am almost at my 10-year mark in the software industry, and yet the more experience I gain, the more disconnected I feel from the actual process of building software. It feels bold to say, so let me explain.
When I was at university and wanted to run my first program outside the lab, I had to assemble the computer myself. That meant sourcing the components, putting them together, installing the software, writing the program, and finally watching it print "Hello, World!" for the first time. Every step involved trade-offs: balancing my limited budget against the processing power I would need, while also keeping in mind the longevity of the system I was building, as I might not be able to afford another one for the next 10 years. This extended not just to the hardware, but to the software as well.
Today, spinning up a service is as simple as writing a lambda function in a cloud IDE and clicking deploy. These advancements have made software more reliable and much faster to ship, and I am grateful for that. But I think we have lost something along the way. We rarely have to decide how much scale we actually need, because global scale is simply provided; we rarely have to optimise our programs to run efficiently; and many of us could not build a scalable service outside the comfort of a cloud platform. I would even go as far as to say that there is already a generation of working programmers who have never written a program and run it on their own machine.
This is not a post complaining about losing touch with engineering. Rather, with AI writing code, we have this unique opportunity to expand the vision of the problem statement beyond just the computer software to the whole compute stack: learning more of how the hardware, provisioning and serving works, as well as understanding the decisions made by the hyperscale providers for scalability and reliability, and the trade-offs they made and questioning those decisions again. Writing code used to be the bottleneck: it consumed so much human labour that maximising productivity meant minimising all other variables, anything that could distract from that goal. Now that the bottleneck is gone, we can spend that attention on the decisions themselves.
Since the beginning of this year, I have been doing just that by deliberately learning how the whole flow works: from hardware acquisition, to provisioning it so an application can be developed for it, to finally deploying it and making it available to the world. Learning alone was not enough and I wanted to put it into practice. So I set out to build and maintain a small cloud of my own: not at global scale, but at least a multi-cluster setup where I could run my own applications. I have learned a great deal along the way, enough to fill this post, so here are my thoughts so far.
Note before we proceed: I want to make it clear that I am doing this in addition to keeping up with the AI advancements, which is its own full-time job ;)
Infrastructure and Costs
When I decided to embark on this journey, the first thing I did was write down what I needed the machine to do.
The first requirement was to run three or four VMs as a Kubernetes cluster, so I could run distributed and replicated applications. In the real world, those replicas would be spread across separate servers, and a single machine can't fully reproduce that. I was willing to accept that limitation, because a local cluster will still surface around 90% of the bugs that only appear when an application runs replicated, rather than on my laptop.
The second requirement was to avoid used enterprise hardware. Those machines are powerful, but they are loud, power-hungry and expensive to run, and electricity in Ireland is among the most expensive in the world. I wanted something modern and power-efficient: a desktop with more than four cores that would be cheap to leave running all year round.
With those requirements in mind, I started my search. First I priced an equivalent setup from a cloud provider, and then I looked at what was available on the local market.
On the used market, I found a Fujitsu desktop with a 6-core Intel i5-9400 that is still supported, with 32GB RAM and 512GB (NVMe) + 256GB (SSD) storage. The specifications are nothing groundbreaking, but they match my use case perfectly, and after one quick trip to Waterford it was in my home for €200. Even with around €60 a year in electricity, the machine would pay for itself within a year compared with even the cheapest Hetzner option.
There are downsides to owning a dedicated machine: no infrastructure redundancy, and no one to call when it fails, which the cloud handles for me. But that is a decision I was willing to make, and being able to make these decisions at a scale that suits me is exactly what the cloud's abstractions take away from us.
Setting up the Machine
With the infrastructure settled, I turned to how the machine itself should be set up. This took the most time, because I wanted to do it properly and not the way most home servers are done, which is installing Linux, running updates by hand and installing software from packages as needed. Instead, I took everything I have learned about how clouds and organisations run production systems, and applied it at the scale of one machine and in the process, thought through how I could mitigate the shortcomings of my earlier decisions.
So let's start with the biggest one: overcoming the lack of redundancy. I don't have what a data centre has: no backup power, no spare networking, no support staff. So the whole design follows one principle: plan for the hardware to fail from day one. If the machine died tomorrow, I should be able to reproduce it immediately in the cloud until I buy new hardware, without having to remember how anything was set up. A failure should cost hours, not days, and it should never make me regret the project.
Operating System
I had already used immutable Linux distributions as a daily driver, where the system root is read-only and changes are made deliberately rather than accumulating over time. That approach suits a server that has to be reproducible and it makes it harder to quietly compromise, which matters for a machine on my home network that is reachable from the internet*.
That search led me to Incus OS, a minimal operating system built to run Incus, the container and virtual machine manager. Instead of installing and configuring it by hand, I build a customised image from it. A build script pulls the current stable release from the official image server, verifies its SHA-256 checksum, and injects my declarative seed configuration: network settings, hostname, and the admin certificate I use to manage the server remotely. The build runs in GitLab CI and the image is stored as a pipeline artifact, so there is always a current, verified image ready to go and adding a new machine is the same boot procedure, ready in minutes.
Networking
The machine sits behind a home router, so it needed a way to be reachable from anywhere without a single port opened to the internet. The obvious answer is a classic self-hosted VPN, but that means running and patching another always-on service, managing certificates or keys by hand, and hoping the router cooperates with hole punching. Instead of a VPN, I chose Tailscale, which gives me WireGuard-based private networking without that operational burden: every device gets a stable address on a private, encrypted network, so my laptop talks to the containers as if they were on the same LAN, and a rented cloud machine can join the same network during a hardware failure and my services keep their addresses and keep working across the world.
Storage
Storage was the one compromise I had not planned for. The internal disks are fine for the OS and containers, but I wanted a shared location for files every device on the network can use over SMB. A proper NAS is the right answer, but the drives for one are expensive at the moment, so an external drive over USB it is for now, along with some creative use of the cloud storage space I have available for backup.
Containers
The final layer is the workloads, and it is where the remaining compromises meet their solutions too. Each service runs in its own LXC container/Micro VM - a lightweight system container sharing the host's kernel but with its own filesystem, users and network managed by Incus, so I can create, snapshot, copy and rebuild them with a few commands. Nothing here is hand-provisioned: every container and its configuration is described in Terraform, using the official Incus provider, and lives in its own repository alongside the rest of the setup. The same way the OS image removes the need to remember how the machine was installed, Terraform removes the need to remember how a service was deployed and recreates any container from the repo, on this machine or on a rented cloud replacement.
Final Thoughts
Architecturally, the C4 diagram for the whole stack looks remarkably close to what a company runs in production and that is precisely the point. Stripped of hyperscale budgets, redundant data centers, and managed cloud abstractions, the core engineering principles remain identical: immutable infrastructure, declarative state, zero-trust networking, and automated recovery. By making those decisions at a scale that actually fits the job rather than defaulting to hyperscale, we end up with a private cloud running on a €200 desktop under a desk turning a simple home server into a working laboratory for understanding how modern software runs from the silicon up.
Home Cloud vs. Enterprise-Grade
Before anyone concludes that the cloud is the big bad: the patterns match production, not the physical guaranteesand it is worth being honest about the gap
The interesting part is that the rows are the same rows. An enterprise platform solves each of them with money and headcount; I solve each of them with a decision and having to make every one of those decisions myself is exactly what the abstraction layer at work hides from me.
原文:https://www.a8q9.cn/en/article/notes-from-building-a-home-server-ec4a4d.html




