A factory in the home lab
One developer's self-hosted factory, read layer by layer. What each part replaces, who it suits, and what he left unsolved.
Snapshot: December 2026
This page reads one write-up: Dmitry Kudryavtsev's Self-hosted software development factory (29 November 2026). It is one person's home setup, described honestly but with no throughput, cost or success numbers. anecdotal We summarise the ideas and judge the tools. For the how-to, read the original.
Most factories in this guide belong to companies with platform teams (Who runs one). Kudryavtsev built one for himself, on two mini PCs at home. He was running several agent VMs on his MacBook, which was getting warm and losing battery, and he wanted an always-on box he could reach over VPN and hand work to from his phone.
His rules set the shape of everything else: self-host every service, no subscriptions, no dependency on public services, nothing set up by hand, and no third-party "agent control panels", which he skipped because they are "most likely vibe-coded or VC-funded".
He then built it "99% vibe-coded", and says he would never have tried it without AI.
The loop, end to end
The work loop itself is a plain factory loop: intake from the tracker, an agent per item, CI as the verifier and a human at the merge. What makes the write-up worth reading is everything around it: how he contains agents, where the secrets live, and how the machines can be rebuilt from scratch.
Is this setup for you?
| If you… | It's a good fit because… | But note… |
|---|---|---|
| Want no subscriptions or vendor control plane | Forge, CI, deploys, DNS and monitoring all run on your own hardware, from open-source parts | You become the operator. He admits the network design "complicated things a bit" |
| Don't want code or tickets on someone else's forge | Repos, issues and CI logs never leave your network | Your code still goes to a model provider. The agents are Claude Code; nothing in the write-up is local inference (see privacy) |
| Run agents with permissions switched off | VM per project, network segments and no keys on the VM put a hard limit on what a misbehaving agent can reach | It protects your network, not your codebase. Poisoned code can still pass your review |
| Have a spare machine and like tinkering | Mini PCs are quiet, cheap to run and enough for a few agent VMs | No GPU, 32 GB of RAM, and he says RAM upgrades will "have to wait" |
| Need a team factory or many parallel agents | Not a good fit | Two custom tools hold it together and neither is published. It's a pattern to learn from, not a product |
The setup, from five angles
We don't repeat his build steps. Each angle below says what problem the layer solves, links to his section and says what you could use instead.
1. Containment: assume the agent goes rogue
His approach (Networking, Hardware and virtualization): one VM per project on Proxmox, and network segments that separate dev machines from supporting services. A dev VM only reaches the services it needs. The CI runner, which runs code downloaded from package registries, sits in its own fully isolated segment.
Why it's worth doing: a compromised agent can't scan the network for management ports. In his words, "the worst a compromised VM/Agent can do is list all other VMs in its own VLAN".
The general idea is the same one hosted sandboxes sell: a disposable machine with limited network reach (Hosts, Local and self-hosted). VLANs are the home-lab version of an egress policy. If you don't want to run network gear, Docker Sandboxes or a microVM runtime give you most of the containment with far less setup.
2. Secrets: three places agents can't reach
This is the most transferable part of the write-up. He keeps secrets out of three separate places (Git and CI/CD, Secrets):
- Out of the agent VM. API keys sit in a credential proxy on another network segment. The VM trusts the proxy's certificate, and the proxy adds the real key on the way out. An agent that skips the proxy just gets failed requests.
- Out of CI. He first deployed from CI, which meant CI secrets held SSH keys to production, and an agent could write a workflow that prints them. He moved deploys to a separate tool, triggered by a webhook when CI passes on
main. - Out of reach of agent pushes.
mainis protected and only he merges, so agents can't trigger a deploy on their own.
This is the pattern we already recommend in Operations: secrets, done by hand. The deploy split is the part people skip: if your CI can deploy, an agent with push access can probably read the deploy keys.
He's candid about the gap that remains: agents "can still slip a poisoned code that gets built into an artifact and deployed, but oh well… The world is far from perfect." See Security.
3. Control plane: the forge is the state machine
His approach (Workflow and harness): he considered building a web UI and decided "to resort to known and existing tools" instead. Work starts as a forge issue with a label (ready, then research, plan or implement stages). A small harness on each VM listens for forge webhooks, opens an agent session per issue and resumes it by the issue's ID after a crash or reboot. For a live view he uses a tmux shortcut that lists every VM and session.
Why it works: the issue tracker is already durable, has an API and a phone app, and keeps a history. This is the tracker as the control plane, the same choice OpenAI's Symphony makes with Linear. Keying sessions to issue IDs is a clean way to make agent sessions survive a machine dying.
4. Scheduled jobs: request, don't act
His approach: recurring tasks are Markdown files in the repo with a cron schedule, an idea borrowed from GitHub Agentic Workflows. Jobs run as a separate Linux user with no sudo and no forge access, on a fresh clone. They can only ask for outputs (an issue, a PR), and the harness checks the request and carries it out, with caps such as one PR and three issues per run.
Why it's smart: that is GitHub's safe outputs pattern ("the agent requests issue creation; a separate job with issues: write creates it"), rebuilt outside GitHub. He gives jobs fewer rights than issue-driven sessions because "jobs are riskier than giving an agent an issue that I wrote": one job turns new Sentry errors into agent sessions, and their text comes from outside. That's the right instinct about prompt injection through the front door. See also Standing goals.
5. Rebuildability: machines are disposable, knowledge isn't
His approach (Control center, Knowledge): a CLI on his laptop creates a VM from a template, runs cloud-init and Ansible, adds a bot user to the forge with access to the chosen repos, loads the credential proxy from his password manager and copies in his dotfiles. A nightly job re-applies dotfiles and playbooks on every VM.
Because VMs get recreated, the agent's built-in memory ("good, but it's fragile") is lost with them. So the learning moves into the repo: short notes in AGENTS.md, longer ones under docs/. That is the context as a maintained artifact lesson, arrived at by losing memory a few times (Context and memory).
The tools he picked
Our assessment of each linked tool, checked against the projects' own pages in December 2026. Licences and statuses change, so check before you adopt.
| Tool | His use | What it replaces | Our take |
|---|---|---|---|
| Proxmox VE | Hypervisor on both mini PCs | Cloud VMs, VMware ESXi | The home-lab default. Sound choice |
| Pulse | Monitoring both hosts | A Prometheus and Grafana stack | MIT, self-hosted, single binary; a paid Pro tier exists. Lighter than Grafana for a two-node lab |
| Technitium DNS Server | DNS and DHCP for the dev segment; hostnames like host.dev.example.net | Router DNS, Pi-hole, AdGuard Home, BIND, ISC or Kea DHCP | Mature (since 2017), GPL-3.0, about 10k GitHub stars, DNS and DHCP in one. It is not a peer-to-peer product: Technitium's P2P software is a separate messenger called Mesh. Sensible, not novel |
| dnsmasq (no link) | DHCP relay between segments | The router's DHCP relay, which his router lacks | A workaround for his hardware, not a design choice |
| Forgejo + runner | Git, issues, CI | GitHub, GitHub Actions | The obvious self-hosted forge (see Forges). No official agent features, so he wrote the webhook harness |
| Semaphore UI | Holds deploy keys, runs one deploy script | Deploying from CI | MIT Community edition; Pro from about $20 a month. A good way to keep deploy keys out of CI |
| agent-vault | Credential proxy for API keys | Keys in env vars on the VM | Right pattern, wrong dependency: its own README now says it "is no longer the recommended way to run Agent Vault" and points to Infisical's platform. He says he plans to replace it with a wrapper around what he spells "mtimproxy", which we read as mitmproxy (MIT, scriptable) |
| GitHub Agentic Workflows | Inspiration for Markdown jobs and output caps | GitHub's hosted runtime | Borrowed the idea, not the product. The safe-outputs model is the most valuable idea in the setup |
| Pushover | Phone alert on any failure | Paging tools | A small one-off purchase per platform, not a subscription. Fine |
His two own tools, a provisioning CLI and the webhook harness, are not published. Both look modest: a prompt that drives cloud-init and Ansible, and a webhook listener with rules. That is the real lesson: once the forge, CI and secrets proxy exist, the custom part of a home factory is small.
What worked and what didn't, by his own notes
Worked: the bot reacts to PR comments, fixes failing PR checks, opens and closes issues and runs scheduled jobs. He can queue work from a forge app on his phone and only needs the laptop to create new VMs. In his words: "I can simply schedule work for the agents and go about my day."
Tried and changed:
- Deploys from CI. Dropped, because CI secrets then held production SSH keys.
- Recurring tasks as forge issues. It "felt hacky", so he moved to job files.
- Sentry webhooks. Not possible without exposing the network through something like ngrok, so a job polls Sentry instead. That's a direct cost of the no-inbound-traffic rule.
- DHCP across segments. His router can't relay it, so he runs an extra container to do it.
Not solved yet:
- The credential proxy is deprecated upstream. The replacement is a plan ("I think my next step will be…"), not done.
- Poisoned code through an approved merge. Accepted as a risk.
- Shared knowledge across VMs. "I haven't found a use-case for it yet"; a shared knowledge repo is only an idea.
- No numbers. The write-up doesn't say how many runs succeed, how much review the PRs need or what the model usage costs. Treat "it works" as a working prototype, not a measured result.
He also still does most of his work locally on the Mac. The factory is for heavy or larger projects.
How private is it?
"No dependency on public services" holds for orchestration, not for inference. The agents are Claude Code, so prompts and code still go to a model provider. The setup also uses Sentry (his notes don't say whether it is self-hosted, though the ngrok remark suggests it can't reach his network), Pushover and a public domain for certificates.
So it fits these privacy goals:
- Good fit: you don't want your repos, issues, CI logs and deploy keys on a SaaS forge, or a vendor control plane deciding what your agents can do.
- Not enough on its own: your code must not leave the building. Then you'd also need local models, with the quality trade-offs in Model choice.
- Not the point: compliance or team access controls. It's a single-user setup with one human reviewer.
What to take from it
Even if you never buy a mini PC, five ideas carry over to any factory:
- Agents never hold keys. Inject credentials from outside the machine.
- CI can't deploy. Keep deploy keys in a separate system that only acts on a protected branch.
- Scheduled and external work gets fewer rights. Let it request outputs, and have something else check and apply them.
- Sessions are keyed to issues, so a machine can die without losing the work.
- Machines are rebuilt from code, and knowledge lives in the repo.
Read the original
- Self-hosted software development factory (Dmitry Kudryavtsev, November 2026, CC BY-NC 4.0)
- His earlier How I vibe-code, the local workflow he still uses day to day