The goal
Run what a small team would run in a cloud account (apps, databases, secrets, sign-in, AI models, monitoring) on one desktop machine, and make adding an app a small, repeatable change.
Project case study · homelab platform
Kubernetes, GitOps, an AI gateway with local models, and an AI operator that keeps it running. Designed, built and run by David Larrimore.
Loading…
Run what a small team would run in a cloud account (apps, databases, secrets, sign-in, AI models, monitoring) on one desktop machine, and make adding an app a small, repeatable change.
One Kubernetes cluster, everything declared in Git and delivered by Argo CD, shared building blocks apps request by name, and an AI operator for routine work within narrow lanes.
The whole stack, end to end: hardware, networking, delivery, security, observability, AI infrastructure, developer experience and cost.
From the platform's daily facts: production apps and platform services together, each outage counted once. The status at the top is live.
Hover, tap or use the arrow keys to read a day.
No outage Partial outage Full outage: the public site or several apps down No data
| Day | Status | Why | Availability |
|---|
| App | Availability | Requests | Error rate |
|---|
Five views of one system, from the whole lab down to the machine it runs on.
What is the whole lab, from the people who use it to the machine it runs on?
Five layers, top to bottom. People and channels: the owner asks and approves through chat and a dashboard, and visitors reach public sites. Build, review and operate: apps are built in one of two ways that follow the same development model (spec, check, plan, build, verify): by the owner working with Claude Code, for interactive work and harder problems, or, more automated, by the homelab builder. Renovate, the coding workers and the homelab builder (an OpenClaw agent that runs unattended in OpenClaw’s VM with its own GitHub account and a team of specialist agents, turns specs checked ready, on issues the owner opened, into pull requests and never merges, deploys or releases) open pull requests on GitHub, GitHub Actions builds, tests, scans and signs images into a registry, OpenClaw reviews the pull requests it is asked to, triages alerts, merges the owner’s and the builder’s changes to dev once a review is clean and checks are green, and verifies deploys through the homelab CLI, production being only the owner’s release; reviews fall back from Codex to Claude Code to the local model, whose review is only a comment, never an approval, and MageHand is the builder’s CLI. OpenClaw evaluates routine Renovate bumps and approves them itself, and branch rules merge nothing without an approved review and green checks. Models: a ChatGPT Plus plan runs the operator, Codex and the reviews, a Claude plan runs Claude Code for the owner’s sessions, the homelab builder and the review fallback, a local Ollama model is the fallback and serves apps, and the LiteLLM gateway gives apps local and metered paid models with budgets. Platform on Kubernetes: Argo CD delivers from Git, Kyverno and Trivy enforce policy and scan, Prometheus and Grafana monitor, authentik signs users in, OpenBao and External Secrets hold secrets, and apps run in dev and production beside Postgres and Redis behind a Cloudflare tunnel and Traefik. At the bottom, one Mac Studio hosts the Kubernetes and OpenClaw virtual machines, an external drive and supervisors, with nightly backups going off-site.
Download this diagram as SVG (vector: sharp at any size)
What is the whole thing, and how does a request and a change move through it?
A visitor reaches an app through an outbound Cloudflare tunnel and the Traefik ingress; authentik handles sign-in. Apps run in dev and production; Sablier puts a dev environment nobody is using to sleep and Traefik has it woken on the next request. Argo CD deploys them from Git, Prometheus and Grafana watch them, and Kyverno and Trivy check what is admitted and scan what runs. Apps ask for building blocks: the LiteLLM gateway for models (local through Ollama, paid through providers, plus web search), Postgres, Redis, and secrets from OpenBao delivered by External Secrets.
Download this diagram as SVG (vector: sharp at any size)
How does something merged in Git end up running, and how is it kept that way?
Changes arrive as pull requests from the owner, the homelab builder and dependency bots; OpenClaw reviews the ones it is asked to and evaluates routine dependency bumps; a change merges only with an approved review and green checks, which deploys dev only; production is a release the owner makes. App code repositories feed CI, which builds, scans and signs an image into a container registry and pins its digest in the apps repository. The platform repository takes reviewed pull requests only. Argo CD, which also manages its own installation from Git, has read-only access to both repositories and generates one Application per core service and one per app and environment, with automatic sync, self-heal and prune. The cluster pulls images from the registry. Rollback is reverting a commit.
Download this diagram as SVG (vector: sharp at any size)
Where do the models run, and how do apps use local and paid ones side by side?
Apps call one LiteLLM gateway inside the cluster with a per-app key. The gateway routes to local models served by Ollama, which runs natively on the Mac Studio using the GPU and unified memory with weights on the external drive; to paid providers; and to web search. The OpenClaw orchestrator runs on subscription models and uses the local model as its fallback when its quota runs out.
Download this diagram as SVG (vector: sharp at any size)
What is the one machine, and how is it divided?
One Mac Studio runs a virtual machine with Kubernetes, a second small virtual machine with OpenClaw and its homelab builder outside the cluster it operates, and Ollama natively for the GPU (the apps’ local models, and OpenClaw’s fallback model). An external 4 TB drive holds the virtual machine disks, persistent data and model weights. Supervisors keep the virtual machines and Ollama running and do backups and host checks. The only path from the internet is a tunnel the cluster dials out, with no inbound ports.
Download this diagram as SVG (vector: sharp at any size)
An app names a block in one file; the platform provisions it and wires in the credentials.
What a team would most likely build on AWS for the same work. Dashed components would also be needed but are not priced.
What does the lab run, on one machine?
The lab: the internet reaches Traefik through an outbound tunnel; Kubernetes on one VM runs every app in dev and production; shared building blocks (gateway, databases, secrets, sign-in, monitoring) serve them; Ollama runs local models. All on one Mac Studio. Outside the lab, davidlarrimore.com runs on Railway, which supports domain-level applications that need a CDN and higher availability.
Download this diagram as SVG (vector: sharp at any size)
What would the same work need on AWS?
The most likely AWS equivalent: the internet reaches an Application Load Balancer, which routes to EC2 worker nodes in an Amazon EKS cluster, with EBS volumes for persistent storage and a model API for the tokens local models would otherwise serve. Priced in the estimate: EKS control plane, EC2, EBS, the load balancer, model tokens. Services a real build would also use but that are not priced: Secrets Manager, RDS or ElastiCache, data transfer and NAT. For davidlarrimore.com, a small Fargate container behind its own load balancer is priced, and a CDN in front of it is not.
Download this diagram as SVG (vector: sharp at any size)
| AWS service | How it is priced | Per month |
|---|
Hover, tap or use the arrow keys to read a day.
| Day | Cloud equivalent | Lab spend | Net position |
|---|
| What | What it buys | Per month |
|---|
Hardware is paid for once, instead of a control plane, nodes, volumes and a load balancer by the hour.
Open models run on the Mac’s GPU and cost only electricity.
Each app gets a key with a budget, so a runaway loop hits a ceiling, not a bill.
The tunnel dials out: no public IP, port forward or load balancer to buy or patch.