Back to main site
grug@proxmox:~$ cat /etc/homelab/README

Home Lab.

A look at the infrastructure, automation, and tooling behind the home lab.

3 nodes online
Tailscale mesh active
All containers healthy

Architecture Overview

The lab is split across three locations, stitched together with Tailscale so everything talks to everything regardless of where it physically lives.

Local · Hypervisor

Proxmox Host

Local hardware running a Proxmox hypervisor. Debian VMs handle everything from the AI assistant to dev environments. Backups to local NAS storage.

Tailscale
Remote · Public

Toolbox Server

Hostinger VPS running all the public-facing sites. Docker containers managed by Portainer, fronted by Nginx Proxy Manager with wildcard SSL.

Local · Storage

NAS (Portainer)

Asustor NAS running Portainer for home-side containers: VPN services, media management, monitoring, and internal tools.

Tailscale Mesh - Connects all three locations plus mobile devices into one flat network. SSH, web UIs, API calls - everything goes over the mesh. No port forwarding, no VPN configs, no drama.

Tailscale Everywhere

Tailscale is the backbone of the whole operation. Every node in the lab sits on a Tailscale mesh, which means everything can reach everything over encrypted WireGuard tunnels - regardless of physical location or NAT situation.

SSH Access

All administration happens over Tailscale. The Proxmox host, NAS, and toolbox VPS are all reachable by Tailscale hostname. No public SSH ports, no bastion hosts.

Backups

The toolbox VPS backs up over Tailscale directly to the Asustor NAS at home. Cloud data lands on local storage without ever touching the public internet.

Portainer Management

Both Portainer instances (NAS and toolbox) are accessible via Tailscale URLs. One mesh, two container hosts, single pane of glass from anywhere.

Nginx Proxy Manager

The NPM admin UI on the toolbox server is only exposed over Tailscale. Public traffic hits the proxy hosts; management stays private.

AI Operations

Bob (ai-lab) on the Proxmox VM reaches the toolbox server and NAS over Tailscale to manage containers, run scheduled jobs, and pull data.

Mobile Access

Phone and laptop on the mesh too. Full access to every management UI, every service, from anywhere.

The result: zero publicly exposed management interfaces, zero port forwarding rules. I can manage the whole lab from a coffee shop the same way I do from home. Hard to go back to OpenVPN after this.

The Deploy Pipeline

This is the part I'm most proud of. Spinning up a new site takes about 10 minutes, and deploying changes is just git push.

Git Push
push to main
Webhook
GitHub → Portainer
Build
docker image
Deploy
container swap
Live
SSL via NPM

Every project lives in its own GitHub repo with a Dockerfile. Most are framework-based applications - Next.js, TypeScript, Drizzle ORM, databases - with a few simpler static sites in the mix. The deploy pipeline doesn't care. Portainer stacks on the Toolbox server point at the GitHub repos. Push to main → GitHub sends a webhook to Portainer → Portainer pulls the latest, rebuilds the image, and redeploys the container. Nginx Proxy Manager handles SSL termination and routes traffic to the right container. Wildcard DNS points at the VPS, so adding a new subdomain is just creating a proxy host entry in NPM.

The complexity of each project varies, but the pipeline is the same: create a repo, add a Dockerfile, create a Portainer stack, add a proxy host. Done. Live on the internet with SSL.

Similar CI/CD patterns as production - automated builds triggered by code changes, immutable container deployments, SSL everywhere - but with simpler tooling, less resiliency, and no observability stack. It's a great place to experiment with deployment workflows without the overhead of a full production setup.

AI-Powered Operations

I built my own AI orchestrator in Go that wraps the Claude Code CLI as a subprocess. His name is Bob. He runs on a Proxmox VM and has full access to every server on the Tailscale mesh.

Discord DM Interface

I talk to Bob through Discord DMs. He runs a long-lived Claude Code session with streaming I/O, so it's a real conversation - not fire-and-forget prompts. He can SSH into servers, hit APIs, manage containers, whatever the task needs.

Cron Scheduler

Built-in cron system backed by SQLite. Each job gets its own prompt, model selection (Opus for chat, Sonnet for scheduled work), budget cap, tool restrictions, retry logic, and Discord alerts on failure. Jobs run as one-shot Claude Code subprocesses.

HTMX Dashboard

Web UI with real-time SSE activity feed, conversation history, cron job management, run logs with cost tracking, and a live editor for Bob's personality file (SOUL.md).

Claude Code Under the Hood

Not an API wrapper - Bob spawns actual Claude Code CLI processes. That means he gets all of Claude Code's built-in tools (filesystem, git, shell, web search) for free without reimplementing anything.

Persistent Memory

Uses claude-mem for memory that persists across sessions. Conversation history and cron run logs are stored in SQLite. Bob remembers what he's done and what's happened.

The whole thing is a single Go binary with embedded templates and migrations. Deployed as a systemd service on Debian. Source: mago0/ai-lab

The Stack

Everything running in the lab, at a glance:

Compute & Virtualization
Proxmox VE Hypervisor / VM management
Debian VM operating system of choice
Docker Container runtime everywhere
Networking & Security
Tailscale Mesh VPN / zero-config networking
Nginx Proxy Manager Reverse proxy + SSL termination
Let's Encrypt Wildcard SSL certificates
Management & Automation
Portainer Multi-host container management
ai-lab (Bob) Go orchestrator wrapping Claude Code CLI
GitHub Source control + webhook triggers
Hardware & Services
Asustor NAS Storage + home container host
Hostinger VPS Public-facing server (Toolbox)
Discord Command & notification interface