Designing a New Home Server
It's time to set up a new home server! But before jumping into the work, let's take a moment to consider how to manage the server and what to run on it.
For the past decade or longer, I have been running my own home server(s). Their scope and features always changed, depending on my own needs, interests, and resources. Sometimes it was all about experimentation and learning, while at other times I just needed things to work™.
Right now, my personal tech stack at home is quite small. I have a Synology NAS that is mostly used for backups, but that also runs some services in Docker. Pi-hole for DNS and adblocking, Home Assistant for some light home automation, a UniFi controller to manage my network.
While this setup is not perfect, it has worked well enough for the past few years. But two things have changed in my life that make me want to set up a new home server:
- Recent events have made me reconsider how much I want to rely on cloud services. There are some things that I'd like to run myself again so that I'm in full control of my data. I wrote about this recently.
- I just moved. This is a great chance to start from scratch, but I also need to redo some of my configuration. Home Assistant, for example, needs to be completely reset to match the new floor plan and the devices in the new apartment.
Before jumping into anything, I want to take a moment to consider what to run on the server and how to manage it.
Software
The most exciting part for me is deciding what I want to run on the server.
UniFi Controller
This one is maybe less exciting and more necessary. I need to run the UniFi controller in my local network so that I am able to manage my devices.
DNS
I want to run my own DNS server so that I can create DNS records for local devices. For example, it's much easier to access my Synology at synology.example.com
than to remember its IP address.
Additionally, services like Pi-hole and AdGuard Home can block ads, trackers, and sometimes malware on the network level.
Home Assistant
I definitely want to run Home Assistant again to automate my home. It's an absolutely amazing tool with thousands of integrations, making it super easy to control all kinds of devices in the home.
Prometheus Stack
As a new addition, I want to run Prometheus with Grafana and Loki to monitor metrics, manage alerts, and collect logs. This is functionality that I have been missing in my current setup, and the lack of visibility into my IT operations has always bothered me.
Tailscale
Another service that I want to add is Tailscale, both for remote access to some of my services but also as a way to secure my internet connections when I am travelling. This is not very high on the priority list, though.
Others
There are more services that I find interesting, but I haven't decided if I want to actually run them in my own home. Sometimes the comfort of something like iCloud is just a bit too high, and other times the services are just not mature enough yet.
Operating System
As mentioned above, I am currently running most of my tech stack on a Synology NAS. This has worked well, but there are a few things that I am missing. Most importantly, it is very difficult to manage the server using Infrastructure-as-Code tools such as Terraform.
Over the past decade, I have learned how valuable it is to have the configuration as code and a tool that can quickly recreate the server. Software fails and hardware dies eventually. Being able to quickly restore a system is not only a luxury, it is absolutely necessary for services that I rely on.
At the same time, how software is deployed has massively changed as well. Ten years ago, Puppet, Ansible, and Chef were the tools of choice to provision a server and install software on it. Nowadays, everything is shipped as a Docker image.
For the new server, I am considering running everything in Kubernetes. The rough idea is to use Talos Linux as the operating system, install applications using Helm charts, and manage them using Terraform and its Helm provider.
Hardware
I have been considering different alternatives for the server's hardware. Ideally, I would have wanted a system with multiple disk and ECC memory for proper redundancy and safety. But I have the Synology for storage, and there are only a handful of consumer-grade systems that support ECC memory. In the end, all options were either too expensive, consumed too much energy, or were simply too loud for my small apartment.
So I decided to go with an Intel NUC. It's small, quiet, and doesn't consume much energy. Perfect for a home server.
Data will still be stored on the Synology, so redundancy in the server was not that important. And since the server is now managed with Terraform, I can easily replace its SSD, provision it again, and mount the volumes from the Synology to get the system back to its previous state.
Next up, installing Talos Linux.