Project case study · homelab platform

A homelab built like a small cloud 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…

The lab, layer by layer An illustration of the lab as a stack: one Mac Studio at the bottom; on it, virtual machines for Kubernetes and OpenClaw with Ollama running natively; above them the platform services; and the apps on top. The only path to the internet is a tunnel the cluster dials out. LAB · STATUS Internettunnel out, no inbound ports AppsBuilt on the platformPlatformGitOps, AI gateway, sign-inVirtual machinesKubernetes · OpenClawMac StudioApple silicon

At a glance

Project overview

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.

The approach

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.

What it shows

The whole stack, end to end: hardware, networking, delivery, security, observability, AI infrastructure, developer experience and cost.

Availability

From the platform's daily facts: production apps and platform services together, each outage counted once. The status at the top is live.

Architecture

Five views of one system, from the whole lab down to the machine it runs on.

The lab on one page

What is the whole lab, from the people who use it 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.People and channelsBuild, review and operateModelsPlatform on KubernetesOne Mac Studio, plus a few hosted servicesrequests and approvalsmodel callsapps use the gatewayruns ondeploysadmissionOwner: The one person who decides what ships and approves what the operator proposes. For interactive work and harder problems the owner builds with Claude Code; the homelab builder takes the rest. Both follow the same development model: spec, check, plan, build, verify.Ownerdecides and approvesChat and dashboard: How the owner talks to OpenClaw and receives its alerts and daily briefing.Chat and dashboardask, approve, get alertsVisitors: Anyone on the internet, reaching only the hostnames the owner has made public.Visitorspublic sites onlyRenovate: A hosted app that opens pull requests for outdated dependencies and chart versions. Limits: Free. OpenClaw evaluates routine bumps and approves them itself; anything riskier waits for a written evaluation.Renovatedependency pull requestsGitHub: The source of truth: the apps repo, the platform repo and one repo per app. Branch rules let a change merge only with an approved review and green checks. Limits: Part of the GitHub Pro plan.GitHubrepos, PRs, rulesetsGitHub Actions: CI for every pull request: tests, platform checks, security scans, a browser check, and signed container images. Limits: Part of the GitHub Pro plan, with extra minutes billed as used.GitHub Actionsbuild, test, scan, signOpenClaw: Reviews the pull requests it is asked to, merges the owner’s and the homelab builder’s once a review is clean and every check is green (which deploys dev only), verifies deploys and triages alerts, working through GitHub and the homelab CLI. Production is only ever the owner’s release. Limits: Runs in its own VM; every lane has an explicit access policy.OpenClawAI operatorCodex · Claude Code: Codex writes backend and infrastructure code and runs the code reviews; Claude Code writes the front end and reviews UI screenshots. Limits: Each is capped at two fix rounds per task.Codex · Claude Codecoding workershomelab CLI: The operator’s toolbox for pull requests, apps, Argo CD, alerts, security findings and the host. Limits: Installed read-only.homelab CLItested commandsHomelab builder: An OpenClaw agent that runs unattended in OpenClaw’s VM with its own GitHub account: the more automated of the two ways an app gets built (the other is the owner working with Claude Code, for interactive work and harder problems). Both follow the same development model: spec, check, plan, build, verify. It takes app issues whose spec was checked ready and builds each into a pull request with a team of specialist agents (architecture, front end, back end, platform, testing, self-review), then hands it to OpenClaw’s review. Limits: Never merges, deploys or releases; it builds only issues the owner opened.HBHomelab builderspecs into pull requestsMageHand: The developer CLI used on the owner’s laptop and in OpenClaw’s VM: platform guide, local runs, checks. Limits: Never deploys; changes go through pull requests.MageHandthe builder’s CLIContainer registry: Stores the images CI builds, signed keylessly with Sigstore.Container registrysigned imagesCode review: Reviews a pull request against the repository’s written rules once checks are green. When a reviewer is out of quota it falls back from Codex to Claude Code, then to the local model. Limits: Approves only a clean review of the owner’s or the builder’s change; a local model’s review is only a comment, never an approval.Code reviewCodex, with fallbacksDev and prod deploys: Merging deploys dev by itself; only the owner’s release deploys production. Limits: Production needs the owner.Dev and prod deploysdev on merge, prod on releaseChatGPT Plus: A flat-rate subscription that runs OpenClaw’s own model, the Codex coding worker and the code reviews. Limits: Quota-limited; when a window runs out OpenClaw falls back to a local model.ChatGPT Plusorchestrator, Codex, reviewsClaude plan: A flat-rate subscription for Claude Code: the owner’s sessions, the homelab builder’s runs and the code reviews’ fallback. Limits: Quota-limited like the ChatGPT plan.Claude planClaude Code, the builderOllama: Open-source models running natively on the Mac: the operator’s fallback and the models apps use. Limits: Bounded by one machine’s memory.Ollamalocal fallback, appsLiteLLM gateway: One endpoint for every app: local models, paid models and web search, with a key and budget each. Limits: Apps hold no provider keys.LLLiteLLM gatewaykeys and budgets for appsOpenAI · Anthropic APIs: Paid models for apps that need them, billed by use. Limits: Capped by each app’s budget.OpenAI · Anthropic APIsmetered, per-app budgetsArgo CD: Applies what Git declares and heals drift.Argo CDGitOps deliveryKyverno · Trivy: Admission policies refuse workloads that break the rules; Trivy scans running images daily.Kyverno · Trivyadmission, scansPrometheus · Grafana: Metrics, dashboards and alerts for the cluster, apps and host.Prometheus · Grafanametrics, alertsauthentik: One identity provider; apps read the signed-in user from headers.authentiksign-inOpenBao · External Secrets: The vault, and the controller that delivers each secret to the one namespace allowed to read it.OBOpenBao · External Secretsvault and deliveryApps: The things built on the platform, each a repository and a short deploy file. Limits: Only building blocks they ask for by name.Appseach in dev and productionPostgres: Databases created on request.PostgresdatabasesRedis: A managed cache.RediscacheCloudflare Tunnel · Traefik: The cluster dials out through the tunnel; Traefik routes by hostname. Limits: A hostname is public only if listed and reviewed.Cloudflare Tunnel · Traefikpublic edge, no inbound portsKubernetes VM: A virtual machine running the cluster and everything on it.Kubernetes VMingress, DNS, storageOpenClaw VM: A second, small VM for the AI operator, kept apart so it still works when the cluster does not, and the homelab builder.OpenClaw VMoutside the clusterExternal 4 TB drive: Holds the VM disks, persistent data and the model files.External 4 TB driveVM disks, model weightsSupervisors: macOS services that restart the VMs and Ollama and run backups and host checks.Supervisorsrestarts, backups, checksOff-site backups: Nightly backups to off-site object storage. Limits: Cloudflare’s free tier.Off-site backupsnightly, object storage

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 each component is, and its limits
Owner
The one person who decides what ships and approves what the operator proposes. For interactive work and harder problems the owner builds with Claude Code; the homelab builder takes the rest. Both follow the same development model: spec, check, plan, build, verify.
Chat and dashboard
How the owner talks to OpenClaw and receives its alerts and daily briefing.
Visitors
Anyone on the internet, reaching only the hostnames the owner has made public.
Renovate
A hosted app that opens pull requests for outdated dependencies and chart versions. Limits: Free. OpenClaw evaluates routine bumps and approves them itself; anything riskier waits for a written evaluation.
GitHub
The source of truth: the apps repo, the platform repo and one repo per app. Branch rules let a change merge only with an approved review and green checks. Limits: Part of the GitHub Pro plan.
GitHub Actions
CI for every pull request: tests, platform checks, security scans, a browser check, and signed container images. Limits: Part of the GitHub Pro plan, with extra minutes billed as used.
OpenClaw
Reviews the pull requests it is asked to, merges the owner’s and the homelab builder’s once a review is clean and every check is green (which deploys dev only), verifies deploys and triages alerts, working through GitHub and the homelab CLI. Production is only ever the owner’s release. Limits: Runs in its own VM; every lane has an explicit access policy.
Codex · Claude Code
Codex writes backend and infrastructure code and runs the code reviews; Claude Code writes the front end and reviews UI screenshots. Limits: Each is capped at two fix rounds per task.
homelab CLI
The operator’s toolbox for pull requests, apps, Argo CD, alerts, security findings and the host. Limits: Installed read-only.
Homelab builder
An OpenClaw agent that runs unattended in OpenClaw’s VM with its own GitHub account: the more automated of the two ways an app gets built (the other is the owner working with Claude Code, for interactive work and harder problems). Both follow the same development model: spec, check, plan, build, verify. It takes app issues whose spec was checked ready and builds each into a pull request with a team of specialist agents (architecture, front end, back end, platform, testing, self-review), then hands it to OpenClaw’s review. Limits: Never merges, deploys or releases; it builds only issues the owner opened.
MageHand
The developer CLI used on the owner’s laptop and in OpenClaw’s VM: platform guide, local runs, checks. Limits: Never deploys; changes go through pull requests.
Container registry
Stores the images CI builds, signed keylessly with Sigstore.
Code review
Reviews a pull request against the repository’s written rules once checks are green. When a reviewer is out of quota it falls back from Codex to Claude Code, then to the local model. Limits: Approves only a clean review of the owner’s or the builder’s change; a local model’s review is only a comment, never an approval.
Dev and prod deploys
Merging deploys dev by itself; only the owner’s release deploys production. Limits: Production needs the owner.
ChatGPT Plus
A flat-rate subscription that runs OpenClaw’s own model, the Codex coding worker and the code reviews. Limits: Quota-limited; when a window runs out OpenClaw falls back to a local model.
Claude plan
A flat-rate subscription for Claude Code: the owner’s sessions, the homelab builder’s runs and the code reviews’ fallback. Limits: Quota-limited like the ChatGPT plan.
Ollama
Open-source models running natively on the Mac: the operator’s fallback and the models apps use. Limits: Bounded by one machine’s memory.
LiteLLM gateway
One endpoint for every app: local models, paid models and web search, with a key and budget each. Limits: Apps hold no provider keys.
OpenAI · Anthropic APIs
Paid models for apps that need them, billed by use. Limits: Capped by each app’s budget.
Argo CD
Applies what Git declares and heals drift.
Kyverno · Trivy
Admission policies refuse workloads that break the rules; Trivy scans running images daily.
Prometheus · Grafana
Metrics, dashboards and alerts for the cluster, apps and host.
authentik
One identity provider; apps read the signed-in user from headers.
OpenBao · External Secrets
The vault, and the controller that delivers each secret to the one namespace allowed to read it.
Apps
The things built on the platform, each a repository and a short deploy file. Limits: Only building blocks they ask for by name.
Postgres
Databases created on request.
Redis
A managed cache.
Cloudflare Tunnel · Traefik
The cluster dials out through the tunnel; Traefik routes by hostname. Limits: A hostname is public only if listed and reviewed.
Kubernetes VM
A virtual machine running the cluster and everything on it.
OpenClaw VM
A second, small VM for the AI operator, kept apart so it still works when the cluster does not, and the homelab builder.
External 4 TB drive
Holds the VM disks, persistent data and the model files.
Supervisors
macOS services that restart the VMs and Ollama and run backups and host checks.
Off-site backups
Nightly backups to off-site object storage. Limits: Cloudflare’s free tier.

