← All projects
Poka-Yoke Lab · Infrastructure

Homelab architecture

My home lab runs local AI models and gives me a safe place to test AI agents. It sits on a shared household network, so I built it as a walled-off section of that network: the lab can fail, misbehave or be switched off without touching anyone else's internet.

Segmented by role Own router as the isolation gate Local models, nothing leaves the building Offline-first builds
01

Threat model

I designed the lab around three rules.

Nothing gets in from outside

No service in the lab accepts connections from the internet, and nothing critical depends on an outside service that someone could jam or take down. If I want to reach the lab remotely, that path has to be one I build and control.

A misbehaving agent can't reach my credentials

I assume an AI agent will eventually do something I didn't intend, whether through a bug, a bad instruction or text crafted to manipulate it. So agents run where they physically can't reach the machines that hold my private credentials or the controls for the lab itself.

The household never depends on the lab

The household's internet has to keep working with the lab completely powered off. If something in the lab fails, only the lab goes dark.

02

Architecture

The lab hangs off the household router like any other device, and sits behind a router of its own. That second router is the isolation gate. It decides what can cross between the lab and the household, and between the segments inside the lab. If I unplug it, the household network doesn't notice.

Behind the gate, a managed switch splits the lab into segments by role. Management is where the admin interfaces live, and only one control machine can reach it. Lab holds the GPU inference machine, the NAS and the orchestration server. Build is a single isolated VM where an AI agent works on its own. Outbound, it can make HTTPS connections and reach the local model server. The router and the household network are blocked. Personal keeps my everyday devices apart from lab work.

Segmenting by role means a mistake in one place stays in one place. An agent in Build that goes wrong can't see the admin interfaces or the machines that hold my credentials.

03

Components by role

  • Lab gate: a router running OpenWrt. It routes and filters between the household network and each lab segment.
  • Segment carrier: a managed 802.1Q switch that carries the segments over shared cabling, so the machines in different segments stay separate on one physical switch.
  • VM host: a Proxmox server that runs isolated VMs, including the agent VM in Build. Snapshots give me a clean state to roll back to after every experiment.
  • GPU inference machine: built from used parts for about $800. It serves local models over an OpenAI-compatible API to other machines in the lab, so tools written for a cloud API can point at it instead.
  • NAS: a RAID 1 pool for data that needs redundancy, and a separate SSD pool for fast storage.
  • Lab laptop: a dedicated machine signed into lab-only accounts. My main credentials never live on it, so a problem in the lab can't reach them.
04

How I build

I build offline first. I install each machine from USB and harden it before it touches the network: firewall on, user accounts set up, SSH limited to keys, and two-factor on admin accounts. The Fedora workstation also gets full-disk encryption.

Only then does the machine connect, and updates run the moment it does. A machine is never online in its default, unhardened state, not even briefly.

05

Lesson learned

While setting up the switch, I tagged the management VLAN on the trunk port and on my admin port. That locked me out of the switch, and the only way back in was a factory reset.

The management VLAN now stays untagged on the trunk and admin ports.

06

Built vs. planned

BuiltRunning
  • Segmented managed switch
  • OpenWrt lab gate
  • Proxmox VM host
  • GPU inference machine
  • NAS
PlannedNext
  • A dedicated OPNsense firewall at the lab edge
  • Suricata intrusion detection
  • DNS and flow logging, then narrowing the agent VM's outbound HTTPS to a named-domain allowlist
  • Statistical-process-control baselines of how agents behave on the network, drawn from my industrial engineering background: learn what normal looks like, then flag when an agent drifts outside it
07

Next: agent operations with Hermes

The next phase puts an AI agent to work on the lab itself. It's planned, not built: it starts after my December finals, once the operator interfaces for Hermes are in place.

In place todayStaged

A contained starting point

  • Hermes Agent, Nous Research's open-source agent framework, is staged inside an isolated agent VM on the lab's hypervisor
  • It talks to a locally served model first
  • Paid model APIs come in only with spend caps, and only after the agent proves stable
  • Before it may move to any machine that holds real credentials, it has to pass a defined promotion gate
  • A separate oversight role watches agents for loops and runaway behavior
PlannedAfter finals

A two-lane message bus

  • Dispatch lane: Claude plans the work and hands it off, and Hermes carries it out locally, which saves frontier-model tokens for the reasoning that needs them
  • Direct lane: I can address Hermes myself for small corrections and maintenance, without going through the planner
  • Operator interfaces for Hermes come first; the agent doesn't take on lab work until they exist
  • Lab duties move to Hermes one at a time, each through the same promotion gate

The rules match the rest of the lab. An agent earns more access by passing a gate, not by default. Cheap local compute does the routine work and paid models are kept for the hard parts, which is the local-versus-API trade-off the lab exists to measure. And a person can always reach in directly. Like any new project, it waits for a free slot on the lab's board before it starts.

Interested in the design, the promotion gate or collaborating on agent operations? Email hello@pokayokelab.org for details or a walkthrough.

08

Where it's used

The same pattern is the deployment design behind Clinic Assistant, my hackathon project: a separate GPU machine serves local models, and nothing leaves the building. The lab is where I work that pattern out before I rely on it.