Project

Homelab infrastructure

A Raspberry Pi and Docker homelab published through Cloudflare Tunnel and Zero Trust, with Tailscale for admin access and Kubernetes manifests for AKS.

Date
Status
maintained
  • Raspberry Pi
  • Docker
  • Cloudflare Tunnel
  • Cloudflare Zero Trust
  • Tailscale
  • Kubernetes
  • AKS
  • cert-manager
  • PostgreSQL

What it does

A small self-hosted platform for running my own automation and tools, built to the same rules I’d want at work: nothing exposed to the internet directly, every public service behind an identity check, and admin access over a private network only.

  • Raspberry Pi with Docker runs the services: n8n, a self-hosted password manager and supporting containers.
  • Cloudflare Tunnel publishes services without opening any inbound ports on the home router.
  • Cloudflare Zero Trust (Access) puts an identity check in front of every published service. Machine-to-machine calls use scoped service tokens, so one leaked token can’t reach everything.
  • Tailscale provides admin access (SSH and dashboards) over a private mesh network.
  • Kubernetes manifests for AKS describe the same kind of workload for a managed cluster: nginx ingress, cert-manager for TLS certificates and PostgreSQL.

Architecture

Homelab architecturePublic requests pass through Cloudflare Access and a Cloudflare Tunnel to Docker services on a Raspberry Pi. Admin access uses Tailscale. Separate Kubernetes manifests target AKS.Kubernetes manifests / AKSRaspberry Pi / Dockeroutbound-only tunnelTailscale meshTLS certsInternet userCloudflareedgeZero TrustAccesscloudflaredn8nPasswordmanagerAdmin deviceingress-nginxWorkloadscert-managerPostgreSQL

Stack

  • Raspberry Pi, Docker Compose
  • Cloudflare Tunnel, Cloudflare Zero Trust (Access)
  • Tailscale
  • n8n, self-hosted password manager
  • Kubernetes (AKS), ingress-nginx, cert-manager, PostgreSQL

Demo

Repo

View the repository on GitHub

Next steps

  • Automated, tested backups with a documented restore drill.
  • Move the Docker services to the Kubernetes manifests so home and cloud run the same definitions.
  • Health checks that alert from outside the network, so a dead host is noticed even when it can’t report itself.