<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Homelab on RevoluGame</title><link>http://revolugame.com/tags/homelab/</link><description>Recent content in Homelab on RevoluGame</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Wed, 17 Jun 2026 10:00:00 +0100</lastBuildDate><atom:link href="http://revolugame.com/tags/homelab/index.xml" rel="self" type="application/rss+xml"/><item><title>Designing Single-Purpose Agents Instead of One Big Automation Script</title><link>http://revolugame.com/p/designing-single-purpose-agents-instead-of-one-big-automation-script/</link><pubDate>Wed, 17 Jun 2026 10:00:00 +0100</pubDate><guid>http://revolugame.com/p/designing-single-purpose-agents-instead-of-one-big-automation-script/</guid><description>&lt;img src="http://revolugame.com/p/designing-single-purpose-agents-instead-of-one-big-automation-script/pexels-introspectivedsgn-22043568.jpg" alt="Featured image of post Designing Single-Purpose Agents Instead of One Big Automation Script" /&gt;&lt;p&gt;&amp;ldquo;Agent&amp;rdquo; has become one of those words that means everything and nothing this year. Before it was a hype term, I&amp;rsquo;d already ended up with a small flock of them in my homelab. Not because I was chasing a trend, but because I kept hitting the same wall every time I tried to write One Big Script: it grew a dozen unrelated responsibilities, and a bug in one of them risked taking down all of them.&lt;/p&gt;
&lt;p&gt;So instead, every recurring chore in my homelab is its own small, independently-scheduled program. There turned out to be more of them than I expected once I actually sat down and counted.&lt;/p&gt;

 &lt;blockquote&gt;
 &lt;p&gt;&lt;strong&gt;A note for muggles:&lt;/strong&gt; the repo behind all this is named &lt;code&gt;hogwarts&lt;/code&gt;, and every agent gets sorted to match. Once you start naming services after wizards, it turns out you owe each one an in-character job description, whether it asked for one or not.&lt;/p&gt;

 &lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;The standing watch.&lt;/strong&gt; Four observers poll continuously and report into one correlator every five minutes. This is the layer that exists so I find out about a problem before it becomes a 3am page instead of after:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Argus Filch&lt;/strong&gt; watches running Docker containers for restart loops, failed healthchecks, and containers that just quietly vanish.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Astronomy Tower&lt;/strong&gt; polls Prometheus for firing alerts, down scrape targets, and recording rules that stopped working without telling anyone.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Marauder&amp;rsquo;s Map&lt;/strong&gt; scans the UniFi network for offline devices, WAN failover events, and firewall rules that drifted open.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Mad-Eye&amp;rsquo;s Watch&lt;/strong&gt; tracks TLS certificate expiry across configured endpoints. Constant vigilance: a warning at 30 days, a critical at 7.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The Headmaster&lt;/strong&gt; is the one role on this list that isn&amp;rsquo;t single-purpose by design. Its entire job is reading what the other four decided was worth reporting and correlating that into one status, surfaced as an incident only when it&amp;rsquo;s actually worth one.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;The daily and weekly chores.&lt;/strong&gt; These run on their own cron schedules and never talk to each other directly:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Molly&amp;rsquo;s Cupboard&lt;/strong&gt; reviews the Home Assistant entity list weekly: unavailable entities, missing or duplicate names, disabled automations. (Molly Weasley: keeps the household running, judges your clutter lovingly.)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rita&amp;rsquo;s Desk&lt;/strong&gt; is the RSS morning digest: feeds in, previous day&amp;rsquo;s articles out, ranked against persistent tag scores I vote on. Deterministic by design, no LLM in the loop. (Never met a headline she wouldn&amp;rsquo;t print, but at least she always sources it.)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Kreacher&amp;rsquo;s Kitchen&lt;/strong&gt; plans the week&amp;rsquo;s meals from my recipe library and a couple of trusted cooking sites. (Grumbles the entire time, still gets dinner on the table.)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The Library&lt;/strong&gt; picks a tech topic every night, gathers sources, and writes a 5-minute digest plus a 15-20 minute deep dive. (Lives in the package manifest as &lt;code&gt;research-digest&lt;/code&gt;, but it spends every night in the Restricted Section, so the Library it is.)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Madam Pince&amp;rsquo;s Catalogue&lt;/strong&gt; lists every running container and cross-checks it against the service directories in the infra repo, flagging any container that has no matching documentation. (A very particular librarian: every book gets catalogued, or it gets confiscated.)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Dobby&amp;rsquo;s Rounds&lt;/strong&gt; is the homelab&amp;rsquo;s free elf: weekly housekeeping that prunes old snapshots, reports, and state files before they pile up.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;O.W.L.s&lt;/strong&gt; is the daily infrastructure audit: config drift, open ports, compliance. Read-only and deliberately paranoid about it. (Ordinary Wizarding Level exams: thorough, exhausting, and not interested in your excuses.)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Auror Office&lt;/strong&gt; is the daily cross-domain security digest, correlating O.W.L.s&amp;rsquo; findings with auth logs, Docker posture, and the network observers above into one report. (No badge, but it does go looking for dark wizards. I&amp;rsquo;ve written about &lt;a class="link" href="http://revolugame.com/p/homelab-personal-soc/" &gt;how this one and O.W.L.s work together&lt;/a&gt; in more detail elsewhere.)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&amp;hellip;and others&lt;/strong&gt;, including media management, recommendations, and a handful more in the same spirit. Small enough that listing every one of them would be its own blog post.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Thirteen-plus names, just as many jobs. Outside of the two correlators built specifically to know about everyone else — the Headmaster and the Auror Office — not one of them needs to care that the rest exist.&lt;/p&gt;