The platform

What is the whole thing, and how does a request and a change move through it?

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.sign-inasleep?wakes devwatchesdeploysmodel callssecretslocalpaidVisitor: Anyone on the internet, reaching a public app over HTTPS. Limits: Only hostnames the platform allows are public.Visitorany browserCloudflare Tunnel: The public edge. The cluster dials out to it, so there is no public IP, port forward or load balancer at home. Limits: Public sites have identity headers stripped before they reach an app.Cloudflare Tunneldialled out, no inbound portsTraefik: Routes each hostname to the right app and terminates TLS.Traefikingressauthentik: One identity provider. Apps receive the signed-in user in request headers and never build their own login. Limits: Public sites have its identity headers stripped.authentiksign-inSablier: Stops a dev environment nobody has opened for two hours, its database and cache included, and starts it again on the next signed-in request, which sees a short waiting page. Limits: Only dev. Production never sleeps, and Sablier can change nothing outside the dev environments.SBSabliersleep for idle dev appsApps: The things built on the platform. Each is a repository and a short deploy file; every app runs in a dev and a production environment. A dev environment sleeps when idle and wakes on a request; production is always on. Limits: Apps only use building blocks they ask for by name, and only models their configuration lists.Appseach in dev and productionPrometheus + Grafana: Collects metrics from the cluster and every app, draws dashboards and raises alerts. This page’s daily facts come from the same data. Limits: Read-only observer.Prometheus + Grafanametrics and alertsArgo CD: Reconciles the cluster to what Git says, continuously, and corrects drift. Limits: Production releases need the owner.Argo CDdeploys from GitLiteLLM gateway: One endpoint for every model. Each app has its own key and budget; the gateway routes to local or paid models and to web search. Limits: Apps cannot call a provider directly.LLLiteLLM gatewaykeys and budgetsPostgres: Databases created on request, with credentials delivered as secrets.PostgresdatabasesRedis: A managed cache for sessions, queues and rate limits.RediscacheOpenBao: The vault, and the controller that delivers secrets into pods as they are needed. Limits: Secrets are generated by the platform and never pasted into a repository.OBOpenBao+ External SecretsKyverno + Trivy: Kyverno refuses workloads that break the rules at admission; Trivy scans running images for known vulnerabilities.Kyverno + Trivypolicy and scansOllama: Open-source models running natively on the Mac, using the GPU and unified memory directly. Limits: Bounded by one machine’s memory.Ollamalocal models on the GPUPaid models: Commercial model providers, reached only through the gateway when a task needs them. Limits: Counted separately from local use.Paid modelsOpenAI, AnthropicWeb search: Search for apps that need current information, through the gateway.EXWeb searchExa

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)

