Homelab
Over the years I’ve been experimenting with the idea of running services at home.
The core services I run are:
Server Build
I built a custom server that had enough compute to run all the services and enough hard drive capacity for my storage needs.
My main requirements are:
- Low power consumption as the server runs 24/7
- Low noise as the server is in my living room, so that rules out server fans
- Support hardware transcoding as my server will run Plex, having hardware encoding is a lot more efficient than software encoding
- High storage capacity so I can store all my media and grow the storage pool over time
Below is the hardware list, with some notes around why I picked each part:
- Intel Core i5 11500
- 6 cores, 12 threads
- Hardware transcoding for Plex
- MSG MAG B560 Torpedo motherboard
- Dual ethernet (1G, 2.5G)
- Heaps of SATA and M.2 ports
- 64GB (4x16GB) Corsair Vengeance LPX 3600MHz DDR4 RAM
- Enough RAM for running all the services I could possibly want
- 2 x Samsung 980 500GB M.2 NVMe SSD
- One for the OS, one for application data
- SilverStone 550W Strider 80+ Platinum power supply
- Platinum efficiency for reduced power consumption
Container Orchestration
I’ve experimented with a few different container orchestration platforms to find the best fit for my needs.
- I started with a simple Docker Compose script, but found it was tedious to maintain and had some shortcomings.
- I then moved to Kubernetes, which I was also learning for work at the time, which addressed a lot of the issues that I had with the previous setup, but found writing the Kubernetes manifests to be a bit verbose.
- I then moved to Nomad, which advertised itself as a simpler alternative to Kubernetes.
I paired Nomad with Docker and Consul to provide the base infrastructure used to run the applications.
Custom-built Landing Page
I built a landing page to display links to all the services.
The dashboard was built with the following technologies:
- Next.js
- Material UI
- Docker
The list of services is populated via Consul service discovery.
New services can easily be added to the dashboard by adding a service
block to the Nomad jobspec,
with the “ui” tag. Optionally a icon
metadata field can be added with a icon name from Font Awesome to be displayed on the UI.
service {
name = "miniflux"
tags = ["app", "ui"]
meta {
icon = "fa-newspaper"
}
port = "ui"
}
const test = "test";
Monitoring
Monitoring is done with Prometheus, Grafana and a handful of exporters.