&lt;h2 id="the-three-conventions-that-make-this-work"&gt;The three conventions that make this work
&lt;/h2&gt;&lt;p&gt;None of these agents are individually clever. What makes the &lt;em&gt;flock&lt;/em&gt; manageable is that they all obey the same three small contracts:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. One artifact format.&lt;/strong&gt; Every agent writes its result as JSON (and often a companion Markdown note) to its own &lt;code&gt;outbox/latest/&lt;/code&gt; path. A &amp;ldquo;latest&amp;rdquo; pointer plus a timestamped archive, every time. No agent reads another agent&amp;rsquo;s outbox directly. If something needs cross-referencing, that&amp;rsquo;s a different, explicitly-correlating agent&amp;rsquo;s job, not an implicit dependency.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. One notification channel.&lt;/strong&gt; Every agent that needs to tell me something pushes through the same ntfy topic convention, with a deep link back into wherever the full detail lives. I don&amp;rsquo;t maintain five different alerting integrations; I maintain one, and every agent is a thin client of it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3. One aggregation point.&lt;/strong&gt; A single dashboard reads everyone&amp;rsquo;s &lt;code&gt;outbox/latest/&lt;/code&gt; and renders it. It doesn&amp;rsquo;t collect anything itself. It has no Docker access, no Home Assistant credentials, no API keys. It&amp;rsquo;s a pure read layer over JSON files other things produced. That&amp;rsquo;s the only place in the whole system that&amp;rsquo;s allowed to know all the agents exist.&lt;/p&gt;
&lt;p&gt;That&amp;rsquo;s the entire integration surface. Three conventions, and I can add a sixth agent tomorrow without touching the other five.&lt;/p&gt;
&lt;h2 id="why-decompose-instead-of-consolidate"&gt;Why decompose instead of consolidate
&lt;/h2&gt;&lt;p&gt;The obvious objection: isn&amp;rsquo;t five small things more to maintain than one big thing? In my experience, no. For the same reason a set of small services usually beats a monolith at work.&lt;/p&gt;
&lt;p&gt;A bug in Peeves&amp;rsquo; Trakt pagination cannot break Molly&amp;rsquo;s Home Assistant checks, because they don&amp;rsquo;t share a process, a deploy, or a schedule. I can test each one in complete isolation with a fixture file instead of live credentials. I can hand any single agent&amp;rsquo;s directory to a contributor - human or an AI coding agent - and they have everything they need to understand and change it, without first having to load the other four into their head. And when I retire one (Peeves only matters because I still have a media server; that won&amp;rsquo;t be true forever), deleting it is deleting a directory, not untangling a shared module.&lt;/p&gt;
&lt;p&gt;This is the same lesson as service boundaries and team topologies at any reasonably-sized engineering org: the interface between components should be small, explicit, and boring, and almost all of the design effort should go into keeping it that way. Not into making any individual component clever. The cleverness, if there is any, belongs inside one agent&amp;rsquo;s narrow walls, where it can&amp;rsquo;t leak.&lt;/p&gt;
&lt;h2 id="the-boring-plumbing-is-the-point"&gt;The boring plumbing is the point
&lt;/h2&gt;&lt;p&gt;None of the five agents above is doing anything technically hard. RSS parsing, a REST API client, a cron job - this is all stuff any of us could write in an afternoon. The actual design work was deciding, up front, that &amp;ldquo;outbox JSON + one notification channel + one dashboard&amp;rdquo; would be the &lt;em&gt;entire&lt;/em&gt; contract between them, and then refusing to let any agent reach around it.&lt;/p&gt;
&lt;p&gt;That discipline is cheap when you only have one agent. It&amp;rsquo;s the only thing that keeps five (or fifteen) from turning back into the One Big Script I was trying to avoid in the first place.&lt;/p&gt;</description></item><item><title>Backing Up the One Credential That Can't Be Wrong</title><link>http://revolugame.com/p/backing-up-the-one-credential-that-cant-be-wrong/</link><pubDate>Mon, 15 Jun 2026 10:00:00 +0100</pubDate><guid>http://revolugame.com/p/backing-up-the-one-credential-that-cant-be-wrong/</guid><description>&lt;img src="http://revolugame.com/p/backing-up-the-one-credential-that-cant-be-wrong/pexels-padrinan-2882630.jpg" alt="Featured image of post Backing Up the One Credential That Can't Be Wrong" /&gt;&lt;p&gt;Most things in my homelab can fail and I shrug. A container restarts, a dashboard is stale for an hour, a media file gets deleted by mistake: annoying, recoverable, fine. The password vault is not in that category. If it&amp;rsquo;s wrong, or gone, or merely unreachable at the wrong moment, I lose access to everything else at once. It&amp;rsquo;s the one piece of infrastructure that earns the extra paranoia.&lt;/p&gt;
&lt;p&gt;So instead of &amp;ldquo;back it up somewhere,&amp;rdquo; I sat down and asked the question I&amp;rsquo;d ask at work for any single point of failure: &lt;em&gt;which specific failure does each copy need to survive?&lt;/em&gt; That question is what actually shaped the design. Not &amp;ldquo;more backups.&amp;rdquo;&lt;/p&gt;
&lt;h2 id="three-copies-three-different-failure-modes"&gt;Three copies, three different failure modes
&lt;/h2&gt;&lt;p&gt;The vault lives day-to-day in Dashlane. Around it, a script keeps two more copies current:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;A dated, offline KeePass &lt;code&gt;.kdbx&lt;/code&gt; archive.&lt;/strong&gt; The script exports the vault, converts it to KeePass format, and syncs the file to NAS over rsync. This file needs nothing else to be true. No Dashlane account, no Vaultwarden instance, no network to be opened. KeePassXC plus a master passphrase is the entire recovery path.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A live Vaultwarden mirror.&lt;/strong&gt; The script wipes and re-imports a self-hosted Vaultwarden instance on every run, so it never drifts and never accumulates stale duplicates. Unlike the &lt;code&gt;.kdbx&lt;/code&gt;, this one behaves like a normal vault app day-to-day. Useful if Dashlane itself is the thing that&amp;rsquo;s unavailable.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The original, in Dashlane.&lt;/strong&gt; Still the primary, still the one I actually use day to day.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Each of these answers a different question. If Dashlane has an outage or I get locked out of the account, Vaultwarden keeps working normally. If my entire home network and every service on it is down, or I&amp;rsquo;m on a borrowed machine with nothing installed, the &lt;code&gt;.kdbx&lt;/code&gt; file plus a passphrase I&amp;rsquo;ve memorized is the whole recovery procedure. No SSH keys, no app, no account, no network. If the NAS itself dies, the live Vaultwarden mirror (running elsewhere) and Dashlane are both still fine.&lt;/p&gt;
&lt;p&gt;That&amp;rsquo;s the test I&amp;rsquo;d apply to any redundancy claim: two backups that die from the same root cause aren&amp;rsquo;t two backups, they&amp;rsquo;re one backup with extra steps. These three don&amp;rsquo;t share a single point of failure with each other.&lt;/p&gt;
&lt;h2 id="the-part-that-matters-more-than-the-architecture"&gt;The part that matters more than the architecture
&lt;/h2&gt;&lt;p&gt;Diagrams of &amp;ldquo;three copies in three places&amp;rdquo; are easy to draw and easy to get wrong in the implementation details, and the details are where a vault backup script can quietly turn into a liability instead of a safety net.&lt;/p&gt;
&lt;p&gt;The script exports the raw vault to CSV in plaintext before converting it. There&amp;rsquo;s no way around that, the conversion tool needs plaintext input. So the entire design constraint became: &lt;em&gt;that plaintext must never outlive the script&amp;rsquo;s own execution.&lt;/em&gt; It&amp;rsquo;s written to a private temp directory, and a shell &lt;code&gt;trap&lt;/code&gt; deletes it on every exit path. Success, failure, or interruption, not just the happy path. The master passphrase that protects the &lt;code&gt;.kdbx&lt;/code&gt; is treated as its own tier-zero secret: it lives outside the repo, outside the backup, memorized or written down somewhere physically safe, because it&amp;rsquo;s the one credential that unlocks the credential store.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s a small thing, a &lt;code&gt;trap ... EXIT&lt;/code&gt; instead of cleanup code only at the bottom of the script. But it&amp;rsquo;s exactly the kind of detail that&amp;rsquo;s invisible when it works and catastrophic when it doesn&amp;rsquo;t. I&amp;rsquo;d rather the script crash and still clean up after itself than ship a feature and leave a plaintext export sitting in a temp folder because someone hit Ctrl-C at the wrong moment.&lt;/p&gt;
&lt;h2 id="threat-model-your-one-credential-that-cant-be-wrong"&gt;Threat-model your one credential that can&amp;rsquo;t be wrong
&lt;/h2&gt;&lt;p&gt;Every system has at least one of these. The credential, the key, the record that everything else assumes is correct and available. For most of us it&amp;rsquo;s a password vault; for some it might be a signing key or a recovery seed.&lt;/p&gt;
&lt;p&gt;The exercise worth doing isn&amp;rsquo;t &amp;ldquo;add more backups.&amp;rdquo; It&amp;rsquo;s listing the ways that one thing could become unavailable or wrong, and checking that your copies don&amp;rsquo;t all fail for the same reason. If they do, you&amp;rsquo;ve built redundancy theater, not redundancy.&lt;/p&gt;</description></item><item><title>Running a Personal SOC: Bringing Production Security Practices Home</title><link>http://revolugame.com/p/running-a-personal-soc-bringing-production-security-practices-home/</link><pubDate>Fri, 12 Jun 2026 10:00:00 +0100</pubDate><guid>http://revolugame.com/p/running-a-personal-soc-bringing-production-security-practices-home/</guid><description>&lt;img src="http://revolugame.com/p/running-a-personal-soc-bringing-production-security-practices-home/pexels-dan-nelson-1667453-4973899.jpg" alt="Featured image of post Running a Personal SOC: Bringing Production Security Practices Home" /&gt;&lt;p&gt;At work, nobody questions why we have logging, alerting, and a daily look at what changed overnight. At home, the same network runs a NAS, a media stack, Home Assistant, and a handful of containers. And for years my only &amp;ldquo;security monitoring&amp;rdquo; was noticing something was broken.&lt;/p&gt;
&lt;p&gt;So I built myself a small, read-only security operations setup for the homelab: a daily audit script and a cross-domain digest agent that correlates it with everything else running on the network. Nothing here is novel security research. The interesting part is which production habits turned out to be worth carrying home, and which ones I deliberately left at the office.&lt;/p&gt;
&lt;h2 id="two-layers-not-one"&gt;Two layers, not one
&lt;/h2&gt;&lt;p&gt;The setup is split into two pieces with different jobs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The daily audit&lt;/strong&gt; is the boring, deterministic layer. Once a day it collects, locally and read-only:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;listening sockets, flagging anything bound to a wildcard interface&lt;/li&gt;
&lt;li&gt;Docker/container posture: privileged containers, dangerous bind mounts, host network mode, dangerous capabilities&lt;/li&gt;
&lt;li&gt;systemd service drift against an expected allowlist&lt;/li&gt;
&lt;li&gt;a local secrets/config hygiene scan (path, line, and pattern only - never the matched value)&lt;/li&gt;
&lt;li&gt;cached &lt;code&gt;apt list --upgradable&lt;/code&gt;, optionally enriched with a &lt;code&gt;trivy fs&lt;/code&gt; scan&lt;/li&gt;
&lt;li&gt;whether the monitoring artifacts and timers it depends on are actually present&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It writes a deterministic Markdown digest and a JSON report to a local outbox. That&amp;rsquo;s it. No remediation, no service restarts, no firewall changes. The rule I gave it was &amp;ldquo;assume breach, trust no single signal, change nothing during observation.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The SOC agent&lt;/strong&gt; is the correlation layer on top. It runs once a day and pulls together SSH auth logs (brute-force detection, unexpected successful logins, elevated sudo activity), Docker security posture, UniFi network signals (unknown MAC addresses, active IPS/DPI/flood/scan/rogue alarms), and re-surfaces anything security-relevant the daily audit already found. Everything gets a severity from &lt;code&gt;ok&lt;/code&gt; up through &lt;code&gt;critical&lt;/code&gt;, and the result is written as an Obsidian note with YAML frontmatter. So a year of these becomes a searchable, taggable incident timeline instead of a folder of text files nobody opens.&lt;/p&gt;
&lt;h2 id="where-the-llm-fits---and-where-it-doesnt"&gt;Where the LLM fits - and where it doesn&amp;rsquo;t
&lt;/h2&gt;&lt;p&gt;Both agents can optionally hand their findings to a local Ollama model to write a short narrative summary on top of the facts. This is the part I was most careful about, because it&amp;rsquo;s the part most people get backwards.&lt;/p&gt;
&lt;p&gt;The model never sees raw logs, full inventories, or matched secrets. It only compact finding titles, IDs, severities, and evidence keys. It doesn&amp;rsquo;t decide what&amp;rsquo;s a finding; the deterministic analyzers do that. And if Ollama is unreachable or returns something unusable, the deterministic digest ships as-is. The LLM is a narrator, never the source of truth.&lt;/p&gt;
&lt;p&gt;That&amp;rsquo;s the same boundary I&amp;rsquo;d want on a production alerting pipeline: detection logic stays deterministic and testable, and generative summarization sits strictly downstream of it, never upstream.&lt;/p&gt;
&lt;h2 id="the-part-thats-just-operational-discipline"&gt;The part that&amp;rsquo;s just operational discipline
&lt;/h2&gt;&lt;p&gt;A few choices here have nothing to do with security theory and everything to do with habits from running things in production:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Output paths are permissioned, not just &amp;ldquo;private by convention.&amp;rdquo;&lt;/strong&gt; Reports get &lt;code&gt;0600&lt;/code&gt;, runtime directories &lt;code&gt;0700&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Stale data is treated as a finding, not silently trusted.&lt;/strong&gt; Upstream reports older than a configured threshold are flagged rather than quietly re-surfaced as current.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Notifications are a tap-through, not the whole story.&lt;/strong&gt; A push notification carries the headline and a link into the actual note - useful at a glance, but the record of truth lives in the note, not in a chat history that scrolls away.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Everything is replayable offline.&lt;/strong&gt; Both agents accept a fixture file in place of live collection, so I can test a new analyzer rule against a known input before it ever touches my real network.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="what-it-actually-buys-me"&gt;What it actually buys me
&lt;/h2&gt;&lt;p&gt;Mostly, it buys me the same thing it buys at work: I notice drift before it becomes an incident, instead of after. A container that quietly picked up a privileged flag, a port that got published wider than intended, an unfamiliar MAC address on the network. These are exactly the kind of small, boring facts that are easy to miss and easy to detect deterministically.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s not a real SOC. There&amp;rsquo;s no 24/7 coverage, no incident response retainer, and the threat model is &amp;ldquo;don&amp;rsquo;t get owned by something dumb,&amp;rdquo; not &amp;ldquo;defend against a motivated attacker.&amp;rdquo; But the muscle is the same one I use at work: write the check once, make it boring and deterministic, let a model help you read the output, and keep a record you can actually search six months later.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re already doing this professionally, the homelab version costs you an evening and pays you back the first time you catch something you would have otherwise missed entirely.&lt;/p&gt;</description></item></channel></rss>