What each component is, and its limits
Visitor
Anyone on the internet, reaching a public app over HTTPS. Limits: Only hostnames the platform allows are public.
Cloudflare Tunnel
The public edge. The cluster dials out to it, so there is no public IP, port forward or load balancer at home. Limits: Public sites have identity headers stripped before they reach an app.
Traefik
Routes each hostname to the right app and terminates TLS.
authentik
One identity provider. Apps receive the signed-in user in request headers and never build their own login. Limits: Public sites have its identity headers stripped.
Sablier
Stops a dev environment nobody has opened for two hours, its database and cache included, and starts it again on the next signed-in request, which sees a short waiting page. Limits: Only dev. Production never sleeps, and Sablier can change nothing outside the dev environments.
Apps
The things built on the platform. Each is a repository and a short deploy file; every app runs in a dev and a production environment. A dev environment sleeps when idle and wakes on a request; production is always on. Limits: Apps only use building blocks they ask for by name, and only models their configuration lists.
Prometheus + Grafana
Collects metrics from the cluster and every app, draws dashboards and raises alerts. This page’s daily facts come from the same data. Limits: Read-only observer.
Argo CD
Reconciles the cluster to what Git says, continuously, and corrects drift. Limits: Production releases need the owner.
LiteLLM gateway
One endpoint for every model. Each app has its own key and budget; the gateway routes to local or paid models and to web search. Limits: Apps cannot call a provider directly.
Postgres
Databases created on request, with credentials delivered as secrets.
Redis
A managed cache for sessions, queues and rate limits.
OpenBao
The vault, and the controller that delivers secrets into pods as they are needed. Limits: Secrets are generated by the platform and never pasted into a repository.
Kyverno + Trivy
Kyverno refuses workloads that break the rules at admission; Trivy scans running images for known vulnerabilities.
Ollama
Open-source models running natively on the Mac, using the GPU and unified memory directly. Limits: Bounded by one machine’s memory.
Paid models
Commercial model providers, reached only through the gateway when a task needs them. Limits: Counted separately from local use.
Web search
Search for apps that need current information, through the gateway.

