Recently, I have described my vibe-coding setup, and I mentioned there how my MacBook is getting warmer and no longer holding the battery, now that I run a bunch of VMs on it. In that article, I stated that it would be chill to buy a device that volition be at home, to which I can VPN from my laptop and detect my armed forces or LLM agents who do the activity for me 24/7. Well, I’m glad to say that I have achieved that.
In this part I would akin to depict what have I made, and how it works. With the advent of AI summarization tools, I accept that not many humans volition peruse this, so I conjecture my chief logic for penning this to try to comprehend myself what have I done and how it works, but additionally motivate others who motionless akin to peruse individual generated content, to perchance experiment.
AI is awesome for doing risky experiments, but at the identical period I do see the downsides in the fact that group no longer consume individual written content, and all blog article is scraped a thousand times, shredded into tokens, and fed rear to users through “AI Overview”. You can inspect out my another blog article concerning my AI bipolar disorder: I think I have AIpolar disorder.
Lastly, this part volition be divided into sections that build from the dirt up, starting alongside hardware, moving to networking, virtualization, software, and harness. Feel liberated to skip/skim any division that is not applicable or engaging for you. Enjoy your reading.
Goals and motivation#
As I stated earlier, my chief goal was to get activity off my laptop into an always-on device at residence to which I can VPN from anywhere. This device would run virtual machines (a VM per project) which volition run agentic harnesses akin Claude code (with an choice to develop to additional harnesses). Everything needs to be as secluded as possible, and uncomplicated to recreate in case of a VM killed by misbehaving. This method zero setup by hand, and as much automation as possible.
On top of that, all assistance I use needs to be self-hosted. No dependency on community services, no subscriptions. Aside for tradition harness and control, there have to be no tradition app, and the setup should reuse existing services as much as possible.
There are many assorted authority panels for agents developed by assorted people. I explicitly decided against using these since they are most apt vibe-coded or VC-funded. I had the time, and my own vibe-coding abilities, to create item that plant for me, fairly than construction my workflow about a tool by several YouTube influencer.
Hardware and virtualization#
At the center of everything lays a refurbished Dell Optiplex Micro 7010 alongside 13th Gen Intel Core i5-13500T, and 32 GB of RAM. I tried to discover i7, but couldn’t discover any in the Micro chassis. And 32GB already costed me a hefty amount, so 64GB volition have to delay for several period in the future. I wanted a Micro chassis since it’s small, quiet, and low on power consumption. It runs Proxmox as basis OS. Since I already owned a Lenovo ThinkCentre Tiny, which additionally runs Proxmox, I opted for Proxmox datacenter director to oversee the two hosts alongside pulse to detect both.
Networking#
I had a lengthy conversation alongside myself whether I should put everything in one VLAN or distinct services from dev machines, and ultimately decided on the latter. Every supporting assistance (git, CI/CD, and others; additional on them in the next section) run in their own VLAN which is divided from the VLAN anywhere dev machines run. There are small holes that authorize dev machines to conversation to the needed services, but ultimately, a rouge AI delegate can’t scan the complete network and discover administration ports for my CI/CD services or item else. The worst a compromised VM/Agent can do is catalog all another VMs in its own VLAN, and perchance admission the dev web type of any the dev device is running. This complex things a bit, particularly about DNS and a bunch of holes in VLAN ACLs, but it is a cleaner separation.
For your convenience, going further, I volition call the VLAN that hosts services srv and the VLAN that runs the dev machines dev.
Services#
DNS and DHCP#
First, I bought a domain. This allows me to get SSL certificates, and rids me of the necessity to recall a bunch of IPs.
Then, inner srv VLAN I run Technitium which is a ray DNS and DHCP server. Technitium is liable for resolving inner domains, as fine as creating a “Magic DNS” for all new dev machine. I wanted all new dev device alongside a presenter name of presenter to get a domain under *.dev.[domain].net so it becomes [host].dev.[domain].net. Technitium is set up as the DHCP server for the dev VLAN. When a dev device boots, it advertises its presenter name to Technitium, and it creates a DNS document for it.
However, there is one issue alongside this approach. DHCP requests are broadcasts, and broadcasts can’t cross VLAN boundary. This is normally solved by a built-in DHCP relay on the Router, by quarry does not have it, so I had to run a small LXC in dev to act as a relay. dnsmasq acts as the DHCP relay between dev and srv.
Git and CI/CD#
I self-host Forgejo as my git repository and UI. I additionally self-host the Forgejo runner that runs the jobs. The runner really sits in a entirely distinct VLAN, which is entirely secluded from the remainder of the VLANs (except for a small tiny gap to attain out to Forgejo case to enroll itself). The logic I did it this way is that runner runs a bunch of code that is downloaded from the net and bundle repositories. I didn’t desire the hazard of the runner getting compromised to hazard the remainder of my network.
In Forgejo I use Forgejo actions (which are akin GitHub Actions) in command to inspect my code. I used to run deploys via Forgejo actions as well, but this meant that Forgejo secrets had personal SSH keys to manufacturing servers. main branch is continually protected, and deploys happen lone from chief (after I assessment and approve), but an delegate operating in a dev VM could motionless create a workflow that dumps all the secrets (including personal SSH keys), and afterward onward it to whoever instructed it to do so. For this reason, I had to move deploys to Semaphore UI. Semaphore holds the personal keys, and it lone deploys using a tradition deploy script, from a webhook from Forgejo run that completed in main. Since agents can’t shove to main, and everything that goes into chief is reviewed and approved by me, agents do not have admission to secrets in Semaphore. They can motionless stumble a poisoned code that gets built into an relic and deployed, but oh well… The earth is far from perfect.
Secrets and surroundings variables#
Last, but not least, are API keys and item alternatively that the delegate should not have admission to. I opted to operating agent-vault by Infisical to act as a proxy that clasp the API keys and another secrets, so agents never have admission to them. During the first set up (more on that later), I create and populate a vault for all dev VM alongside the applicable secrets, and set up the CA certificates on the machine, so everything volition rely the proxy. Standalone agent-vault is no longer the recommended way to use it, and Infisical are pushing you towards using their platform. I think my next stage volition be to ditch agent-vault in favor of a wrap about mtimproxy.
It’s crucial to note that agent-vault is its own LXC container, in a srv VLAN. This method that agents can’t bypass it. They can decide to disregard it, but the requests would merely neglect as the dev VM never holds any API keys or secrets.
Control center and VM provisioning#
As I stated earlier, VMs are some-what disposable. If they get corrupted or hijacked, I have to be capable to fair demolish them and re-create alongside as small hassle as possible. This method their innovation needs to be configured in code.
For the first VM provisioning I used cloud-init from a template in Proxmox, and for additional provisioning I used Ansible. I additionally wrote a small authority program called kamino which orchestrates the cloud-init and ansible calls. An interactive CLI immediate that runs on my Mac, asks me for the Proxmox host, VM size, and using an admin Forgejo token picks the applicable repository(ies) to copy into the VM. It additionally creates a particular bot person in Forgejo which volition be used by the VM and gives it peruse and compose admission to the repository as a collaborator.
It additionally provisions the agent-vault alongside the applicable secrets (that are stored in a password director on my laptop), and basically creates an complete betterment environment. Using ansible it provisions the VM, and using chezmoi it copies my dotfiles into the VM, so the instant I ssh into the VM, I get my tmux setup there alongside all the needed tools.
Workflow and harness#
My first intuition was “let’s vibe-code a tradition web interface to engage alongside my agents in the VMs”. But following carefully considering this, I decided to retreat to known and existing tools. A tradition prefix in tmux shows me all the VMs alongside their agentic runs, akin to what I described in my previous article for my local development. When I’m in a terminal, I hit prefix J and I see all the VMs, their tmux sessions and all the Claude code sessions: what are they operating on and what is their status.
However, the idea was to toggle to slightly autonomous development, ie - agents can run on their own, and I lone assessment the output. For that, I had to merge two things: contiguous tasks, and repeating tasks.
Immediate tasks are things I desire to activity on correct now. I can continually jump into a VM, open a new tmux opening alongside Claude in a worktree and commencement working. Or, I can create an matter in Forgejo, tag it status/ready and a Claude code case should choice up. With distinct stage/* labels akin stage/research, stage/plan, stage/implement, I can additional authority the agentic flow. For research, the delegate volition fair investigation an idea I have; scheme volition create a scheme for it; and execute will, well, compose code. These are interactive sessions, and they are living as their own tmux windows. I can jump into them and perspective what the delegate is doing, or equal obtain authority and steer the delegate further. Or I can comment on the matter or alter its labels to steer the agent. The meeting is live as lengthy as the matter is open. If the VM crashes/reboots, the meeting volition be started alongside claude --resume on the stable ID of the Forgejo issue, so activity on an matter is continually done alongside the complete context.

For repeating tasks, I tried to discover a fine way to grip them. I didn’t desire to create tradition logic about them, and putting them in Forgejo issues felt hacky. So, inspired by GitHub Agentic Workflows, I decided to compose these jobs as markdown records in the repo under .agents/jobs/<job>.md. The job has a cron or OnCalendar pattern, and a clarification of what it needs to do. Using the idea of safe-outputs the job describes what should it’s output be (for example at max one PR, and max 3 issues).
In command to accomplish all that, I had to compose a tradition harness called tipoca. It’s installed on the VM as part of the provisioning by kamino, and it’s basically a Forgejo webhook listener alongside several rules. Every period item changes in Forgejo (an matter tag is changed, a new commit alongside a periodic job) — tipoca picks it up and orchestrates.
For issues that need work, tipoca launches a new tmux meeting alongside Claude in a worktree, and hand it the matter details. Claude can afterward create additional issues and/or open PRs using the Forgejo API, and it’s bot credentials that kamino provisioned whenever I created the VM. For periodic jobs, tipoca sets up a systemd timer, which whenever fired additionally creates a Claude session. However, jobs are riskier than giving an delegate an matter that I wrote.
Since jobs can hunt the net or get unvalidated input (for example from a sentry matter complete which I don’t have control), they do not run alongside the identical privileges as agents started from an issue. Instead, tipoca makes certain they run on a distinct Linux user, without sudo, and without admission to Forgejo — so they can’t create issues, PRs, or modify code. The lone item they are allowed to do is inform rear tipoca what they desire to do: create an matter or a PR, and tipoca using safe-outputs method verifies what the job wants to do, and does that for the job. tipoca makes certain to provision the delegate a caller copy of the code, but all the interactions alongside Forgejo go through tipoca fairly than Claude.
Lastly, I wanted to have a job that volition observe Sentry for issues. Because everything in my setup is local, and nothing is reachable from the wild-wide-web, I can’t set up webhooks in Sentry without opting for using item akin ngrok. So I decided to use tipoca for polling Sentry formerly in a during in command to observe for new issues, and create a Claude case per issue.
tipoca maintains complete log, and has a small position sub command to inform me what’s going on inside. It’s additionally liable for fast-forwarding chief all period chief is updated, so the repo copy in the VM is continually fresh, and next delegate creates a worktree from a caller copy.
Lastly, there is a nightly systemd job on all VM that pulls the dotfiles and ansible playbooks and applies them to the VM, so all alter I create to my dotfiles or the ansible playbooks is continually propagated to all the VMs. I can, of course, update it manually all period I need — and I did so many times during the betterment of this scheme — but formerly it becomes stable, I fair desire everything to propagate automatically.
I tested this complete workflow, and I was extremely blessed to see whenever my delegate bot reacts to my PR comments, is capable to fix PR checks that failed, near issues, create issues, or run periodic jobs. It’s basically an autonomous distant agentic betterment factory. I run at the flat of Forgejo issues, but I continually have the capability to jump into delegate or equal the code if and whenever needed. It’s equal imaginable to affect alongside this workflow from the phone, since I can instal any app that supports Forgejo and create issues from there, without having to build a tradition authority panel. The lone item that requires my laptop is provisioning a new VM, which anyhow appears foolish to do from a phone on the road.
Every nonaccomplishment in the workflow, sends a pushover notification to my phone.
Knowledge#
With autonomous agents doing coding and exploration, they need to be capable to shop cognition concerning the project. The inner recollection of Claude is good, but it’s fragile. If a VM is destroyed and re-created, all my preferences or things that Claude have learned — are lost. Therefor, via chezmoi, all VM gets a ~/.claude/CLAUDE.md base document that instructs it on how to shop its memory.
When an delegate learns item precious that is value remembering for forthcoming sessions, it volition compose it into the project’s AGENTS.md, as lengthy as it’s short. If it’s longer than a paragraph or two, afterward it volition put a markdown document in docs/. This way all the project cognition is stored inner the project.
As for earth knowledge, I haven’t established a use-case for it yet. But if it becomes an issue, a shared cognition repo anywhere agents from distinct VMs can open a PR — appears akin a fine approach.
Epilogue#
Developing this scheme was a lot of fun, and I got extremely enthusiastic whenever I saw the archetypal comment by the bot person in Forgejo and Claude code meeting in a tmux pane that resulted from it. Even although it was 99% vibe-coded, it motionless gave me the identical flat of joy as whenever I used to compose code manually and see several progress. I would have never equal although of attempting to build item akin this without AI, as it would obtain enormous amounts of liberated evenings, which would merely create me endure motivation fractional way.
But now, I have mini data-center at home, alongside DNS and DHCP servers, my own Git server, and a harness about agentic coding. I am no longer tied to my Mac, and I can merely agenda activity for the agents and go concerning my day. I motionless create material on the Mac locally, and I motionless prosecute the identical patterns I wrote concerning in my first article: How I vibe-code. However, for all dense activity or big projects, I volition be moving to this distant agentic betterment workflow.