← All projects

Case study — Infrastructure

Homelab

A self-hosted platform I run like production. Every structural choice is written down as a decision record: the context, the alternatives I rejected, and what the choice costs.

Role
Design, build, operate
Stack
Docker Compose · Tailscale · Cloudflare Tunnel · NGINX · restic
Hosts
Home automation, photo and media libraries, file sync, my own projects
Source
GitHub ↗

How traffic gets in

Private by default

Public
  1. Visitor
  2. Cloudflare
  3. Tunnel outbound only
  4. Web container read-only, unprivileged
Private
  1. My devices
  2. Tailscale WireGuard mesh
  3. Services

Everything I run is private unless there's a reason for it not to be. My own devices reach services over a WireGuard mesh, so the router forwards nothing to the machines that host applications or storage. The one public thing, this website, leaves through an outbound-only Cloudflare Tunnel to a single container that runs unprivileged, with a read-only filesystem and no route to anything else.

Key decisions

Why it looks like this

  1. 01

    Separate failure domains

    Application hosting and storage/media run on separate hardware. A machine going down takes only its own services with it, and the oldest hardware got the I/O-bound storage role, where its age doesn't matter.

  2. 02

    Backups a compromised host can't destroy

    Each host backs up with restic under its own encryption key to targets running in append-only mode. A compromised host can write new snapshots but can't prune history, and one host's key decrypts only that host's repositories. Pruning happens on the targets, never from the source.

    Rejected: one shared repository (one compromise exposes everything), a pull model (makes application-consistent dumps awkward), and offsite-first (would have blocked the security work behind it).

  3. 03

    Recovery point matched to the data

    Three tiers instead of one nightly job. Small, irreplaceable secrets every six hours; everything needed to rebuild the stack nightly; full system state weekly. One extra timer buys a six-hour recovery point where losing a day would actually hurt.

  4. 04

    Boring on purpose

    Docker Compose over Kubernetes, Tailscale over self-managed WireGuard. The goal is services that run quietly, not an infrastructure playground.

  5. 05

    Decisions with revisit triggers

    The network stayed on consumer mesh hardware even though it caps a 3 Gbps line at 1 Gbps, because nothing on it could use more. The decision named the conditions that would reopen it. When one fired, the replacement design started from a written record of why nothing had changed until then.

Decided against

  • One large server

    Several smaller machines are cheaper and fit the actual workloads better. Reopen if a workload genuinely needs that much single-machine compute.

  • A GPU for the storage node

    Hardware video encoding on the app host already covers transcoding. Reopen for local AI inference, argued on its own terms.

Known gap

  • No offsite copy yet

    Local replication covers drive failure and host compromise, not site loss. It's tracked on the roadmap, not deferred.