From commit to running

How does something merged in Git end up running, and how is it kept that way?

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.GitHubKubernetes clusterPRspins digestpushesreadsreadsimage pulledPull requests: Changes arrive as pull requests: the owner’s (written with Claude Code), the homelab builder’s from specs checked ready, and the 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. Limits: Production is a release the owner makes.Pull requestsowner, builder, botsApp code repos: Where each app’s code lives, with its tests and a deploy folder.App code reposone per appCI: Runs the tests, builds the image, scans it and signs it.CIbuild, scan, signApps repo: The record of what runs: one folder per app, with the image digest CI pinned. Limits: The AI operator may change and merge here.Apps repoone folder per appPlatform repo: The cluster’s own configuration: core services, policies, the edge. Limits: Changes need a reviewed pull request with green checks; OpenClaw merges only a clean review of the owner’s own change.Platform reporeviewed PRs onlyContainer registry: Stores the signed images the cluster pulls.Container registrysigned imagesArgo CD: Compares Git with the cluster continuously, applies the difference and heals drift. It manages its own installation from Git too. Limits: Read-only on both repos. Rollback is a git revert.Argo CDread-only access to both reposCore services: Monitoring, identity, secrets, policy and the rest, each its own Application with auto-sync, self-heal and prune.Core servicesone Application eachApps × environments: One Application for every app and environment, generated from the apps repo so a new folder becomes a new deployment. Limits: Production is deployed by a release the owner makes.Apps × environmentsgenerated from apps repo

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)

