I am a nerd. I like to tinker with computers (which also happens to be my career), so of course I have a HomeLab.
Since this is home stuff, I don't want to run it in the cloud; it would simply cost too much. And it should not be dependent on e.g. my Google account working - the thought of losing many decades of photos, movies etc that way is horrifying.
But: I did not want to give up on features such as:
- tolerance of node failures: a box crashing should not cause a (big) outage. Other boxes should be able to take up the slack, ideally without manual intervention.
- tolerance of disk failures: disks will (eventually) fail, but I don't want to lose data because of it.
So the homelab needs an extra box and (more than) twice the amount of disk. If something breaks: things can continue running, while I fix stuff.
Hardware Rundown:
- 4 small PCs: Total 22 CPU cores, 84 Gb memory, 4 TB SSD (a mix of Dell Optiplex 3040 Minis and HP Prodesk 400 minis, kitted out with memory and internal SSDs)
- 8 USB-attached hard drives; 2 drives per PC (total ~ 24 TB)
- 16-port switch
- Separate 12V power supply. Mainly to supply power to the external hard drives, but also the LED lights in the fireplace and the USB charging port for people to use. Charging phones on the fireplace is handy.
- A Linksys WRT1200AC router running OpenWRT
- fibre internet to the house: just residential broadband without fixed IP address
- LAN-attached Zigbee coordinator
- A plethora of zigbee lights and sensors
Software Rundown:
- 4 Kubernetes Nodes. Everything (except the router) runs in Kubernetes. It allows me to not worry about "what runs where" or "what happens when a node crashes" (mostly).
- OpenWRT Router: It handles all traffic in/out of the house and the wireless networks. With with BGP configured and a few port forwardings it also handles routing for services the Kubernetes cluster exposes to the outside world.
- Ceph cluster (using Rook) to provide redundant storage across the nodes (both spinning rust and SSDs). It is very good at automatically recovering from hardware failures. If a disk (or whole box) fails: it will immediately start rebalancing and re-create the necessary redundancy levels for data.
- Self-hosted AudioBookShelf instance for podcasts, audiobooks & E-books
- Self-hosted Navidrome instance for the music library. I ripped all the CDs we had and made them available there.
- Self-hosted Home Assistant to run the house
- Self-hosted Nextcloud instance for shared calendars, tasks etc
- Self-hosted Jellyfin instance for movies. I ripped all the DVDs we had and made them available there.
- Self-hosted QBittorrent instance for e.g. sharing ISOs for various Debian and Ubuntu versions.
- Self-hosted ForgeJo instance at https://code.jorgensen.org.uk with a few runners for the CI/CD pipeline
- Self-hosted Prometheus stack (Prometheus, Grafana & AlertManager) for monitoring. As I have a diabetic family member, this also monitors blood sugar levels courtesy of a custom Dexcom Exporter
- Self-hosted SnipeIT instance to track all my hardware (and other important house stuff)
- Self-hosted Actual Budget instance for keeping track of the family finances.
- Self-hosted Authentik instance for central authentication of all of the above services. This way: friends and family don't have to juggle a plethora of usernames and passwords.
- DNS servers for my domains
- Mail server for my domains
- Minecraft server for the kids
- Squid cache server for home proxy. Mainly used as an APT cache to ease system updates.
- PXEBoot server for building stuff
- Various web sites like my blog (which you are reading now) and Memoirs (my first half-decent web app to organise photos; will probably be replaced by immich at some point if it incorporates geneaology features)
- Various bits and bobs for backing up laptops
One of the nodes (I forget which one) also runs a Jellyfin client and is connected to one of the lounge TV's HDMI ports. Usually we select a movie on the Jellyfin phone app, and tell it to play on the TV, rather than messing with a remote keyboard - sadly the graphics cards in the nodes do not support HDMI-CEC which would allow us to use the normal TV remote.
And it works great. It gives me a reliable system even in the face of a node failing: Kubernetes will (eventually) re-schedule pods to other nodes, and ceph will automatically maintain redundancy even if a disk (or node) fails. It just works and is cheap to run. Running the equivalent hardware in AWS would easily cost me almost £700/month! Mind you: with USB-attached hard drives, the performance is not quite up to enterprise standards, but perfectly usable for a family system.
To make everything work smoothly, I had to add a cloud-based server (a cheap 1-core 512Mb virtual server) to get a fixed IP address in the world as my internet provider does not provide one. This has a WireGuard tunnel to my home router. As far as the rest of the world is concerned, this is my name server. In reality, it is merely a secondary name server, with the master running inside the cluster.
When combined with external-dns and a custom operator to deal with a changing home IP address, it gives me a permanent working presence on the web.
All that hardware presents a problem: Where do you put it? Keeping in mind the all-important "wife acceptance factor": cluttering the house with the stuff is not an option! So I had to go hunting for possible places to put it. My solution: The fireplace. It is an electric fireplace, mostly for decoration.
(If that hadn't worked, I would probably have used the empty space in the sofas; although that would have come with some challenges with regard to wiring.)
There is a lovely empty space inside it, where the hardware can fit. With a few (pretty rough) small DIY shelves and cable management (cable clips!) and a bit of trunking: It works nicely. Everything is hidden from view. Despite the space constraints, the servers do not suffer from overheating; the heat produced vents nicely to the lounge. There is a slight "hum" from the servers and disks, but barely noticeable.