// homelab · self-hosted · Debian

Home infrastructure

I built and run a home server on my own: an internet gateway, a dozen Docker services behind a single reverse proxy, mirrored storage and secured remote access. Everything described below runs at my home in daily use.

Linux Debian systemd Docker · Compose Traefik nftables · ufw Tailscale · WireGuard Pi-hole mdadm RAID Ansible PostgreSQL · MariaDB Prometheus · Grafana Bash
01

Infrastructure diagram

Logical layers along the path of the traffic: internet, gateway and network, reverse proxy, services, storage. Hover over or tap any block to read what it is and why it is there.

Internet · WAN

Gateway and network

Nodes and remote access

Reverse proxy

Services · Docker

Media

Cloud and data

Communications

Observability and development

Storage

02

Engineering case studies

Real problems I had to work through: what happened, what I did, what came out of it. They show how I approach troubleshooting and how I pick solutions.

Docker · systemd · storage

Docker split-brain after a reboot

Situation
After a reboot, photos and media opened up empty. Docker started before the disk array was mounted and unpacked its data onto the system disk instead of the mirror. The real files and the Docker working directory stayed on the unmounted array, and requests to the containers failed with access errors.
What I did
Narrowed it down: the daemon was keeping its data on the wrong disk. I stopped Docker carefully, confirmed the array was intact, moved the daemon back onto the mirror and brought the stack up. The root cause was boot ordering, since mounting the array was not a hard requirement for the start. I closed that off with a strict dependency of docker on the volume mount through systemd.
Outcome
The services went back to the real data. Docker now refuses to start without its own storage and fails loudly instead of silently drifting onto the system disk. That race cannot happen again.
Kubernetes · k3s

k3s: a cluster and an ImagePullBackOff investigation

Situation
I was learning orchestration and deployed a multi-node k3s cluster. When rolling out a service, the pods got stuck in ImagePullBackOff and the images would not pull.
How I tracked it down
I started from the pod events: kubectl describe pod shows which step the pull fails at and with exactly which error. From there I checked layer by layer to rule things out: whether the image pulls by hand from the node itself, whether the node reaches the registry, whether DNS answers inside the cluster. That narrowed a general rollout failure down to one specific link between the node and the registry.
What I did
Fixed the rollout at the link I found. Alongside that I compared it with Docker Compose and kept Compose for single-node production as the simpler and more predictable option.
Outcome
I understood how image pulls and the network layer work in Kubernetes. I also learned to pick tooling by the scale of the problem: where Compose is enough, a cluster only adds complexity.
mdadm · RAID · recovery

RAID 1 and recovering a wiped disk

Situation
Important data (photos, cloud storage, media) was sitting on a pair of ordinary disks and needed to survive the failure of either one. A separate story: a friend accidentally wiped a partition holding music and projects.
What I did
Assembled a software mirror on mdadm and moved the Docker data onto it. For the recovery I took a byte-level image of the disk with ddrescue, carved the files out with photorec, and honestly separated what actually came back (a couple of thousand projects and audio files) from what had already been overwritten.
Outcome
The array survives the death of one disk with no data loss. I got my friend's files back and kept the image as insurance. I also came to understand how deleting a file differs from overwriting blocks.
network · PPPoE · nftables

The server as the flat's router, with selective VPN

Situation
The stock router was hitting a speed ceiling and dropping WiFi. I wanted more throughput, all routing in one place, and part of the traffic going through a VPN for every device at once without configuring each one.
What I did
Moved routing onto the server: internet over PPPoE, NAT on nftables, with the router left as an access point only. One trap took a long time to find: ufw was silently dropping inbound GRE, so the tunnel brought up its control channel but no data flowed. I allowed the protocol in the ufw rules. Then came tuning: BBR, tunnel buffering, the CAKE shaper. For selective VPN I set up a proxy acting as a transparent gateway driven by domain lists.
Outcome
Throughput went up almost threefold, with latency under load around 4 ms. I closed SSH to the outside and left access over VPN only. I got properly comfortable with the Linux network stack: PPPoE, nftables, ufw, GRE, QoS.
03

How this page is deployed

The same way as everything else on the server: a static file in an nginx container behind Traefik. The reverse proxy picks it up from docker labels and issues the Let's Encrypt certificate itself. Changes travel over git: I commit from the laptop, and the server pulls the new version on its own.