Homelab

Homelab topologyIllustrative topology connecting the internet to the router and VPS, linked by a tailnet, and the switch to the access point, NAS, Pi and NUC.tailnetinternetroutervpsswitchapnaspinuc
  • hypervisor [unknown]
  • kubernetes [unknown]
  • security [unknown]
  • storage [unknown]
  • dns [unknown]
  • git [unknown]

My mini homelab is where I run services, experiment with infrastructure and learn about security. I try to keep it small and efficient, combining Kubernetes and Docker with GitOps, monitoring and backups across a few machines at home and a VPS, all managed as code from a single repository.

The setup

routervpsswitchnucpinas

The setup combines a Proxmox host, a Raspberry Pi, a Synology NAS and a VPS. An OPNsense router, a managed switch and an access point connect the home equipment. The diagram is an illustrative overview, not a complete network map.

Managed as code

Everything lives in one Git monorepo: Ansible roles for the hosts, Docker Compose projects grouped by host, Talos machine configuration and Flux manifests for the cluster. Every change follows the same path wherever it runs: commit, push to Forgejo, and let Flux or Arcane reconcile it. Then I check health and logs, and roll back or restore if something does not recover.

Secrets are only committed encrypted with SOPS and age; the keys stay out of Git and are decrypted at deploy time. Forgejo Actions run Renovate every few hours to propose dependency and image updates, and a Trivy scan on every push that fails on critical vulnerabilities, misconfigurations or leaked secrets.

The runbooks follow the same idea: an internal docs-as-code site written in Markdown, built by CI and deployed to the cluster through Flux, so recovery steps are versioned next to the configuration they describe.

Networking and access

headscaletailnetsecure accessrouterhome networkservices

Headscale coordinates a Tailscale-compatible private network, or tailnet, connecting parts of the lab and providing remote access. OPNsense handles routing, firewall rules and network segmentation.

Caddy provides reverse proxying and HTTPS for services, while Kubernetes uses Envoy Gateway and Gateway API for application routing.

Deployments and automation

forgejofluxarcanekubernetesdocker hosts

Ansible provisions and configures hosts, while Forgejo provides Git hosting, a container registry and Actions runners for the images I build.

The Kubernetes cluster runs Talos Linux with Cilium. Flux reconciles its configuration from Git; Envoy Gateway manages ingress with a Coraza WAF running the OWASP Core Rule Set, cert-manager handles certificates, the Trivy Operator scans running workloads and VolSync handles configured persistent volume backups. Workloads include Immich, Paperless and some of my own applications.

Docker Compose runs services across several hosts. Arcane manages Git-synced projects alongside the Kubernetes setup.

Observability and security

hosts & workloadsprometheuslokiopentelemetrytempografana

Prometheus and Grafana provide metrics and dashboards. Grafana Alloy collects logs from hosts, Kubernetes, network devices and Talos; Loki stores them for search in Grafana Explore. OpenTelemetry instruments applications and sends traces to Tempo, where they can be explored in Grafana alongside metrics and logs. Wazuh remains separate for security events and endpoint monitoring.

Gatus monitors selected services both from inside the network and from the VPS, with Gotify used for notifications. A dashboard I built for the lab brings hosts, services and their health together in an inventory graph. A small private bridge forwards selected results to Healthchecks, which supplies the public status indicators on the homepage without exposing the Gatus dashboard.

Wazuh and Trivy help surface security events and vulnerability findings across parts of the environment. CrowdSec monitors suspicious activity on the VPS and applies its decisions through the firewall bouncer.

Backups and recovery

dockerkubernetesrbackupvolsyncbackup storagekopiabackblaze b2

Selected Docker data and Kubernetes volumes have backup jobs using rbackup and VolSync. Garage provides object storage, while Kopia handles additional copies, including off-site backups to Backblaze B2.

Backup coverage varies by service, and restores are an important part of the process.