What each component is, and its limits
Pull requests
Changes arrive as pull requests: the owner’s (written with Claude Code), the homelab builder’s from specs checked ready, and the 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. Limits: Production is a release the owner makes.
App code repos
Where each app’s code lives, with its tests and a deploy folder.
CI
Runs the tests, builds the image, scans it and signs it.
Apps repo
The record of what runs: one folder per app, with the image digest CI pinned. Limits: The AI operator may change and merge here.
Platform repo
The cluster’s own configuration: core services, policies, the edge. Limits: Changes need a reviewed pull request with green checks; OpenClaw merges only a clean review of the owner’s own change.
Container registry
Stores the signed images the cluster pulls.
Argo CD
Compares Git with the cluster continuously, applies the difference and heals drift. It manages its own installation from Git too. Limits: Read-only on both repos. Rollback is a git revert.
Core services
Monitoring, identity, secrets, policy and the rest, each its own Application with auto-sync, self-heal and prune.
Apps × environments
One Application for every app and environment, generated from the apps repo so a new folder becomes a new deployment. Limits: Production is deployed by a release the owner makes.

AI and models

Where do the models run, and how do apps use local and paid ones side by side?

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.In the clusterMac Studioper-app keylocal modelspaid modelsweb searchfallback modelApps: Anything on the platform that needs a model. Limits: Only models named in the app’s configuration.Appsa key and budget eachLiteLLM gateway: The single front door for models and search. Meters every request, enforces each app’s budget and records local against paid use. Limits: No app holds a provider key.LLLiteLLM gatewayper-app keys and budgetsOpenClaw: The AI operator. It runs on the owner’s subscription models and falls back to a local open-source model when its plan’s quota runs out. Limits: Runs outside the cluster.OpenClawthe AI operatorOllama: Serves open-source models directly on the Mac. Running natively, not in a container, gives it the GPU and all the memory. Limits: Capacity is one machine’s memory.Ollamanative: GPU, unified memoryModel weights: Model files, kept on the external drive so the internal disk is left for the system.Model weightsexternal 4 TB drivePaid models: Commercial models, used when a task needs more than the local ones offer. Limits: Counted, not valued, on this page: the model behind each request is not published.Paid modelsOpenAI, AnthropicWeb search: Search results for apps that need them.EXWeb searchExa

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 each component is, and its limits
Apps
Anything on the platform that needs a model. Limits: Only models named in the app’s configuration.
LiteLLM gateway
The single front door for models and search. Meters every request, enforces each app’s budget and records local against paid use. Limits: No app holds a provider key.
OpenClaw
The AI operator. It runs on the owner’s subscription models and falls back to a local open-source model when its plan’s quota runs out. Limits: Runs outside the cluster.
Ollama
Serves open-source models directly on the Mac. Running natively, not in a container, gives it the GPU and all the memory. Limits: Capacity is one machine’s memory.
Model weights
Model files, kept on the external drive so the internal disk is left for the system.
Paid models
Commercial models, used when a task needs more than the local ones offer. Limits: Counted, not valued, on this page: the model behind each request is not published.
Web search
Search results for apps that need them.

The host

What is the one machine, and how is it divided?

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.Mac Studio (macOS, Apple silicon)External 4 TB drivetunnel dialled outmodel gatewayfallback modelread-only APIkeeps runningInternet: Visitors and the services the lab calls out to.InternetKubernetes VM: A virtual machine running the cluster and everything on it. Limits: The VM’s share of the machine is what the cost model prices as one node.Kubernetes VMingress, DNS, storageOpenClaw VM: A second, small VM for the AI operator, kept apart so it still works when the cluster does not. It also runs the homelab builder, which writes app code into pull requests. Limits: Reaches the cluster only through read-only and narrow lanes.OpenClaw VMoperator and builderOllama: Runs on the Mac itself, not in a VM, so models use the GPU and all of the memory.Ollamanative: GPU, unified memoryVM disks: Where the virtual machines and the apps’ persistent volumes live.VM disksand persistent dataModel weights: The open-source model files.Model weightsSupervisors: macOS services that restart what stops and do the backups and checks on the host.Supervisorskeep VMs and Ollama upbackups, host checks

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)

What each component is, and its limits
Internet
Visitors and the services the lab calls out to.
Kubernetes VM
A virtual machine running the cluster and everything on it. Limits: The VM’s share of the machine is what the cost model prices as one node.
OpenClaw VM
A second, small VM for the AI operator, kept apart so it still works when the cluster does not. It also runs the homelab builder, which writes app code into pull requests. Limits: Reaches the cluster only through read-only and narrow lanes.
Ollama
Runs on the Mac itself, not in a VM, so models use the GPU and all of the memory.
VM disks
Where the virtual machines and the apps’ persistent volumes live.
Model weights
The open-source model files.
Supervisors
macOS services that restart what stops and do the backups and checks on the host.

Common services every app gets

An app names a block in one file; the platform provisions it and wires in the credentials.

Platform components and their health now

Apps running on it