<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en-GB" xmlns="http://www.w3.org/2005/Atom">
    <id>https://unbeholden.dev/</id>
    <title>Unbeholden</title>
    <updated>2026-11-11T00:00:00.000Z</updated>
    <author>
        <name>Jakub</name>
    </author>
    <link rel="alternate" href="https://unbeholden.dev/"/>
    <link rel="self" href="https://unbeholden.dev/feed.xml"/>
    <subtitle>Software, and the infrastructure behind it. Every entry in full, so you can read it without loading the site.</subtitle>
    <rights>Prose CC BY 4.0. Code CC0/MIT.</rights>
    <entry>
        <title type="html"><![CDATA[Booking calls with calrs]]></title>
        <id>https://unbeholden.dev/blog/booking-calls-with-calrs</id>
        <link href="https://unbeholden.dev/blog/booking-calls-with-calrs"/>
        <updated>2026-11-06T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[The booking page runs on calrs, a self-hosted scheduler that reads a CalDAV calendar. One Rust binary and a SQLite file.]]></summary>
        <content type="html"><![CDATA[<p>If you want to talk to me, there’s a link:
<a href="https://cal.unbeholden.dev/u/jakub/lets-chat" target="_blank" rel="noopener noreferrer">cal.unbeholden.dev/u/jakub/lets-chat</a>. You pick a
free half hour, book a video call, and it turns up in my calendar. The page runs on
<a href="https://cal.rs" target="_blank" rel="noopener noreferrer">calrs</a>, self-hosted.</p>
<h2 id="what-calrs-is">What calrs is</h2>
<p>calrs is an open-source scheduler, AGPL-licensed and written in Rust. It’s one binary that
serves HTTP and keeps everything in a single SQLite file, shipped as a Docker image. There’s no
Node.js or Postgres to run alongside it.</p>
<p>It connects to any CalDAV server: Nextcloud, Fastmail, iCloud, Radicale and others. Google
Calendar isn’t one of them, because Google only allows CalDAV over OAuth. calrs reads the
calendar to work out when I’m busy, offers the free slots within the hours I’ve set, and writes
confirmed bookings back to it. Recurring events are expanded, so a weekly meeting blocks
every week and not just the first.</p>
<h2 id="why-not-a-hosted-one">Why not a hosted one</h2>
<p>I looked at a hosted service first, something like Cal.com. It would have been quicker, but it
goes against what this site argues for. A booking link is something you hand out and expect to
keep working. On a hosted service, the URL, access to the calendar and the record of who booked
what would sit with someone else.</p>
<p>I’d been here before, too. On another project, a hosted scheduler meant changing the privacy
policy, because it sent the details of everyone who booked to a third party, which nobody had
intended.</p>
<p>Self-hosted, the link stays on unbeholden.dev and the bookings stay in a SQLite file on the server.</p>
<h2 id="running-it">Running it</h2>
<p>calrs runs on Giran, the VPS that serves this site, as a Dokploy app. The container needs a
persistent volume at <code>/var/lib/calrs</code> for the SQLite database, and <code>CALRS_BASE_URL</code> set to the
public URL so the links it sends out point at the right place.</p>
<p>The calendars are in Radicale, on <a href="https://unbeholden.dev/blog/getting-my-homelab-into-git" target="_blank" rel="noopener noreferrer">Aden at home</a>, and calrs
reaches them over the tailnet. Everyone in the family has their own calendar, and calrs checks all
of them. When someone in the family is busy, I usually am too: I’m taking the kids to the doctor,
or looking after them while my wife is out.</p>
<p>Confirmations and reminders go out by email through the <a href="https://unbeholden.dev/blog/self-hosting-email-with-stalwart" target="_blank" rel="noopener noreferrer">Stalwart</a> mail server.</p>
<p>Once it’s up, you sign in, connect a calendar, set your hours and create an event type. Mine is
“Let’s chat”, 30 minutes, video call. The video link is a Whereby room for now, which I plan to
replace.</p>
<p>The booking page is plain: a month view, a time zone picker, a 12/24-hour toggle, and the free
slots.</p>
]]></content>
        <category term="Self-hosting"/>
        <published>2026-11-06T00:00:00.000Z</published>
    </entry>
    <entry>
        <title type="html"><![CDATA[T3 Code in every dev container]]></title>
        <id>https://unbeholden.dev/blog/t3-code-in-every-dev-container</id>
        <link href="https://unbeholden.dev/blog/t3-code-in-every-dev-container"/>
        <updated>2026-11-04T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[My agents work in dev containers on a host at home. Each container now runs its own T3 Code server, and I pair my devices with it directly, with no account and no relay.]]></summary>
        <content type="html"><![CDATA[<p>My agents work in dev containers on Oren, an LXC at home. I used to reach them over SSH, in
<a href="https://herdr.dev" target="_blank" rel="noopener noreferrer">herdr</a>, which I described in
<a href="https://unbeholden.dev/blog/an-agent-that-configures-my-machine" target="_blank" rel="noopener noreferrer">an agent that configures my machine</a>. From my phone that
meant SSH into Oren and spawning agents by hand in a terminal, which is clunky. A few days ago I added
<a href="https://github.com/pingdotgg/t3code" target="_blank" rel="noopener noreferrer">T3 Code</a> beside herdr to compare the two. herdr is gone now,
and so are <code>dcclaude</code>, <code>dcpi</code> and <code>dccodex</code>, my scripts for starting an agent in a container.</p>
<p>T3 Code calls itself an “agent harness control surface”. It’s a server with iOS, Android, web and
desktop clients, and it drives agent CLIs that are already installed and signed in, in my case
Claude Code and Codex. It’s MIT licensed and packaged in nixpkgs, which is where my 0.1.5 comes from.
The README calls the project “very very early” and says to expect bugs.</p>
<p>All of this lives in my dotfiles, which now have a
<a href="https://github.com/unbeholdendev/dotfiles" target="_blank" rel="noopener noreferrer">public mirror</a>.</p>
<h2 id="what-i-like-so-far">What I like so far</h2>
<p>I’m excited about this one, mostly because of how much it shows me in a single UI compared to herdr.
I get the git diff, and I can merge from the same UI.</p>
<p>The built-in browser is the biggest win. It runs inside the container, so I preview changes in T3
Code’s browser instead of exposing a port to the host. I don’t have to think about which ports to
expose, or whether two projects want the same one. I’ve already removed the exposed ports from every
dev container.</p>
<p>Working from my phone is nearly as big. The mobile UI is built for it, and I can pick up where an
agent left off, or start something new, without setting up a terminal session.</p>
<h2 id="one-server-per-container">One server per container</h2>
<p>Agents run where the server runs. A single server on Oren would have put them outside the
containers, and the containers are the reason I can run agents without permission prompts. So every
container gets its own server, and the boundary stays where it was.</p>
<p>It’s also my biggest complaint so far. I have to pair every container with the desktop app and the
phone, one by one. A single server on Oren that could reach into any dev container would mean pairing
once. I might fork T3 Code and build that myself.</p>
<p><code>dcup</code>, the script that brings a container up, now starts one:</p>
<pre class="astro-code unbeholden" style="background-color:transparent;color:var(--dim);overflow-x:auto" tabindex="0" data-language="bash"><code><span class="line"><span style="color:var(--dim)">T3CODE_TELEMETRY_ENABLED=</span><span style="color:var(--dim)">false</span><span style="color:var(--dim)"> setsid </span><span style="color:var(--dim)">-f</span><span style="color:var(--dim)"> flock</span><span style="color:var(--dim)"> -n</span><span style="color:var(--dim)"> /history/t3.lock</span><span style="color:var(--dim)"> \</span></span>
<span class="line"><span style="color:var(--dim)">  t3</span><span style="color:var(--dim)"> start</span><span style="color:var(--dim)"> --no-browser</span><span style="color:var(--dim)"> --host</span><span style="color:var(--dim)"> 0.0.0.0</span><span style="color:var(--dim)"> --port</span><span style="color:var(--dim)"> 3773</span><span style="color:var(--dim)"> --base-dir</span><span style="color:var(--dim)"> /history/t3</span><span style="color:var(--dim)"> \</span></span>
<span class="line"><span style="color:var(--dim)">  &lt;</span><span style="color:var(--dim)">/dev/null</span><span style="color:var(--dim)"> &gt;</span><span style="color:var(--dim)">/dev/null</span><span style="color:var(--dim)"> 2&gt;&amp;1</span></span></code></pre>
<p><code>/history</code> is a bind mount from the host, so threads and pairings are kept outside the container and
survive a rebuild. The lock makes running <code>dcup</code> again a no-op while the server is alive. The
output goes nowhere because it holds pairing details.</p>
<p>Each workspace claims a port on the host, the first free one from 37731, and keeps it. <code>socat</code>
forwards that port to the container, and it looks up the container’s address on every connection,
because a rebuild changes it.</p>
<p>My clients end up with one server per project. <code>dcup</code> writes the project’s folder name to
<code>/etc/machine-info</code> before starting the server, because T3 Code otherwise names it after the
container’s random hostname.</p>
<h2 id="pairing-without-a-third-party">Pairing without a third party</h2>
<p>T3 Code offers a managed route called T3 Connect, where your devices sign in to the same account and
find your machines without any router changes. I don’t want it: my devices can already reach Oren,
and it would add an account to something that has no need of one. The nixpkgs build doesn’t offer it
anyway, and <code>t3 connect</code> says it’s “unavailable in builds without public configuration”.</p>
<p>The direct route is a one-time link. <code>t3 pair</code> prints one as a QR code, but it runs inside the
container, so the link carries an address like <code>http://172.17.0.2:3773</code> that my phone can’t reach. It
has no option to change that. <code>t3 auth pairing create</code> does take a base URL, so I added a small
script, <code>dcpair</code>, that runs on the host:</p>
<pre class="astro-code unbeholden" style="background-color:transparent;color:var(--dim);overflow-x:auto" tabindex="0" data-language="bash"><code><span class="line"><span style="color:var(--dim)">url=$(devcontainer </span><span style="color:var(--dim)">exec</span><span style="color:var(--dim)"> --workspace-folder</span><span style="color:var(--dim)"> &quot;$folder&quot;</span><span style="color:var(--dim)"> zsh</span><span style="color:var(--dim)"> -c</span><span style="color:var(--dim)"> \</span></span>
<span class="line"><span style="color:var(--dim)">  &#39;t3 auth pairing create --base-dir /history/t3 --base-url &quot;$1&quot; --json&#39;</span><span style="color:var(--dim)"> \</span></span>
<span class="line"><span style="color:var(--dim)">  zsh</span><span style="color:var(--dim)"> &quot;http://$(hostname -I | cut -d&#39; &#39; -f1):${port##*/}&quot;</span><span style="color:var(--dim)"> | jq </span><span style="color:var(--dim)">-r</span><span style="color:var(--dim)"> .pairUrl</span><span style="color:var(--dim)">)</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--dim)">printf </span><span style="color:var(--dim)">%s</span><span style="color:var(--dim)"> &quot;$url&quot;</span><span style="color:var(--dim)"> | qrencode </span><span style="color:var(--dim)">-t</span><span style="color:var(--dim)"> ansiutf8</span></span>
<span class="line"><span style="color:var(--dim)">echo </span><span style="color:var(--dim)">&quot;$url&quot;</span></span></code></pre>
<p>The URL reaches <code>qrencode</code> on stdin, which keeps the token out of the process list. Off my LAN, the
address only works when the tailnet routes to that subnet.</p>
<figure><svg viewBox="0 0 1200 700" role="img" aria-labelledby="t3-title t3-desc" font-family="'IBM Plex Mono',ui-monospace,monospace" font-size="20" fill="none" stroke-width="1.5">
<title id="t3-title">One T3 Code server per dev container, reached directly from my devices</title>
<desc id="t3-desc">My phone and laptops run the T3 Code app and connect straight to Oren, an LXC at home. On Oren, each workspace has its own host port, 37731, 37732 and so on, and socat forwards it to port 3773 in that workspace's dev container. Each dev container, such as unbeholden.dev or dotfiles, runs its own T3 Code server, which runs Claude Code and Codex inside the container. dcpair, on Oren, asks a container for a pairing link with Oren's address in it and prints it as a QR code for the phone to scan. Threads and pairings live in /history/t3, a bind mount from Oren. T3 Connect, which would add an account and a relay, is not used.</desc>
<g style="stroke:var(--faint,#675d51)" stroke-dasharray="6 6">
<rect x="40" y="20" width="190" height="90" rx="4" />
<rect x="340" y="150" width="840" height="530" rx="4" />
<rect x="640" y="200" width="520" height="150" rx="4" />
<rect x="640" y="370" width="520" height="150" rx="4" />
</g>
<text x="58" y="58" font-family="Rubik,sans-serif" font-size="24" font-weight="600" style="fill:var(--faint,#675d51)">T3 Connect</text>
<text x="58" y="88" font-size="18" style="fill:var(--faint,#675d51)">account · relay</text>
<g font-size="18" letter-spacing="0.12em" style="fill:var(--faint,#675d51)">
<text x="356" y="178">OREN · LXC AT HOME</text>
<text x="656" y="228">DEV CONTAINER · UNBEHOLDEN.DEV</text>
<text x="656" y="398">DEV CONTAINER · DOTFILES</text>
</g>
<g style="stroke:var(--fg,#1c1915)">
<rect x="40" y="200" width="190" height="300" rx="4" />
<rect x="380" y="242" width="200" height="90" rx="4" />
<rect x="380" y="412" width="200" height="90" rx="4" />
<rect x="670" y="245" width="460" height="85" rx="4" />
<rect x="670" y="415" width="460" height="85" rx="4" />
<rect x="380" y="560" width="200" height="90" rx="4" />
<rect x="700" y="560" width="430" height="90" rx="4" />
</g>
<g font-family="Rubik,sans-serif" font-weight="600" style="fill:var(--fg,#1c1915)">
<text x="58" y="244" font-size="28">My devices</text>
<text x="690" y="280" font-size="24">T3 Code server</text>
<text x="690" y="450" font-size="24">T3 Code server</text>
</g>
<g font-size="22" style="fill:var(--fg,#1c1915)">
<text x="400" y="278">socat :37731</text>
<text x="400" y="448">socat :37732</text>
<text x="400" y="596">dcpair</text>
<text x="720" y="596">/history/t3</text>
</g>
<g font-size="18" style="fill:var(--faint,#675d51)">
<text x="58" y="274">phone, laptops</text>
<text x="1110" y="280" text-anchor="end">:3773</text>
<text x="1110" y="450" text-anchor="end">:3773</text>
</g>
<g font-family="'Nunito Sans',sans-serif" font-size="19" style="fill:var(--dim,#4a4238)">
<text x="58" y="314">T3 Code app</text>
<text x="400" y="310">forwards to :3773</text>
<text x="400" y="480">forwards to :3773</text>
<text x="690" y="312">runs Claude Code, Codex</text>
<text x="690" y="482">runs Claude Code, Codex</text>
<text x="400" y="628">prints a pairing QR</text>
<text x="720" y="628">threads, pairings · bind mount</text>
</g>
<path d="M135 200V114" stroke-dasharray="6 6" style="stroke:var(--mid,#b0551c)" />
<path d="M125 147l20 20M145 147l-20 20" stroke-width="3" style="stroke:var(--mid,#b0551c)" />
<text x="157" y="163" font-size="18" style="fill:var(--mid,#b0551c)">not used</text>
<path d="M230 287H376M580 287H666" stroke-width="3" style="stroke:var(--amber,#8a5a00)" />
<path d="M366 279L378 287L366 295M656 279L668 287L656 295" stroke-width="3" style="stroke:var(--amber,#8a5a00)" />
<text x="244" y="275" font-size="18" style="fill:var(--amber,#8a5a00)">connect</text>
<path d="M230 457H376M580 457H666" style="stroke:var(--fg,#1c1915)" />
<path d="M370 451L380 457L370 463M660 451L670 457L660 463" style="stroke:var(--fg,#1c1915)" />
<path d="M580 590H660V524" style="stroke:var(--fg,#1c1915)" />
<path d="M654 534L660 524L666 534" style="stroke:var(--fg,#1c1915)" />
<text x="672" y="548" font-size="18" style="fill:var(--fg,#1c1915)">asks for a link</text>
<path d="M380 620H135V504" style="stroke:var(--fg,#1c1915)" />
<path d="M129 514L135 504L141 514" style="stroke:var(--fg,#1c1915)" />
<text x="150" y="608" font-size="18" style="fill:var(--fg,#1c1915)">pairing QR</text>
</svg></figure>
<h2 id="what-didnt-work-first-time">What didn’t work first time</h2>
<p><strong><code>t3 serve</code>.</strong> It looks like the right command for a headless server, and it forces project
bootstrap off whatever you pass. My flag to add the workspace as a project did nothing, so after
pairing the server showed no projects, and threads ran in a scratch folder under <code>/history/t3</code>.
<code>t3 start --no-browser</code> adds the project and doesn’t add a duplicate on the next start.</p>
<p><strong>Worktrees.</strong> My agents make a git worktree for any work that changes files. One made with
<code>git worktree</code> doesn’t attach to the T3 Code thread, so the diff panel stays empty. Their
instructions now say to use T3 Code’s worktree tools instead.</p>
<p><strong>The browser.</strong> In my containers it stayed blank at first. It’s a prebuilt Chrome, so it can’t
load libraries from the Nix store, and Chrome won’t start its sandbox as root. The fix has a cost, so
<code>dcup</code> asks once per workspace. If I say yes, it
installs the libraries with the distro’s package manager, and in a root container it turns the
sandbox off.</p>
<h2 id="one-tool-for-forgejo">One tool for Forgejo</h2>
<p>My agents reached Forgejo through an MCP server. T3 Code doesn’t use it. Its server runs a forge CLI
itself, <code>fj</code> or <code>tea</code>, for the PR status and review notifications in a thread. So I replaced the MCP
server with <code>tea</code>, and agents and T3 Code now use the same tool.</p>
<p>The switch has costs. <code>tea</code> targets Gitea, and <code>tea pr reply</code> gets a 405 from Forgejo, so agents answer review
comments with a normal PR comment. An MCP server gave agents typed parameters, where <code>tea</code> gives them
flags and <code>--help</code>. The Forgejo token also now sits in <code>tea</code>’s config as well as its own file.</p>
<h2 id="it-steers-the-agent">It steers the agent</h2>
<p>I expected T3 Code to be a window onto Claude Code. It also adds its own instructions and tools to
the session, and some of them disagree with mine. It tells agents to run subagents in the foreground,
not to check their own edits in its browser, and to wait for reviews with its PR watch rather than a
poll.</p>
<p>Nothing decides which instruction wins, so an agent uses its judgement. My prompt now says my rules
win. I don’t know yet whether agents will follow that.</p>
<h2 id="the-downsides">The downsides</h2>
<p>The forward listens on every interface of the host, and the pairing code is the only gate. A token
gets every permission by default, including a terminal in the container, unless you limit it with
<code>--scope</code>. I don’t limit mine. T3 Code’s docs say to treat pairing links like passwords, and Oren
has to stay off public networks.</p>
<p>A paired device can also start an agent that runs without prompts. That’s the same trade I made
before: inside the container there’s a token that can push branches and can’t merge them. A shared
agent login is in there too, on a volume every container mounts.</p>
<p>With the browser on in a root container, a page that exploits a Chrome bug gets root in that
container, with those tokens. So I only point it at the workspace’s own dev servers.</p>
<p>The nixpkgs package includes Electron, so it’s about 3.7 GiB. It lands once, on a Nix store volume
the containers share.</p>
<p>The servers and forwards are background processes that <code>dcup</code> starts, not services. Nothing brings
them back after Oren restarts until I run <code>dcup</code> again. Direct pairings have a 30-day default
lifetime, and I don’t know yet whether they renew, so I may be pairing again every month.</p>
<h2 id="summary">Summary</h2>
<p>T3 Code replaced herdr within a few days. It’s a much better way to work with agents, and I can start
or resume their work from my phone with little effort.</p>
<p>Each dev container runs its own server, so agents stay inside the containers. I pair my devices with
each one through a link <code>dcpair</code> prints on Oren, with no account and no relay. The browser runs in the
container too, which let me remove every exposed port.</p>
<p>The costs are a pairing per container, a pairing link that grants full access, a 3.7 GiB package and
a project that calls itself very early. Pairing every container separately is what I’d change first,
maybe in a fork.</p>]]></content>
        <category term="Agent tooling"/>
        <published>2026-11-04T00:00:00.000Z</published>
    </entry>
    <entry>
        <title type="html"><![CDATA[Getting my homelab into Git]]></title>
        <id>https://unbeholden.dev/blog/getting-my-homelab-into-git</id>
        <link href="https://unbeholden.dev/blog/getting-my-homelab-into-git"/>
        <updated>2026-10-31T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Two Proxmox hosts, a NAS and a small Kubernetes cluster, mostly described in two Git repositories. A dozen containers on one LXC aren't yet, so I'm moving them.]]></summary>
        <content type="html"><![CDATA[<p>The Lightning node, the Forgejo that agents push to and the host they work on all run at home. I’ve
written about them one at a time and never shown how they fit together, so here’s all of it as it
stands today, including the part I want to change.</p>
<h2 id="whats-in-it">What’s in it</h2>
<p>The hosts are named after towns in Lineage 2, because I enjoyed playing it as a kid.</p>
<ul>
<li>An OpenWrt router, with AdGuard Home for DNS.</li>
<li>Rune and Dion, two machines running <a href="https://www.proxmox.com" target="_blank" rel="noopener noreferrer">Proxmox</a>.</li>
<li>A TrueNAS box, which also runs Jellyfin and Immich.</li>
<li>LXCs on Proxmox. Goddard runs the Bitcoin node, Aden runs Docker, Oren runs the dev containers,
Gludin runs Dokploy and Heine runs Forgejo Actions jobs.</li>
<li>A two-node <a href="https://www.talos.dev" target="_blank" rel="noopener noreferrer">Talos</a> cluster, as VMs on Dion.</li>
</ul>
<p>Outside the house there’s Giran, the rented VPS that serves this site and my mail, joined to the
rest over a tailnet.</p>
<figure><svg viewBox="0 0 1200 1080" role="img" aria-labelledby="hl-title hl-desc" font-family="'IBM Plex Mono',ui-monospace,monospace" font-size="20" fill="none" stroke-width="1.5">
<title id="hl-title">The homelab, and which repository describes each part</title>
<desc id="hl-desc">At home: an OpenWrt router running AdGuard Home for DNS, a TrueNAS box running Jellyfin and Immich, and two Proxmox hosts, Rune and Dion. Ansible in the infra repository sets up the hosts at home and Giran. The Proxmox hosts run five LXCs: Goddard runs the Bitcoin node, Gludin runs Dokploy, Oren runs the dev containers and gets its shell from dotfiles, Heine runs Forgejo Actions jobs, and Aden runs Docker with a dozen containers. Ansible in infra installs Docker on Aden, but what runs on it is not in Git. Dion also hosts the Talos cluster as two VMs, a control plane with 2 vCPUs and 4 GiB and a worker with 4 vCPUs and 8 GiB, which OpenTofu in infra creates. Flux in infra reconciles the cluster, which runs Homepage, Renovate and Forgejo. The laptops, a T14 and a T460s, are built by dotfiles. Outside the house, Giran, a rented VPS that serves this site and mail, reaches the cluster over the tailnet.</desc>
<g style="stroke:var(--faint,#675d51)" stroke-dasharray="6 6">
<rect x="20" y="200" width="1160" height="860" rx="4" />
<rect x="50" y="400" width="1100" height="630" rx="4" />
<rect x="80" y="450" width="580" height="550" rx="4" />
<rect x="700" y="450" width="420" height="550" rx="4" />
<rect x="730" y="500" width="360" height="430" rx="4" />
</g>
<g font-size="18" letter-spacing="0.12em" style="fill:var(--faint,#675d51)">
<text x="36" y="228">HOME</text>
<text x="66" y="428">PROXMOX · RUNE AND DION</text>
<text x="96" y="478">LXCS</text>
<text x="716" y="478">DION</text>
<text x="746" y="528">TALOS · 2 VMS</text>
</g>
<g style="stroke:var(--fg,#1c1915)">
<rect x="40" y="30" width="300" height="120" rx="4" />
<rect x="860" y="30" width="300" height="120" rx="4" />
<rect x="50" y="250" width="320" height="110" rx="4" />
<rect x="410" y="250" width="320" height="110" rx="4" />
<rect x="100" y="530" width="240" height="110" rx="4" />
<rect x="400" y="530" width="240" height="110" rx="4" />
<rect x="100" y="680" width="240" height="110" rx="4" />
<rect x="400" y="680" width="240" height="110" rx="4" />
<rect x="760" y="550" width="300" height="80" rx="4" />
<rect x="760" y="670" width="300" height="80" rx="4" />
</g>
<rect x="100" y="830" width="540" height="140" rx="4" stroke-width="3" style="stroke:var(--mid,#b0551c)" />
<g font-family="Rubik,sans-serif" font-weight="600" style="fill:var(--fg,#1c1915)">
<text x="62" y="74" font-size="30">Laptops</text>
<text x="882" y="74" font-size="30">Giran</text>
<text x="72" y="290" font-size="30">Router</text>
<text x="432" y="290" font-size="30">TrueNAS</text>
<text x="120" y="570" font-size="26">Goddard</text>
<text x="420" y="570" font-size="26">Gludin</text>
<text x="120" y="720" font-size="26">Oren</text>
<text x="420" y="720" font-size="26">Heine</text>
<text x="780" y="584" font-size="24">Control plane</text>
<text x="780" y="704" font-size="24">Worker</text>
</g>
<text x="120" y="870" font-family="Rubik,sans-serif" font-size="26" font-weight="600" style="fill:var(--mid,#b0551c)">Aden</text>
<g font-size="18" style="fill:var(--faint,#675d51)">
<text x="62" y="102">T14 · T460s</text>
<text x="882" y="102">rented VPS · site, mail</text>
<text x="72" y="318">OpenWrt</text>
<text x="780" y="612">VM · 2 vCPU · 4 GiB</text>
<text x="780" y="732">VM · 4 vCPU · 8 GiB</text>
</g>
<g font-family="'Nunito Sans',sans-serif" font-size="20" style="fill:var(--dim,#4a4238)">
<text x="72" y="346">AdGuard Home · DNS</text>
<text x="432" y="320">Jellyfin, Immich</text>
<text x="120" y="600">Bitcoin node</text>
<text x="420" y="600">Dokploy</text>
<text x="120" y="750">Dev containers</text>
<text x="420" y="750">Forgejo Actions jobs</text>
<text x="120" y="900">Docker · a dozen containers</text>
<text x="760" y="850">Homepage · Renovate · Forgejo</text>
</g>
<g font-size="18" style="fill:var(--amber,#8a5a00)">
<text x="62" y="132">dotfiles</text>
<text x="110" y="228">infra · Ansible sets up the hosts</text>
<text x="882" y="132">infra · Ansible</text>
<text x="120" y="777">dotfiles</text>
<text x="120" y="930">infra · Ansible installs Docker</text>
<text x="760" y="790">infra · OpenTofu creates VMs</text>
<text x="760" y="880">infra · Flux reconciles</text>
</g>
<path d="M120 946l10 10M130 946l-10 10" stroke-width="2.5" style="stroke:var(--mid,#b0551c)" />
<text x="142" y="957" font-size="18" style="fill:var(--mid,#b0551c)">what runs on it: not in Git</text>
<path d="M1000 150V496" style="stroke:var(--fg,#1c1915)" />
<path d="M994 486L1000 496L1006 486" style="stroke:var(--fg,#1c1915)" />
<text x="988" y="300" font-size="18" text-anchor="end" style="fill:var(--fg,#1c1915)">reaches over tailnet</text>
</svg></figure>
<h2 id="two-repositories">Two repositories</h2>
<p>Both repositories are private for now, so I can’t link them. I plan to make both public, but they
need some work first to be safe to share. They split along one line: <code>dotfiles</code> covers the machines
I sit at and the containers agents work in, and <code>infra</code> covers everything else.</p>
<p>I’ve already written about <a href="https://unbeholden.dev/blog/an-agent-that-configures-my-machine" target="_blank" rel="noopener noreferrer">dotfiles</a>. It’s one Nix flake
that builds my T14 and the old T460s I keep as a backup, the shell on Oren and the dev container
profile. It also puts everything <code>infra</code> needs on the laptops: Ansible, OpenTofu, kubectl, talosctl,
the Flux CLI, and SOPS with age.</p>
<p><code>infra</code> has three layers:</p>
<ul>
<li><strong>Ansible</strong> holds the inventory and sets up the hosts. The bootstrap playbook takes a fresh Debian
machine, upgrades it, installs its firewall rules, turns on unattended upgrades and disables root
and password logins. Other playbooks install Docker, Tailscale and Headscale.</li>
<li><strong>OpenTofu</strong> creates the two Talos VMs on Dion: 2 vCPUs and 4 GiB of memory for the control plane,
4 vCPUs and 8 GiB for the worker. Its Proxmox API token only has permissions on those two VMs.
Installing Talos itself is still manual, and its configuration stays out of Git.</li>
<li><strong><a href="https://fluxcd.io" target="_blank" rel="noopener noreferrer">Flux</a></strong> watches a directory on <code>main</code> and reconciles the cluster against
whatever is there.</li>
</ul>
<p>Agents work on both repositories the same way they work on everything else. They open a pull
request and I merge it.</p>
<h2 id="the-cluster">The cluster</h2>
<p>Everything on the cluster sits behind one private address. <a href="https://metallb.io" target="_blank" rel="noopener noreferrer">MetalLB</a> holds the
address, <a href="https://traefik.io/traefik" target="_blank" rel="noopener noreferrer">Traefik</a> answers on it, and
<a href="https://cert-manager.io" target="_blank" rel="noopener noreferrer">cert-manager</a> gets a single wildcard certificate for it through a DNS
challenge. Secrets are in Git, encrypted with <a href="https://getsops.io" target="_blank" rel="noopener noreferrer">SOPS</a> and age. No port on the
router leads there, and Giran reaches it over the tailnet.</p>
<p>So far it runs <a href="https://gethomepage.dev" target="_blank" rel="noopener noreferrer">Homepage</a>, <a href="https://docs.renovatebot.com" target="_blank" rel="noopener noreferrer">Renovate</a> and
<a href="https://forgejo.org" target="_blank" rel="noopener noreferrer">Forgejo</a>.</p>
<p>Flux pulls its configuration from Forgejo, and Forgejo is one of the things Flux deploys. If Forgejo
goes down, the cluster keeps running what it has but stops taking changes.</p>
<h2 id="aden">Aden</h2>
<p>Most of what’s left runs on Aden, as Docker containers:</p>
<ul>
<li><a href="https://github.com/dani-garcia/vaultwarden" target="_blank" rel="noopener noreferrer">Vaultwarden</a> for passwords and
<a href="https://radicale.org" target="_blank" rel="noopener noreferrer">Radicale</a> for calendars and contacts.</li>
<li><a href="https://ntfy.sh" target="_blank" rel="noopener noreferrer">ntfy</a> for push notifications.</li>
<li><a href="https://umami.is" target="_blank" rel="noopener noreferrer">Umami</a> for analytics, with its Postgres.</li>
<li><a href="https://github.com/janoside/btc-rpc-explorer" target="_blank" rel="noopener noreferrer">BTC RPC Explorer</a> and
<a href="https://unbeholden.dev/blog/running-my-own-bitcoin-and-lightning-node" target="_blank" rel="noopener noreferrer">unbeholden-lnurl</a>, both of which talk to the node
on Goddard.</li>
<li><a href="https://unbeholden.dev/blog/a-reviewer-for-my-agents" target="_blank" rel="noopener noreferrer">reviewer</a> and
<a href="https://unbeholden.dev/blog/a-bitcoin-wallet-in-a-browser-tab" target="_blank" rel="noopener noreferrer">Unbeholden Wallet</a>, which I wrote.</li>
<li><a href="https://github.com/Finsys/dockhand" target="_blank" rel="noopener noreferrer">Dockhand</a>, which manages the others.</li>
</ul>
<p>That’s a dozen or so containers using about 500 MB of memory. Aden is backed up to TrueNAS, so I
wouldn’t lose the data, but <code>infra</code> installs Docker on it and stops there. Nothing in Git says what
runs on the host or how.</p>
<p>Versions are loose too. Most of the containers run <code>latest</code> or no tag at all, so which version I’m
on depends on when I last pulled.</p>
<h2 id="moving-aden-to-the-cluster">Moving Aden to the cluster</h2>
<p>I want everything in Git. Each service becomes a directory in <code>infra</code> with a pinned image, so the
repository says exactly what runs and a rebuild gives the same result. Renovate runs on the cluster
as a daily job and opens a pull request when a pinned image, Helm chart or OpenTofu provider has a
new release. It never merges one. I merge it, and Flux deploys the update from there.</p>
<p>I haven’t moved any of them yet. Forgejo has already made the same move, and its directory is the template:
a pinned chart, a retained volume and a written restore and cutover procedure.</p>
<p>Moving won’t make anything more available, because both Talos nodes are VMs on Dion. If Dion goes,
the cluster goes with it.</p>
<p>Three things need care on the way:</p>
<p><strong>Public routes.</strong> ntfy and Umami have public hostnames, and everything on the cluster today is
private. Traefik picks the app from the hostname in each request, so if Giran sent public traffic to
that address, one bad route could expose Forgejo or Vaultwarden. Public apps will get their own
Traefik on a second private address, and Giran will forward public traffic to that one alone.</p>
<p><strong>Storage.</strong> The cluster has no storage class. Each volume is a directory on the worker’s 32 GiB
disk, shared with images and logs, and it survives restarts and reboots but not losing the worker.
I’ll back the volumes up the way Aden is backed up, with a scheduled job in <code>infra</code> that copies
them to TrueNAS. That has to work before Radicale’s data or Umami’s database moves.</p>
<p><strong>Vaultwarden.</strong> The private age key that decrypts the cluster’s secrets is backed up in Vaultwarden,
so moving Vaultwarden onto the cluster looks circular. I’m fine with it, because my phone and laptop
keep local copies of the vault, and I can still get the key if the cluster is gone.</p>
<p>Dockhand doesn’t move. It has no job once Aden is empty.</p>]]></content>
        <category term="Self-hosting"/>
        <published>2026-10-31T00:00:00.000Z</published>
    </entry>
    <entry>
        <title type="html"><![CDATA[A Bitcoin wallet in a browser tab]]></title>
        <id>https://unbeholden.dev/blog/a-bitcoin-wallet-in-a-browser-tab</id>
        <link href="https://unbeholden.dev/blog/a-bitcoin-wallet-in-a-browser-tab"/>
        <updated>2026-10-22T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[I'm building Unbeholden Wallet, a watch-only Bitcoin wallet that runs in a browser tab. There's nothing to install, it connects to a node of your choosing, and it never holds a key.]]></summary>
        <content type="html"><![CDATA[<p>I was selling some bitcoin in person, on a new Linux laptop. I opened Sparrow to send the
coins, and it couldn’t open the camera because a system library was missing. I had no quick
alternative to finish the deal.</p>
<p>A wallet in a browser tab would have done it. So I’m building one:
<a href="https://wallet.unbeholden.dev" target="_blank" rel="noopener noreferrer">Unbeholden Wallet</a>. It’s a watch-only Bitcoin wallet that runs in
a browser, on a phone or a computer, with nothing to install. You choose which node it connects
to, and it never holds a key.</p>
<p>It’s on-chain only for now. Lightning may come later, and so might other things, but I’ll see
how it goes.</p>
<h2 id="why-not-sparrow">Why not Sparrow</h2>
<p>Sparrow is great, and it’s what I used. But it only runs on a desktop, and every machine I want it
on needs it installed. Most of what I do with a wallet is read-only: check a
balance, look through history, see which coins I hold. None of that should need software
installed on the machine in front of me.</p>
<p>The wallets that run anywhere tend to be custodial, or tied to a company’s server that sees every
address you look up, or unable to talk to my node. I already run
<a href="https://unbeholden.dev/blog/running-my-own-bitcoin-and-lightning-node" target="_blank" rel="noopener noreferrer">Bitcoin Core and Fulcrum at home</a>, so I wanted
a wallet that uses that and nothing else.</p>
<p>If you have to leave your country or lose access to your computer, you may still have your
hardware wallet. A browser wallet lets you check your balance or send a payment from a borrowed
phone or laptop. If you can’t reach your own node, you can use a browser-compatible public
Electrum server, though its operator can see the addresses you look up.</p>
<h2 id="what-it-does">What it does</h2>
<p>You give it a descriptor or an xpub from your signer. It works out your addresses, syncs from your
chosen Electrum server or Esplora API, and shows your balance, history, addresses and coins. It
handles single-signature <code>wpkh</code> and <code>tr</code> wallets, and <code>wsh</code> multisig, on mainnet, signet and
regtest.</p>
<p>To send, it builds a PSBT and shows it as an animated QR code. You hold the screen up to an
air-gapped signer such as a SeedSigner, it signs, and you scan the signed transaction back with
the camera. A file works too. Then the wallet broadcasts it through your chosen server.</p>
<p>The send screen starts from your coins. As you pick them it shows the fee and the change, and
which coins you’d be linking together on-chain that weren’t linked before. In the wallets I know,
coin selection is behind an advanced toggle, and none of them tell you that.</p>
<p>Some other things I wanted:</p>
<ul>
<li>labels in BIP329, so they move in and out of other wallets</li>
<li>fee suggestions from your chosen node’s mempool, and fee bumps when a payment gets stuck</li>
<li>amounts in BTC or sats, and no fiat anywhere</li>
<li>an encrypted vault in the browser, unlocked with a password</li>
</ul>
<p>There’s no default server. Until you enter yours, it does nothing. If your Electrum server only
speaks TCP, as <a href="https://github.com/romanz/electrs" target="_blank" rel="noopener noreferrer">electrs</a> does, the container below has a bridge for it.</p>
<h2 id="why-it-cant-spend-your-coins">Why it can’t spend your coins</h2>
<p>The wallet never sees a private key. The worst a bug or a tampered copy can do is show you the
wrong thing or build the wrong transaction, and your signer still shows you the addresses and
amounts before you approve. That’s a much smaller risk than a wallet that can spend on its own,
and it’s the reason I was willing to put a wallet on a web page at all.</p>
<figure><svg viewBox="0 0 1200 670" role="img" aria-labelledby="sl-title sl-desc" font-family="'IBM Plex Mono',ui-monospace,monospace" font-size="20" fill="none" stroke-width="1.5">
<title id="sl-title">How the wallet sends a payment without ever holding the key</title>
<desc id="sl-desc">The browser tab is watch-only. It holds a descriptor or xpub and no private key. To send, it builds a PSBT and shows it as an animated QR code to an air-gapped signer such as a SeedSigner. The signer holds the private key, which never leaves it. It shows the addresses and amounts; you approve and it signs. You scan the signed transaction back into the tab with the camera, or load it from a file. The wallet then broadcasts it through your chosen Electrum server or Esplora API.</desc>
<g style="stroke:var(--faint,#675d51)" stroke-dasharray="6 6">
<rect x="40" y="100" width="480" height="340" rx="4" />
<rect x="780" y="100" width="380" height="340" rx="4" />
</g>
<g font-size="18" letter-spacing="0.12em" style="fill:var(--faint,#675d51)">
<text x="56" y="128">BROWSER TAB · WATCH-ONLY</text>
<text x="796" y="128">AIR-GAPPED SIGNER</text>
</g>
<rect x="70" y="150" width="420" height="230" rx="4" style="stroke:var(--fg,#1c1915)" />
<text x="92" y="196" font-family="Rubik,sans-serif" font-size="30" font-weight="600" style="fill:var(--fg,#1c1915)">Unbeholden Wallet</text>
<g style="fill:var(--fg,#1c1915)">
<text x="122" y="256">descriptor, xpub</text>
<text x="122" y="292">builds the PSBT</text>
</g>
<text x="122" y="328" style="fill:var(--mid,#b0551c)">private key</text>
<path d="M96 249l5 5 10-12M96 285l5 5 10-12" style="stroke:var(--fg,#1c1915)" />
<path d="M98 315l10 10M108 315l-10 10" style="stroke:var(--mid,#b0551c)" />
<rect x="810" y="150" width="320" height="230" rx="4" style="stroke:var(--fg,#1c1915)" />
<text x="832" y="196" font-family="Rubik,sans-serif" font-size="30" font-weight="600" style="fill:var(--fg,#1c1915)">Signer</text>
<text x="832" y="226" font-size="18" style="fill:var(--faint,#675d51)">e.g. SeedSigner</text>
<rect x="832" y="244" width="200" height="40" rx="4" stroke-width="3" style="stroke:var(--amber,#8a5a00)" />
<text x="848" y="271" style="fill:var(--amber,#8a5a00)">private key</text>
<g font-family="'Nunito Sans',sans-serif" font-size="20" style="fill:var(--dim,#4a4238)">
<text x="866" y="322">Shows addresses, amounts</text>
<text x="866" y="352">You approve, it signs</text>
</g>
<text x="796" y="424" font-family="'Nunito Sans',sans-serif" font-size="20" style="fill:var(--dim,#4a4238)">The key never leaves</text>
<path d="M490 220H806" style="stroke:var(--fg,#1c1915)" />
<path d="M796 214L806 220L796 226" style="stroke:var(--fg,#1c1915)" />
<text x="572" y="208" font-size="18" style="fill:var(--fg,#1c1915)">PSBT · animated QR</text>
<path d="M810 330H494" style="stroke:var(--fg,#1c1915)" />
<path d="M504 324L494 330L504 336" style="stroke:var(--fg,#1c1915)" />
<text x="572" y="318" font-size="18" style="fill:var(--fg,#1c1915)">scan signed tx</text>
<text x="572" y="358" font-size="18" style="fill:var(--faint,#675d51)">camera, or a file</text>
<path d="M280 380V516" style="stroke:var(--fg,#1c1915)" />
<path d="M274 506L280 516L286 506" style="stroke:var(--fg,#1c1915)" />
<text x="322" y="484" font-size="18" style="fill:var(--fg,#1c1915)">broadcast</text>
<rect x="70" y="520" width="420" height="120" rx="4" style="stroke:var(--fg,#1c1915)" />
<text x="92" y="564" font-family="Rubik,sans-serif" font-size="26" font-weight="600" style="fill:var(--fg,#1c1915)">Your server</text>
<text x="92" y="600" font-family="'Nunito Sans',sans-serif" font-size="20" style="fill:var(--dim,#4a4238)">Electrum server or Esplora API</text>
<g style="stroke:var(--fg,#1c1915)">
<circle cx="552" cy="202" r="13" />
<circle cx="846" cy="316" r="13" />
<circle cx="552" cy="312" r="13" />
<circle cx="302" cy="478" r="13" />
</g>
<g font-size="18" text-anchor="middle" style="fill:var(--fg,#1c1915)">
<text x="552" y="208">1</text>
<text x="846" y="322">2</text>
<text x="552" y="318">3</text>
<text x="302" y="484">4</text>
</g>
</svg></figure>
<h2 id="what-a-hosted-copy-cant-protect-you-from">What a hosted copy can’t protect you from</h2>
<p>There’s a copy anyone can open at <a href="https://app.wallet.unbeholden.dev" target="_blank" rel="noopener noreferrer">app.wallet.unbeholden.dev</a>.
It’s for a phone, or a borrowed laptop in an emergency. On a computer that isn’t yours, delete the
vault in Settings when you’re done.</p>
<p>Whoever controls the domain could serve you different code, for example to show you a receive
address that isn’t yours. Nothing in a web page can rule that out.</p>
<p>After the first load a service worker pins the code, so a new version only runs when you choose
to reload into it. It makes no requests to anyone but your chosen server, with no analytics,
CDN or remote fonts, and a Content Security Policy blocks other kinds of request. Builds are
reproducible, and each release publishes the hashes of its files, so you can check that a copy
matches the source.</p>
<p>For regular use, run your own copy. It’s one container:</p>
<pre class="astro-code unbeholden" style="background-color:transparent;color:var(--dim);overflow-x:auto" tabindex="0" data-language="sh"><code><span class="line"><span style="color:var(--dim)">curl </span><span style="color:var(--dim)">-O</span><span style="color:var(--dim)"> https://raw.githubusercontent.com/unbeholdendev/unbeholden-wallet/main/compose.yaml</span></span>
<span class="line"><span style="color:var(--dim)">docker </span><span style="color:var(--dim)">compose</span><span style="color:var(--dim)"> up</span><span style="color:var(--dim)"> -d</span></span></code></pre>
<p>That serves it on <code>http://localhost:8080</code>. To open it on your phone, put https in front of it,
with Tailscale or Caddy for example. The
<a href="https://wallet.unbeholden.dev/self-hosting.html" target="_blank" rel="noopener noreferrer">self-hosting guide</a> has the details, including
how to give your node a certificate the browser will accept.</p>
<h2 id="how-it-was-built">How it was built</h2>
<p>AI wrote the code, under my direction. Agents work on it in containers, open pull requests on
Forgejo at home, and <a href="https://unbeholden.dev/blog/a-reviewer-for-my-agents" target="_blank" rel="noopener noreferrer">a reviewer bot</a> goes through each one
before I do. I decide what it does and review the work. Writing it by hand would have taken far
longer, but you should know how it was made before you trust it with your data.</p>
<h2 id="trying-it">Trying it</h2>
<p>The <a href="https://demo.wallet.unbeholden.dev" target="_blank" rel="noopener noreferrer">demo</a> is the real app on a wallet with made-up history.
It talks to no server, so you don’t need a node to try it. When you’re ready to use your own
coins, open the wallet and point it at a node of your choosing, or run it yourself.</p>]]></content>
        <category term="Self-hosting"/>
        <published>2026-10-22T00:00:00.000Z</published>
    </entry>
    <entry>
        <title type="html"><![CDATA[How much of your website is rented?]]></title>
        <id>https://unbeholden.dev/blog/how-much-of-your-website-is-rented</id>
        <link href="https://unbeholden.dev/blog/how-much-of-your-website-is-rented"/>
        <updated>2026-10-16T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[I built Unbeholden Check as a small weekend project. Type a domain and it lists the services the site rents from other companies, shows the evidence for each, and names open source software that could take its place.]]></summary>
        <content type="html"><![CDATA[<p>Most of what I write here is about moving things I depend on off services I rent and onto
software I run. Mail went to <a href="https://unbeholden.dev/blog/self-hosting-email-with-stalwart" target="_blank" rel="noopener noreferrer">Stalwart</a>, and payments go
through <a href="https://unbeholden.dev/blog/running-my-own-bitcoin-and-lightning-node" target="_blank" rel="noopener noreferrer">my Lightning node</a>. What I didn’t
have was a quick way to see how much of a website is still rented, mine or anyone else’s.</p>
<p>So I built <a href="https://check.unbeholden.dev" target="_blank" rel="noopener noreferrer">Unbeholden Check</a> as a small weekend project. You type a domain, without signing
up, and it marks every third party it finds as owned or rented, shows the evidence, and names
open source software that could replace each rented piece.</p>
<h2 id="what-a-result-looks-like">What a result looks like</h2>
<p>This site scores 50 out of 100. Check scored four things:</p>
<ul>
<li>SMTP2Go, rented. The SPF record includes <code>spf.smtp2go.com</code>. That’s the relay I send mail
through, and Check suggests docker-mailserver, Stalwart or Mailcow in its place.</li>
<li>Spaceship DNS, rented. The nameservers are Spaceship’s. The suggestions are CoreDNS,
Technitium DNS and PowerDNS.</li>
<li>Mail server, owned. The MX record points at <code>mail.unbeholden.dev</code>.</li>
<li>Web server, owned. The IP is in netcup’s network, and the software on it is open source.</li>
</ul>
<p>The VPS is rented hardware, so calling it owned looks odd. Check scores the software: a server
running open source counts as owned, and a service that a company runs for the site counts as
rented.</p>
<p>It also found six things it lists but doesn’t score: Astro, the RSS feed, Open Graph tags, HSTS,
HTTP/3 and a Google site verification record.</p>
<p>For contrast, <a href="https://check.unbeholden.dev/stripe.com" target="_blank" rel="noopener noreferrer">stripe.com</a> scores 33. Its DNS is on
Amazon Route 53, its mail is on Google Workspace, and it sends through Mandrill, SendGrid and
Qualtrics. It also has domain verification records for eight other companies, such as Atlassian and
DocuSign, which Check lists as accounts and leaves out of the score.</p>
<h2 id="how-the-score-works">How the score works</h2>
<p>The score is the weighted share of scored services that run on open source. Mail, DNS and
hosting count three times. CDN, auth, payments, forms, CRM and CMS count twice. Everything else
counts once, and when a site uses several providers in one category they share its weight.
Libraries and frameworks are listed but don’t count.</p>
<figure><svg viewBox="0 0 1200 450" role="img" aria-labelledby="sc-title sc-desc" font-family="'IBM Plex Mono',ui-monospace,monospace" font-size="20" fill="none" stroke-width="1.5">
<title id="sc-title">How this site scores 50: half its weight is owned</title>
<desc id="sc-desc">Check scored four services on unbeholden.dev, drawn as one bar whose segments are as wide as their weights, 9 in total. Owned: the web server, hosting, weight 3, and the mail server, mail, weight 1.5. Rented: SMTP2Go, mail, weight 1.5, and Spaceship DNS, DNS, weight 3. Mail, DNS and hosting each count 3, and the two mail providers share the mail weight, 1.5 each. Owned weight is 4.5 of 9, so the score is 50. Six findings are listed but not scored: Astro, the RSS feed, Open Graph tags, HSTS, HTTP/3 and a Google site verification record.</desc>
<defs>
<pattern id="sc-hatch" patternUnits="userSpaceOnUse" width="12" height="12" patternTransform="rotate(45)">
<path d="M0 0V12" stroke-width="4" style="stroke:var(--mid,#b0551c)" />
</pattern>
</defs>
<text x="60" y="58" font-family="Rubik,sans-serif" font-size="34" font-weight="600" style="fill:var(--amber,#8a5a00)">Owned · score 50</text>
<text x="620" y="58" font-family="Rubik,sans-serif" font-size="34" font-weight="600" style="fill:var(--mid,#b0551c)">Rented</text>
<g font-size="18" style="fill:var(--dim,#4a4238)">
<text x="60" y="90">4.5 of 9 weight = 50%</text>
<text x="620" y="90">4.5 of 9 weight = 50%</text>
</g>
<path d="M60 116V106H596V116" style="stroke:var(--amber,#8a5a00)" />
<path d="M604 116V106H1140V116" style="stroke:var(--mid,#b0551c)" />
<g style="fill:var(--amber,#8a5a00);stroke:var(--amber,#8a5a00)">
<rect x="61" y="130" width="356" height="80" />
<rect x="423" y="130" width="176" height="80" />
</g>
<g fill="url(#sc-hatch)" style="stroke:var(--mid,#b0551c)">
<rect x="601" y="130" width="176" height="80" />
<rect x="783" y="130" width="356" height="80" />
</g>
<g font-family="Rubik,sans-serif" font-size="24" font-weight="600" style="fill:var(--fg,#1c1915)">
<text x="60" y="246">Web server</text>
<text x="420" y="246">Mail server</text>
<text x="600" y="246">SMTP2Go</text>
<text x="780" y="246">Spaceship DNS</text>
</g>
<g font-size="18" style="fill:var(--dim,#4a4238)">
<text x="60" y="274">hosting · 3</text>
<text x="420" y="274">mail · 1.5</text>
<text x="600" y="274">mail · 1.5</text>
<text x="780" y="274">DNS · 3</text>
</g>
<path d="M420 292V302H780V292" style="stroke:var(--faint,#675d51)" />
<text x="420" y="330" font-family="'Nunito Sans',sans-serif" font-size="20" style="fill:var(--dim,#4a4238)">Mail counts 3, shared by two providers</text>
<path d="M60 370H1140" stroke-dasharray="6 6" style="stroke:var(--faint,#675d51)" />
<text x="60" y="404" font-size="18" letter-spacing="0.12em" style="fill:var(--faint,#675d51)">LISTED, NOT SCORED · WEIGHT 0</text>
<text x="60" y="434" font-family="'Nunito Sans',sans-serif" font-size="20" style="fill:var(--dim,#4a4238)">Astro · RSS feed · Open Graph tags · HSTS · HTTP/3 · Google site verification</text>
</svg></figure>
<p>If Check can’t find enough to score, it shows “not enough data” in place of a number.</p>
<h2 id="the-alternatives">The alternatives</h2>
<p>Each rented tool gets up to three open source alternatives. I picked them by hand, and each one
has to have an OSI licence, a release in the last 12 months, and a repository that isn’t
archived. Next to each is its licence, GitHub stars, latest release, and a way to self-host it or
pay someone to run it for you. Where I’ve written about one, like Stalwart, there’s a link to the
entry.</p>
<p>It knows 103 rented tools and 63 open source projects that can replace them. When I haven’t found
anything I’d vouch for, the result says so and names nothing.</p>
<h2 id="what-it-cant-see">What it can’t see</h2>
<p>Check reads DNS and makes one plain fetch of the homepage. It doesn’t run JavaScript, so a tool
that a script loads after the page arrives may not show up, and every result page says this.</p>
<p>It’s passive on purpose. I’d rather miss a tool than claim one that isn’t there, and every finding
comes with the record, header or bit of HTML it’s based on, so you can check it yourself.</p>
<p>Results are cached for a day, and you can rescan a domain once an hour.</p>
<p>Check doesn’t look at where a company is, and it doesn’t sell anything.</p>
<h2 id="using-it">Using it</h2>
<p>Go to <a href="https://check.unbeholden.dev" target="_blank" rel="noopener noreferrer">check.unbeholden.dev</a> and type a domain. Each result has its
own page at <code>check.unbeholden.dev/&lt;domain&gt;</code>, so you can share it.</p>
<p>You can leave your email on a result to hear when its score changes. Nothing gets sent yet, and
the first email will ask you to confirm. To have a result page taken down, email
<a href="mailto:removal@unbeholden.dev" target="_blank" rel="noopener noreferrer">removal@unbeholden.dev</a>.</p>]]></content>
        <category term="Self-hosting"/>
        <published>2026-10-16T00:00:00.000Z</published>
    </entry>
    <entry>
        <title type="html"><![CDATA[A code reviewer for coding agents]]></title>
        <id>https://unbeholden.dev/blog/a-reviewer-for-my-agents</id>
        <link href="https://unbeholden.dev/blog/a-reviewer-for-my-agents"/>
        <updated>2026-11-11T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Agents open pull requests on a self-hosted Forgejo, and a bot running Pi reviews each one. The agents work through the obvious problems with it first, and I take the last look before anything merges and goes to production.]]></summary>
        <content type="html"><![CDATA[<p>The agents work from containers that can’t reach anything important. They push a branch to a
self-hosted <a href="https://forgejo.org" target="_blank" rel="noopener noreferrer">Forgejo</a> and open a pull request, and none of them can merge. I wrote
about that setup in
<a href="https://unbeholden.dev/blog/an-agent-that-configures-my-machine" target="_blank" rel="noopener noreferrer">an agent that configures my machine</a>. The short
version is that I review once, on the diff.</p>
<p>So I built
<a href="https://github.com/unbeholdendev/reviewer" target="_blank" rel="noopener noreferrer">reviewer</a>, a bot that reviews each pull request
before I get to it. It runs <a href="https://github.com/earendil-works/pi" target="_blank" rel="noopener noreferrer">Pi</a> against the change and posts a normal Forgejo review:
a recommendation, a short summary, and comments on the lines it has something to say about.</p>
<h2 id="what-a-review-looks-like">What a review looks like</h2>
<p>When the <a href="https://unbeholden.dev/contact" target="_blank" rel="noopener noreferrer">contact form</a> on this site went in, the first review came
back as “nits”. The form posts messages to ntfy, and the agent had capped the message by
character count. Here’s the part of the thread about that cap. The words are the bot’s and the
agent’s, trimmed where you see “…”.</p>
<div class="space-y-3"><div class="callout text-body overflow-hidden"><p class="border-key text-meta flex flex-wrap items-baseline gap-x-3 border-b px-4 py-2 font-mono"><span class="text-mid">reviewer</span><span class="border-faint text-dim border px-1.5 text-[13px]">nits</span></p><div class="space-y-3 px-4 py-3"><p>Adds a /contact page that posts a name/email/message to ntfy … Logic for validation,
rate-limit status codes, and the subscribe.astro refactor all check out; one real but narrow
issue found around the message size cap.</p></div></div><div class="callout text-body overflow-hidden"><p class="border-key text-meta flex flex-wrap items-baseline gap-x-3 border-b px-4 py-2 font-mono"><span class="text-mid">reviewer</span><span class="border-faint text-dim border px-1.5 text-[13px]">nit</span><span class="text-faint ml-auto text-[13px]">src/pages/contact.astro</span></p><pre class="border-key overflow-x-auto border-b py-2 font-mono text-[13px] leading-6 [tab-size:2]"><span class="block px-4 text-dim">+	// A bot fills the hidden field. Tell it yes and send nothing.</span><span class="block px-4 text-dim">+	if (String(form.get(&#39;website&#39;) ?? &#39;&#39;) !== &#39;&#39;) state = &#39;sent&#39;;</span><span class="block px-4 bg-bg2">+	else if (!message || message.length &gt; MAX) state = &#39;failed&#39;;</span></pre><div class="space-y-3 px-4 py-3"><p>MAX (3500) is compared against message.length, which counts UTF-16 code units, not UTF-8
bytes. … a long message in e.g. Cyrillic or CJK can be well under 3500 chars yet produce a
JSON payload far over 4096 bytes, causing ntfy to reject it and the form to show ‘failed’ with
no way to know why.</p></div></div><div class="callout text-body overflow-hidden ml-6 sm:ml-10"><p class="border-key text-meta flex flex-wrap items-baseline gap-x-3 border-b px-4 py-2 font-mono"><span>agent</span></p><div class="space-y-3 px-4 py-3"><p>@reviewer both fixed in 01fbad2. … Whatever ntfy gets is cut to 3700 bytes, with a note saying
the whole message is in the server log. … Checked: 3000 × “Ж” (6000 bytes) goes through and the
push comes out at 3763 bytes.</p></div></div><div class="callout text-body overflow-hidden ml-6 sm:ml-10"><p class="border-key text-meta flex flex-wrap items-baseline gap-x-3 border-b px-4 py-2 font-mono"><span class="text-mid">reviewer</span></p><div class="space-y-3 px-4 py-3"><p>Fixed in 01fbad2.</p></div></div><div class="callout text-body overflow-hidden"><p class="border-key text-meta flex flex-wrap items-baseline gap-x-3 border-b px-4 py-2 font-mono"><span class="text-mid">reviewer</span><span class="border-faint text-dim border px-1.5 text-[13px]">nit</span><span class="text-faint ml-auto text-[13px]">src/pages/contact.astro</span></p><pre class="border-key overflow-x-auto border-b py-2 font-mono text-[13px] leading-6 [tab-size:2]"><span class="block px-4 text-dim">+			const sent = await push({</span><span class="block px-4 text-dim">+				title: name ? `Message from ${name}` : &#39;Message&#39;,</span><span class="block px-4 bg-bg2">+				message: email ? `${fit(message)}\n\n${email}` : fit(message),</span></pre><div class="space-y-3 px-4 py-3"><p><code>fit()</code> caps the message to 3700 bytes, but the email address is appended afterward without
being counted against the 4096-byte ntfy cap. … This is a narrow edge case (plain-ASCII emails,
the common case, stay well within budget) but it’s the exact class of bug this commit set out to
fix.</p></div></div><div class="callout text-body overflow-hidden ml-6 sm:ml-10"><p class="border-key text-meta flex flex-wrap items-baseline gap-x-3 border-b px-4 py-2 font-mono"><span>agent</span></p><div class="space-y-3 px-4 py-3"><p>@reviewer leaving this one as it is. It only happens with a near-limit message plus an email
address of about 100 or more multi-byte characters, which no real mailbox uses. Even then, the
message is already in the log before the push, and the reader is told it failed and keeps their
text.</p></div></div><div class="callout text-body overflow-hidden ml-6 sm:ml-10"><p class="border-key text-meta flex flex-wrap items-baseline gap-x-3 border-b px-4 py-2 font-mono"><span class="text-mid">reviewer</span></p><div class="space-y-3 px-4 py-3"><p>Agreed. … Threading email length into <code>fit()</code>’s budget is real extra plumbing for a combination
(near-max multi-byte message <em>and</em> a ~100+ char multi-byte email) that no genuine sender hits.
Leaving it as-is is the right call.</p></div></div></div>
<p>The second review covered only the commit the agent had pushed. It closed its own comment, then
found a smaller version of the same bug in the fix. The agent didn’t fix that one and said why,
and the bot checked the arithmetic and agreed. The last review on the PR, after a rename I’d
asked for, was “looks-good”.</p>
<p>Every review starts with one of three recommendations: <code>blocking</code>, <code>nits</code> or <code>looks-good</code>. Each
inline comment is marked <code>blocking</code> or <code>nit</code>.</p>
<h2 id="what-it-does">What it does</h2>
<ul>
<li>Reviews a pull request when it’s opened, reopened, or taken out of draft.</li>
<li>On each push, reviews only the commits since its last review, and says which of its earlier
comments they fix. A new push cancels a review that’s still running.</li>
<li>Answers when someone mentions it in a comment, or replies in a thread it started.</li>
<li>Starts again from scratch on <code>@reviewer review again</code>.</li>
<li>Skips pull requests labelled <code>no-review</code>, and leaves lockfiles and vendored code out of the
diff.</li>
<li>Reacts 👀 when it starts, and posts a comment if a review fails.</li>
</ul>
<p>It reads <code>REVIEW.md</code> and <code>AGENTS.md</code> from the base branch as the repository’s rules.
Reading them from the base matters: a pull request can’t rewrite the rules it’s reviewed by.</p>
<h2 id="what-i-ask-it-for">What I ask it for</h2>
<p>The prompt is <a href="https://github.com/unbeholdendev/reviewer/blob/main/prompts/review.md" target="_blank" rel="noopener noreferrer">in the repo</a>.
It looks for bugs, security problems and missing error handling, but it also looks for more code
than the task needs: helpers nobody asked for, checks for cases that can’t happen, comments that
repeat the code.</p>
<p>It only flags a problem the pull request introduced, that it can point to, and that the author
would fix if they knew. The prompt says no findings beats weak findings.</p>
<p>The agents read its reviews too. Their instructions say to wait for the review after they
open a pull request, fix what’s right, and reply to every comment with what they changed or why
they didn’t. A push starts another review, and they go round again until there’s nothing left
they’d change.</p>
<h2 id="running-it-safely">Running it safely</h2>
<p>A pull request is untrusted input. It’s code someone else wrote, and the diff, the commits and
the description can all contain text that reads like instructions. The bot is built on that
assumption:</p>
<ul>
<li>Pi runs in a checkout of the pull request with only read, grep, find and ls. It can’t run
commands or write files, and the tools refuse paths and symlinks outside the checkout.</li>
<li>It doesn’t load settings, extensions or skills from the checkout. A pull request that adds
one can’t get it run.</li>
<li>Pi runs inside the server process, not in a sandbox. So the bot has a container to itself,
with only the credentials and repositories it needs.</li>
<li>What it returns is JSON against a schema. The server checks it, and a comment on a line that
isn’t in the diff goes in the review body instead of on the line.</li>
<li>Each run has a ten-minute timeout.</li>
</ul>
<p>So the worst a prompt injection can do is get a bad review posted, and I read the diff anyway.</p>
<h2 id="how-its-built">How it’s built</h2>
<p>About 700 lines of TypeScript on <a href="https://bun.sh" target="_blank" rel="noopener noreferrer">Bun</a>, plus 1,100 of tests. A Forgejo webhook
hits the server, the signature is checked, and a job starts for that pull request. There’s one
job per pull request and a global limit on how many run at once, two by default.</p>
<p>To review, it checks out the pull request head in a git worktree, builds the diff, and passes Pi
the prompt, the repository’s rules, the conversation so far and its own open comments.
Pi’s SDK does the work inside the server, with no CLI installed. It signs in with an OpenAI
subscription, so there’s no separate API bill.</p>
<p>Each review ends with a hidden marker holding the commit it reviewed, and the next review reads
that marker to know where to start the diff. Its open comments and the conversation come
straight from Forgejo each time.</p>
<p>It runs as one container from a compose file.</p>
<h2 id="the-downsides">The downsides</h2>
<p>It reviews what’s in the diff and the code around it. It doesn’t run anything, so it can’t tell
me whether something works, only whether it reads as if it does. The tests run separately, in CI.</p>
<p>It’s still a model, and some of what it says will be wrong.</p>
<h2 id="what-id-add-next">What I’d add next</h2>
<p>It only sees the repository the pull request is in. When a change leans on code in another
repository, it can’t go and read that code.</p>
<p>It remembers nothing across pull requests. A later one touching the contact form could get
the email nit again, and the same argument. I’d like it to know what’s been discussed and decided
already: earlier reviews, issues, and the decisions written down in the repository.</p>
<h2 id="using-it">Using it</h2>
<p>The code is public:
<a href="https://github.com/unbeholdendev/reviewer" target="_blank" rel="noopener noreferrer">unbeholdendev/reviewer</a>. It needs a Forgejo user
for the bot, an OpenAI subscription or an API key, and a webhook on each repository or on the org. The README has the
rest.</p>]]></content>
        <category term="Agents / Self-hosting"/>
        <published>2026-10-13T00:00:00.000Z</published>
    </entry>
    <entry>
        <title type="html"><![CDATA[Dictation on a laptop too slow to transcribe]]></title>
        <id>https://unbeholden.dev/blog/dictation-on-a-slow-laptop</id>
        <link href="https://unbeholden.dev/blog/dictation-on-a-slow-laptop"/>
        <updated>2026-10-10T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[I ran speech-to-text locally with Handy, but the laptop couldn't keep up. Now a short shell script records the clip and sends it to Whisper on Groq.]]></summary>
        <content type="html"><![CDATA[<p>I press <code>Mod+D</code>, talk, press it again, and the text turns up at the cursor. Most of what I
dictate is instructions to my agents.</p>
<p>For a while transcription ran on the laptop itself, the ThinkPad T460s from
<a href="https://unbeholden.dev/blog/an-agent-that-configures-my-machine" target="_blank" rel="noopener noreferrer">an earlier entry</a>. It’s a stopgap with 8GB of memory
and an old CPU, fine as a thin client but too slow for speech-to-text.</p>
<h2 id="handy-locally">Handy, locally</h2>
<p><a href="https://github.com/cjpais/Handy" target="_blank" rel="noopener noreferrer">Handy</a> records you, transcribes with a local model so nothing
leaves the machine, and types the result. It took a few fixes to get working under niri, but it
was too slow. Even on Canary 180M, a small model, a longer clip could take 20-30 seconds to come
back.</p>
<h2 id="groq-instead">Groq instead</h2>
<p>So I dropped Handy for a short script. The first press starts recording with <code>ffmpeg</code>, the
second stops it, sends the clip off, and types what comes back with <code>wtype</code>.</p>
<p>I tried Gemini first. It took 3-4 seconds and on the free tier mostly answered “service
overloaded”. Now the clip goes to <code>whisper-large-v3-turbo</code>, a dedicated speech-to-text
model, on <a href="https://groq.com" target="_blank" rel="noopener noreferrer">Groq</a>. The free tier allows about 2,000 requests a day, and it’s near
instant: I stop talking and the text is there. Whisper punctuates well enough that I’m trying it
without a clean-up pass, an LLM tidying the text, for now.</p>
<p>Here it is, as the Home Manager module that installs it. The prompt is a list of words Whisper
would otherwise mishear, and the API key sits in a file outside the repo.</p>
<pre class="astro-code unbeholden" style="background-color:transparent;color:var(--dim); overflow-x: auto;" tabindex="0" data-language="nix"><code><span class="line"><span style="color:var(--dim)">{ pkgs, ... }:</span></span>
<span class="line"><span style="color:var(--dim)">let</span></span>
<span class="line"><span style="color:var(--dim)">  prompt = </span><span style="color:var(--dim)">"niri, noctalia, nixpkgs, NixOS, home-manager, disko, forgejo, yazi, foot, zsh."</span><span style="color:var(--dim)">;</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--dim)">  dictate = pkgs.writeShellApplication {</span></span>
<span class="line"><span style="color:var(--dim)">    name = </span><span style="color:var(--dim)">"dictate"</span><span style="color:var(--dim)">;</span></span>
<span class="line"><span style="color:var(--dim)">    runtimeInputs = with pkgs; [</span></span>
<span class="line"><span style="color:var(--dim)">      coreutils</span></span>
<span class="line"><span style="color:var(--dim)">      curl</span></span>
<span class="line"><span style="color:var(--dim)">      ffmpeg</span></span>
<span class="line"><span style="color:var(--dim)">      libnotify</span></span>
<span class="line"><span style="color:var(--dim)">      wl-clipboard</span></span>
<span class="line"><span style="color:var(--dim)">      wtype</span></span>
<span class="line"><span style="color:var(--dim)">    ];</span></span>
<span class="line"><span style="color:var(--dim)">    text = </span><span style="color:var(--dim)">''</span></span>
<span class="line"><span style="color:var(--dim)">      clip="$XDG_RUNTIME_DIR/dictate.wav"</span></span>
<span class="line"><span style="color:var(--dim)">      pidfile="$XDG_RUNTIME_DIR/dictate.pid"</span></span>
<span class="line"><span style="color:var(--dim)">      log="$XDG_RUNTIME_DIR/dictate.log"</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--dim)">      pid=$(cat "$pidfile" 2&gt;/dev/null || true)</span></span>
<span class="line"><span style="color:var(--dim)">      rm -f "$pidfile"</span></span>
<span class="line"><span style="color:var(--dim)">      if [ -n "$pid" ] &amp;&amp; kill -INT "$pid" 2&gt;/dev/null; then</span></span>
<span class="line"><span style="color:var(--dim)">        while kill -0 "$pid" 2&gt;/dev/null; do sleep 0.05; done</span></span>
<span class="line"><span style="color:var(--dim)">      else</span></span>
<span class="line"><span style="color:var(--dim)">        notify-send -t 1000 "Dictating" || true</span></span>
<span class="line"><span style="color:var(--dim)">        ffmpeg -nostdin -loglevel error -y \</span></span>
<span class="line"><span style="color:var(--dim)">          -f pulse -i default -ac 1 -ar 16000 "$clip" &amp;</span></span>
<span class="line"><span style="color:var(--dim)">        echo $! &gt; "$pidfile"</span></span>
<span class="line"><span style="color:var(--dim)">        exit 0</span></span>
<span class="line"><span style="color:var(--dim)">      fi</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--dim)">      text=$(curl -sS --fail-with-body \</span></span>
<span class="line"><span style="color:var(--dim)">        https://api.groq.com/openai/v1/audio/transcriptions \</span></span>
<span class="line"><span style="color:var(--dim)">        -H "Authorization: Bearer $(cat "$HOME/.groq-token")" \</span></span>
<span class="line"><span style="color:var(--dim)">        -F model=whisper-large-v3-turbo \</span></span>
<span class="line"><span style="color:var(--dim)">        -F response_format=text \</span></span>
<span class="line"><span style="color:var(--dim)">        -F language=en \</span></span>
<span class="line"><span style="color:var(--dim)">        -F prompt=</span><span style="color:var(--dim)">${pkgs.lib.escapeShellArg prompt}</span><span style="color:var(--dim)"> \</span></span>
<span class="line"><span style="color:var(--dim)">        -F file=@"$clip" | tee "$log") || text=</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--dim)">      rm -f "$clip"</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--dim)">      if [ -z "$text" ]; then</span></span>
<span class="line"><span style="color:var(--dim)">        notify-send -u critical "Dictation failed" "$log" || true</span></span>
<span class="line"><span style="color:var(--dim)">        exit 1</span></span>
<span class="line"><span style="color:var(--dim)">      fi</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--dim)">      printf '%s' "$text" | wl-copy</span></span>
<span class="line"><span style="color:var(--dim)">      printf '%s' "$text" | wtype -</span></span>
<span class="line"><span style="color:var(--dim)">      notify-send -t 2000 "Dictated" "$text" || true</span></span>
<span class="line"><span style="color:var(--dim)">    ''</span><span style="color:var(--dim)">;</span></span>
<span class="line"><span style="color:var(--dim)">  };</span></span>
<span class="line"><span style="color:var(--dim)">in</span></span>
<span class="line"><span style="color:var(--dim)">{</span></span>
<span class="line"><span style="color:var(--dim)">  home.packages = [ dictate ];</span></span>
<span class="line"><span style="color:var(--dim)">}</span></span></code></pre>
<p>niri binds it to a key with <code>Mod+D repeat=false { spawn "dictate"; }</code>. The text also lands on the clipboard,
in case the cursor was somewhere <code>wtype</code> can’t type into.</p>
<h2 id="what-it-costs">What it costs</h2>
<p>My voice now goes to Groq every time I press the key, and dictation needs a network connection.
I’m fine with both for now, since what I dictate isn’t sensitive and this laptop is temporary.
When I’m on something with more memory and a faster CPU, transcription moves back onto the
machine.</p>
]]></content>
        <category term="Linux"/>
        <published>2026-10-10T00:00:00.000Z</published>
    </entry>
    <entry>
        <title type="html"><![CDATA[Paying without asking permission]]></title>
        <id>https://unbeholden.dev/blog/running-my-own-bitcoin-and-lightning-node</id>
        <link href="https://unbeholden.dev/blog/running-my-own-bitcoin-and-lightning-node"/>
        <updated>2026-09-30T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[A bank decides whether your money moves. I run Bitcoin Core and LND at home and wrote a Lightning Address server, so anyone can pay any address at this domain.]]></summary>
        <content type="html"><![CDATA[<p>Every payment you make through a bank is one the bank agreed to. It can hold a transfer for
review, close your account with a letter and no reason, or decide that your country, your job or
the person you’re paying is too risky. It says yes most of the time, so you forget you were
asking. And <a href="https://www.worldbank.org/en/publication/globalfindex" target="_blank" rel="noopener noreferrer">1.3 billion adults</a> never
get to ask, because nobody will open them an account.</p>
<p>I want to move my money without asking anyone. Bitcoin can do that, but only if you run it
yourself. Leave your coins on an exchange, or use a wallet that talks to someone else’s server,
and you’ve swapped one gatekeeper for another.</p>
<p>So I run Bitcoin Core and LND on a box at home, with a Lightning Address server I wrote.
When I pay someone, it goes out over my channels. When someone pays me, any address at this
domain works, <code>hello@unbeholden.dev</code> or anything else you like, and my phone buzzes when it
lands.</p>
<h2 id="why-bother">Why bother</h2>
<p>A while ago my bank stopped a larger payment I tried to make. It only went through once I’d
explained what the money was for. Nothing came of it, but I didn’t like having to justify
spending my own money, and I’d rather not do it again.</p>
<p>Others have had it much worse. In 2022 Canada used emergency powers to have banks
<a href="https://www.cbc.ca/news/politics/ottawa-protests-frozen-bank-accounts-1.6355396" target="_blank" rel="noopener noreferrer">freeze the accounts</a>
of people linked to the convoy protests, with no court order, and a court later ruled that
unlawful. In 2020 Nigeria’s central bank
<a href="https://www.hrw.org/news/2020/11/13/nigeria-punitive-financial-moves-against-protesters" target="_blank" rel="noopener noreferrer">froze the accounts</a>
of people who’d raised money for the #EndSARS protests against police brutality. Whatever you
think of the protests, in both cases someone other than the account holders decided their money
couldn’t move.</p>
<p>With a full node I check every rule myself instead of trusting someone who says they did.
Lightning on top settles against that node, so no provider sees what I send or receive, and none
of them can stop serving my country next quarter.</p>
<h2 id="what-it-costs">What it costs</h2>
<p><strong>A terabyte and two days.</strong> It’s a full node without pruning. The container with Bitcoin Core,
LND and Fulcrum is about 1 TB, and the initial sync took two days.</p>
<p><strong>Capital, and some work to receive.</strong> To receive over Lightning you need inbound capacity:
someone else’s coins on their side of a channel with you. A new node has none. I opened a
channel, then swapped part of it out through <a href="https://ff.io" target="_blank" rel="noopener noreferrer">FixedFloat</a>, which moved those sats
to the other side and gave me room to receive.</p>
<p><strong>The node has to be up to get paid.</strong> The recipient’s node has to answer for a Lightning
payment to go through. If my box at home is down, the payment just fails, where an email would
be retried for days.</p>
<p><strong>Backups you can’t get wrong.</strong> Lose the seed and the channel backup and you lose whatever is
in your channels. LND’s
<a href="https://docs.lightning.engineering/lightning-network-tools/lnd/recovery-planning-for-failure" target="_blank" rel="noopener noreferrer">recovery guide</a>
covers both, and it’s worth reading before you put money in.</p>
<h2 id="the-setup">The setup</h2>
<p>The pieces:</p>
<ul>
<li>An LXC at home running <a href="https://bitcoincore.org" target="_blank" rel="noopener noreferrer">Bitcoin Core</a>,
<a href="https://github.com/lightningnetwork/lnd" target="_blank" rel="noopener noreferrer">LND</a> and <a href="https://github.com/cculianu/Fulcrum" target="_blank" rel="noopener noreferrer">Fulcrum</a>,
an Electrum server, so my wallets use the node at home.</li>
<li><a href="https://github.com/unbeholdendev/unbeholden-lnurl" target="_blank" rel="noopener noreferrer">unbeholden-lnurl</a>, about 1,300 lines of Go,
next to LND. It answers Lightning Address lookups, asks LND for invoices, and posts to ntfy.</li>
<li>An <a href="https://ntfy.sh" target="_blank" rel="noopener noreferrer">ntfy</a> server, for push notifications to my phone.</li>
<li>Giran, the VPS that serves this site, joined to the home box over a tailnet managed by
<a href="https://github.com/juanfont/headscale" target="_blank" rel="noopener noreferrer">Headscale</a>.</li>
</ul>
<p>Nothing at home is open to the internet. A wallet looking up <code>hello@unbeholden.dev</code> asks this
site for <code>/.well-known/lnurlp/hello</code>. The site passes that over the tailnet to the LNURL server,
along with the host that was asked for, so the invoice callback URL uses <code>unbeholden.dev</code>.
That’s how the address lives on the root domain while the node sits on a home connection with no
ports forwarded.</p>
<figure><svg viewBox="0 0 1200 1000" role="img" aria-labelledby="ln-title ln-desc" font-family="'IBM Plex Mono',ui-monospace,monospace" font-size="20" fill="none" stroke-width="1.5">
<title id="ln-title">One payment to hello@unbeholden.dev, and the one way in to home</title>
<desc id="ln-desc">A payer's wallet looks up hello@unbeholden.dev and sends GET /.well-known/lnurlp/hello to Giran, the VPS that serves this site. Giran passes the request over the tailnet, managed by Headscale, to unbeholden-lnurl at home, with the host that was asked for, unbeholden.dev. unbeholden-lnurl, LND and ntfy are at home, which has no ports forwarded; the tailnet link from Giran is the only way requests come in. unbeholden-lnurl returns JSON with a callback URL and the amounts it accepts, back through Giran. The wallet calls the callback with an amount, and Giran forwards it over the tailnet. unbeholden-lnurl asks LND for a new invoice using an invoice-only macaroon, gets the invoice, posts "invoice created" to ntfy, and hands the invoice back to the wallet through Giran. The wallet pays the invoice over Lightning to LND. LND's invoice stream reports that the invoice settled, unbeholden-lnurl posts "paid" to ntfy, and ntfy pushes it to my phone.</desc>
<rect x="600" y="20" width="590" height="960" rx="4" stroke-dasharray="6 6" style="stroke:var(--faint,#675d51)" />
<text x="616" y="48" font-size="18" letter-spacing="0.12em" style="fill:var(--faint,#675d51)">HOME · NO PORTS FORWARDED</text>
<g style="stroke:var(--fg,#1c1915)">
<rect x="60" y="70" width="120" height="70" rx="4" />
<rect x="400" y="70" width="140" height="70" rx="4" />
<rect x="610" y="70" width="220" height="70" rx="4" />
<rect x="850" y="70" width="120" height="70" rx="4" />
<rect x="1050" y="70" width="120" height="70" rx="4" />
</g>
<g font-family="Rubik,sans-serif" font-size="24" font-weight="600" text-anchor="middle" style="fill:var(--fg,#1c1915)">
<text x="120" y="103">Wallet</text>
<text x="470" y="103">Giran</text>
<text x="720" y="103">unbeholden-lnurl</text>
<text x="910" y="103">LND</text>
<text x="1110" y="103">ntfy</text>
</g>
<g font-size="18" text-anchor="middle" style="fill:var(--faint,#675d51)">
<text x="120" y="128">payer</text>
<text x="470" y="128">the VPS</text>
<text x="720" y="128">Go</text>
<text x="910" y="128">node</text>
<text x="1110" y="128">push</text>
</g>
<path d="M120 140V920M470 140V920M720 140V920M910 140V920M1110 140V920" stroke-width="1" style="stroke:var(--faint,#675d51)" />
<g style="stroke:var(--faint,#675d51)">
<circle cx="30" cy="200" r="14" />
<circle cx="30" cy="260" r="14" />
<circle cx="30" cy="330" r="14" />
<circle cx="30" cy="390" r="14" />
<circle cx="30" cy="440" r="14" />
<circle cx="30" cy="500" r="14" />
<circle cx="30" cy="590" r="14" />
<circle cx="30" cy="640" r="14" />
<circle cx="30" cy="700" r="14" />
<circle cx="30" cy="770" r="14" />
<circle cx="30" cy="830" r="14" />
<circle cx="30" cy="900" r="14" />
</g>
<g font-size="18" text-anchor="middle" style="fill:var(--faint,#675d51)">
<text x="30" y="206">1</text>
<text x="30" y="266">2</text>
<text x="30" y="336">3</text>
<text x="30" y="396">4</text>
<text x="30" y="446">5</text>
<text x="30" y="506">6</text>
<text x="30" y="596">7</text>
<text x="30" y="646">8</text>
<text x="30" y="706">9</text>
<text x="30" y="776">10</text>
<text x="30" y="836">11</text>
<text x="30" y="906">12</text>
</g>
<text x="134" y="168" font-family="'Nunito Sans',sans-serif" font-size="19" style="fill:var(--dim,#4a4238)">looks up hello@unbeholden.dev</text>
<g style="stroke:var(--fg,#1c1915)">
<path d="M120 200H468M458 194L468 200L458 206" />
<path d="M120 390H468M458 384L468 390L458 396" />
<path d="M720 500H908M898 494L908 500L898 506" />
<path d="M720 640H1108M1098 634L1108 640L1098 646" />
<path d="M120 770H908M898 764L908 770L898 776" />
<path d="M910 830H722M732 824L722 830L732 836" />
<path d="M720 900H1108M1098 894L1108 900L1098 906" />
</g>
<g stroke-dasharray="6 6" style="stroke:var(--dim,#4a4238)">
<path d="M470 330H122" />
<path d="M910 590H722" />
<path d="M470 700H122" />
</g>
<path d="M132 324L122 330L132 336M732 584L722 590L732 596M132 694L122 700L132 706" style="stroke:var(--dim,#4a4238)" />
<path d="M720 330H470M720 700H470" stroke-width="3" stroke-dasharray="6 6" style="stroke:var(--amber,#8a5a00)" />
<g style="fill:var(--amber,#8a5a00)"><circle cx="470" cy="330" r="5" /><circle cx="470" cy="700" r="5" /></g>
<path d="M470 260H718M708 254L718 260L708 266M470 440H718M708 434L718 440L708 446" stroke-width="3" style="stroke:var(--amber,#8a5a00)" />
<g font-size="18" style="fill:var(--fg,#1c1915)">
<text x="134" y="191">GET /.well-known/lnurlp/hello</text>
<text x="134" y="381">callback with amount</text>
<text x="732" y="491">new invoice</text>
<text x="732" y="631">invoice created</text>
<text x="134" y="761">pays over Lightning</text>
<text x="732" y="821">settles</text>
<text x="732" y="891">paid</text>
</g>
<g font-size="18" style="fill:var(--dim,#4a4238)">
<text x="134" y="321">JSON: callback, amounts</text>
<text x="732" y="581">invoice</text>
<text x="134" y="691">invoice</text>
</g>
<g font-size="18" stroke-width="6" paint-order="stroke" style="fill:var(--amber,#8a5a00);stroke:var(--panel,#fffbf2)">
<text x="482" y="251">host unbeholden.dev</text>
<text x="482" y="286">tailnet · Headscale</text>
<text x="482" y="431">forward</text>
<text x="482" y="466">tailnet</text>
</g>
<g font-size="18" style="fill:var(--faint,#675d51)">
<text x="732" y="524">invoice-only</text>
<text x="732" y="546">macaroon</text>
<text x="732" y="854">invoice stream</text>
</g>
<text x="1170" y="955" text-anchor="end" font-family="'Nunito Sans',sans-serif" font-size="19" style="fill:var(--dim,#4a4238)">pushes to my phone</text>
</svg></figure>
<p>How I set up Headscale, and why I didn’t just forward a port, is a later entry.</p>
<h2 id="why-write-my-own-lnurl-server">Why write my own LNURL server</h2>
<p>I looked at existing ones first. Bending someone else’s project into what I wanted looked more
tedious than writing it myself. It’s one small Go server that does LNURL-pay, LNURL-withdraw and
ntfy notifications.</p>
<p>A Lightning Address is a thin layer over LNURL-pay. A wallet turns <code>name@domain</code> into
<code>GET /.well-known/lnurlp/name</code> and gets back a small JSON document with a callback URL and the
amounts it accepts. It calls the callback with an amount, the server asks LND for an invoice and
hands it back, and the wallet pays it.</p>
<p>A <code>*</code> entry in the config makes the server answer for any name. Named entries take priority, if
I want one with its own description or limits. It talks to LND with an
invoice-only macaroon, so it can create invoices but can’t move funds or read my channels.</p>
<p>I added notifications with two hooks:</p>
<ol>
<li>When the callback creates an invoice, the server posts to ntfy with the address, the amount
in sats, and the payer’s comment if they left one. If a payment never arrives, I can see it
got this far.</li>
<li>The server subscribes to LND’s invoice stream and posts again when an invoice settles.</li>
</ol>
<p>LNURL-withdraw is for tips. I can leave one in a restaurant as a QR code. The staff scan it,
claim the sats into their own wallet, and I get a notification when they do.</p>
<p>The code is public from today, MIT licensed, on GitHub:
<a href="https://github.com/unbeholdendev/unbeholden-lnurl" target="_blank" rel="noopener noreferrer">unbeholdendev/unbeholden-lnurl</a>.</p>
<h2 id="should-you">Should you?</h2>
<p>If you just want to hold some bitcoin, start smaller. A hardware wallet and your own full node
do that without the Lightning upkeep.</p>
<p>If you want to pay and be paid without asking anyone, and you already run a server that stays
up, it’s very doable. It needs some capital for channels, and the LNURL part is smaller than it
looks.</p>
<p><a href="https://github.com/minibolt-guide/minibolt" target="_blank" rel="noopener noreferrer">MiniBolt</a> walks through the whole stack on an
ordinary PC, and <a href="https://raspibolt.org" target="_blank" rel="noopener noreferrer">RaspiBolt</a> does the same on a Raspberry Pi. If you’d like a hand with yours, <a href="https://unbeholden.dev/contact" target="_blank" rel="noopener noreferrer">get in touch</a>.</p>]]></content>
        <category term="Self-hosting"/>
        <published>2026-09-30T00:00:00.000Z</published>
    </entry>
    <entry>
        <title type="html"><![CDATA[Self-hosting my email with Stalwart]]></title>
        <id>https://unbeholden.dev/blog/self-hosting-email-with-stalwart</id>
        <link href="https://unbeholden.dev/blog/self-hosting-email-with-stalwart"/>
        <updated>2026-09-20T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Everyone says don't self-host email. I did it anyway, and most of the warnings turned out to be out of date or fixable.]]></summary>
        <content type="html"><![CDATA[<p>The standard advice is not to self-host email. Nothing you send will get delivered, the big
providers will bin it, and you’ll lose your weekends to spam filters. I did it anyway. It took
one long day, and most of those warnings turned out to be out of date or fixable. I now run
mail for several domains and a few family members on a small VPS.</p>
<h2 id="why-bother">Why bother</h2>
<p>Most of the usual reasons aren’t very good. Small inboxes, no custom domains, ads in the web
client: Fastmail or Migadu fix all of that for a few euros a month. If that were all, I’d have
just paid.</p>
<p>What got me is that every account recovery ends up in your inbox. Password resets, “verify it’s
you” links, all of it. If you rent that inbox, whoever you rent it from holds the keys to
everything else, and they can take them back. Usually not on purpose: an automated system flags
your account, the appeal form goes nowhere, and you’re locked out of your bank, your registrar
and your tax account at the same time. It’s unlikely, but if it happens it takes everything
with it.</p>
<p>Then there’s the big free providers scanning your mail as part of the business, and a more
practical point: no provider, at any price, gives you what your own server does. Unlimited
domains and addresses, a catch-all on each domain so you can make up a new address for every
sign-up, plus calendar, contacts and file sync.</p>
<h2 id="what-it-costs">What it costs</h2>
<p><strong>An outbound relay, and the metadata that comes with it.</strong> I send through SMTP2Go rather than
straight from the VPS. It’s the one real compromise here. Getting mail
from port 25 delivered comes down to reputation, which takes years to build and favours the big
players. A fresh VPS IP starts out somewhere between suspicious and blocked. SMTP2Go’s free tier
covers personal volume, and the price is that one company sees my outbound metadata: who I
write to and how often. Incoming mail, which is most of it, never goes near them. It’s also
reversible. Sending directly is a config change, not a rebuild, if I ever want to spend months
warming up an IP.</p>
<p><strong>You’re the ops team.</strong> Backups, updates, and the chance something breaks while you’re up a
mountain. That’s less scary than it sounds, because sending servers retry for days. If mine is
down, mail arrives late, not never.</p>
<p><strong>A long day.</strong> Mine was about fourteen hours, and most of it went on the three problems below.
Knowing them in advance, I reckon it’d take two.</p>
<h2 id="the-setup">The setup</h2>
<p>The pieces:</p>
<ul>
<li>A VPS from a provider that allows mail traffic. Its firewall is the outer boundary.</li>
<li><a href="https://stalw.art" target="_blank" rel="noopener noreferrer">Stalwart</a>, a mail server written in Rust. SMTP, IMAP, JMAP, spam
filtering, a web admin and CalDAV/CardDAV, in one binary. Having used it, I wouldn’t bother
wiring Postfix, Dovecot and Rspamd together for a personal server.</li>
<li>Dokploy with Traefik, already on the box, owning ports 80 and 443 and handling TLS for the
web side (admin UI, client autodiscovery).</li>
<li>SMTP2Go for outbound, set up as an MTA route in Stalwart.</li>
<li>An API token for my registrar, so Stalwart manages each mail domain’s DNS records itself,
including DKIM keys and the TXT records for its own certificates.</li>
</ul>
<p>The decision that mattered most was keeping the mail ports away from the proxy. Ports 25, 465,
587 and 993 go straight from the container to the host, and only HTTP goes through Traefik.
SPF checks, rate limiting and IP bans all need the real IP of whoever’s connecting, and a proxy
hides it. That heads off a whole class of problems and causes one, which I’ll get to.</p>
<figure><svg viewBox="0 0 1200 810" role="img" aria-labelledby="st-title st-desc" font-family="'IBM Plex Mono',ui-monospace,monospace" font-size="20" fill="none" stroke-width="1.5">
<title id="st-title">Mail ports skip the proxy, so Stalwart sees real IPs</title>
<desc id="st-desc">The VPS sits behind the provider firewall, whose four inbound rules let TCP 25, 465, 587 and 993 in from anywhere. Other mail servers deliver inbound mail on port 25, and mail clients submit and read mail on 465, 587 and 993. Those ports go straight from the host to the Stalwart container, so Stalwart sees the real IP of whoever connects, and SPF checks, rate limits and IP bans work. HTTP and HTTPS on 80 and 443 go through Traefik, run by Dokploy, for the admin UI and autodiscovery. Traefik forwards those requests, so Stalwart sees only Traefik's internal IP; a ban on that IP takes the web side down, and the fix is putting the Docker subnets on Stalwart's allowed IP list. Traefik gets web certificates with the HTTP challenge; Stalwart gets its own with DNS-01 through the registrar API. Stalwart relays outbound mail through SMTP2Go as an MTA route, which delivers it to recipients' servers and sees outbound metadata only.</desc>
<rect x="320" y="90" width="840" height="540" rx="4" stroke-dasharray="6 6" style="stroke:var(--faint,#675d51)" />
<text x="336" y="118" font-size="18" letter-spacing="0.12em" style="fill:var(--faint,#675d51)">PROVIDER FIREWALL · VPS</text>
<g style="stroke:var(--fg,#1c1915)">
<rect x="40" y="195" width="240" height="70" rx="4" />
<rect x="40" y="310" width="240" height="70" rx="4" />
<rect x="40" y="425" width="240" height="70" rx="4" />
<rect x="460" y="405" width="220" height="110" rx="4" />
<rect x="820" y="130" width="300" height="390" rx="4" />
<rect x="820" y="700" width="300" height="80" rx="4" />
<rect x="460" y="700" width="240" height="80" rx="4" />
</g>
<g font-family="Rubik,sans-serif" font-size="24" font-weight="600" style="fill:var(--fg,#1c1915)">
<text x="58" y="226">Mail servers</text>
<text x="58" y="341">Mail clients</text>
<text x="58" y="456">HTTP clients</text>
<text x="478" y="440">Traefik</text>
<text x="838" y="734">SMTP2Go</text>
<text x="478" y="734">Recipients</text>
</g>
<text x="838" y="168" font-family="Rubik,sans-serif" font-size="30" font-weight="600" style="fill:var(--fg,#1c1915)">Stalwart</text>
<g font-size="18" style="fill:var(--faint,#675d51)">
<text x="58" y="252">other domains</text>
<text x="58" y="367">phone, desktop</text>
<text x="58" y="482">admin, autodiscovery</text>
<text x="478" y="466">Dokploy</text>
<text x="838" y="194">container</text>
<text x="478" y="760">their mail servers</text>
</g>
<g font-family="'Nunito Sans',sans-serif" font-size="19" style="fill:var(--dim,#4a4238)">
<text x="478" y="496">TLS: HTTP challenge</text>
<text x="838" y="312">SPF, rate limits, IP bans work</text>
<text x="838" y="502">TLS: DNS-01, registrar API</text>
<text x="838" y="760">Sees outbound metadata only</text>
</g>
<text x="838" y="286" style="fill:var(--amber,#8a5a00)">sees real IPs</text>
<text x="838" y="452" style="fill:var(--mid,#b0551c)">sees Traefik's IP</text>
<g stroke-width="3" style="stroke:var(--amber,#8a5a00)">
<path d="M280 230H816M280 345H816" />
<path d="M806 222L818 230L806 238M806 337L818 345L806 353" />
</g>
<g font-size="18" style="fill:var(--amber,#8a5a00)">
<text x="336" y="218">25 · delivers inbound mail</text>
<text x="336" y="333">465 · 587 · 993 · submits, reads</text>
</g>
<g style="stroke:var(--fg,#1c1915)">
<path d="M280 460H456M680 460H816M960 520V696M820 740H704" />
<path d="M446 454L456 460L446 466M806 454L816 460L806 466M954 686L960 696L966 686M714 734L704 740L714 746" />
</g>
<g font-size="18" style="fill:var(--fg,#1c1915)">
<text x="336" y="448">80 · 443</text>
<text x="696" y="440">forwards</text>
<text x="972" y="672">relays · MTA route</text>
<text x="712" y="728">delivers</text>
</g>
<g font-family="'Nunito Sans',sans-serif" font-size="19">
<text x="460" y="568" style="fill:var(--mid,#b0551c)">Ban Traefik's IP and the web side goes down</text>
<text x="460" y="596" style="fill:var(--fg,#1c1915)">Fix: Docker subnets on the allowed IP list</text>
</g>
</svg></figure>
<p>The provider firewall has four inbound rules:</p>
<pre class="astro-code unbeholden" style="background-color:transparent;color:var(--dim);overflow-x:auto" tabindex="0" data-language="plaintext"><code><span class="line"><span>TCP 25   from anywhere   (SMTP, other servers delivering to you)</span></span>
<span class="line"><span>TCP 465  from anywhere   (submission, implicit TLS)</span></span>
<span class="line"><span>TCP 587  from anywhere   (submission, STARTTLS)</span></span>
<span class="line"><span>TCP 993  from anywhere   (IMAPS)</span></span></code></pre>
<p>TLS is split in two, which confused me at first. Traefik gets certificates for the web
hostnames the usual way. Stalwart gets its own for the mail ports with the DNS-01 challenge,
writing the validation record through the registrar API. Both renew on their own.</p>
<p>The rest is uneventful. You create one account, add as many addresses on as many domains as you
want, turn on a catch-all per domain, and everything from Thunderbird to a phone picks up the
settings from the DNS records Stalwart published. Adding a second domain is one Domain object,
a registrar API token if it’s registered elsewhere, and an SPF edit.</p>
<h2 id="three-things-that-cost-me-hours">Three things that cost me hours</h2>
<h3 id="1-the-proxy-gets-itself-banned">1. The proxy gets itself banned</h3>
<p>Stalwart bans IPs automatically, and it’s good at it. Brute-force a login or scan ports and your
IP gets dropped at the socket. The trouble is that every HTTP request through a reverse proxy
arrives from the proxy’s internal IP. So the proxy takes the blame for the whole internet and
eventually gets banned itself. When that happens, everything behind it goes down together:
admin UI, autodiscovery, the lot. The docs warn about exactly this, in a paragraph I only read
afterwards. In my case the ban even survived deleting the blocked IP entry, and the only fix
that worked was moving the proxy to a different internal address.</p>
<p>IP-based security only works where the real IPs are visible. The mail ports see them, so bans
there hit actual attackers. The HTTP side doesn’t, so exempt it: put your Docker subnets on
Stalwart’s allowed IP list on day one.</p>
<h3 id="2-two-acme-clients-cant-share-port-80">2. Two ACME clients can’t share port 80</h3>
<p>Traefik uses the HTTP challenge, so it owns <code>/.well-known/acme-challenge/</code> on the whole
entrypoint. When Stalwart tried to get a certificate the same way, Traefik caught the
validation requests and returned 404 for tokens it didn’t know. Its log says so plainly:
<code>Cannot retrieve the ACME challenge for mail.unbeholden.dev</code>. So Stalwart has to use DNS-01,
which doesn’t need any ports.</p>
<p>It goes the other way too. Stalwart publishes CAA records tied to its own ACME account, which
quietly stops <em>Traefik</em> issuing anything for that domain. I had to loosen the record and tell
Stalwart to stop republishing it.</p>
<h3 id="3-declare-the-network-in-compose">3. Declare the network in compose</h3>
<p>Dokploy attaches Traefik to your app’s Docker network on the fly when you add a domain. That
works until Traefik restarts and the connection drops. Then you get Bad Gateway, a perfectly
healthy container, and nothing in any log. The fix is one block in the compose file, straight
from Dokploy’s docs, attaching the service to the shared <code>dokploy-network</code> explicitly. Any
Dokploy compose app with a domain needs it.</p>
<h2 id="where-it-ended-up">Where it ended up</h2>
<p>It scored 10/10 on mail-tester the first time I ran it. SPF, DKIM and DMARC all pass and align.
I’ve got as many addresses on as many domains as I like, a catch-all so each service gets its
own address, server-side filtering, and calendar, contacts and file sync over CalDAV, CardDAV
and WebDAV, which my clients picked up during autodiscovery without me asking. Running cost: a
VPS I already had, the domains, and no monthly fees.</p>
<p>More to the point, the inbox every other account falls back to now runs on a server I control,
from config I can read, and there’s no account manager anywhere who can switch it off.</p>
<h2 id="should-you">Should you?</h2>
<p>If you’ve never run a server, no. Start with something that doesn’t hurt when it breaks.</p>
<p>If you already run your own infrastructure and keep it patched, and the account-recovery
argument lands, self-hosted email in 2026 is far more manageable than its reputation.</p>]]></content>
        <category term="Self-hosting"/>
        <published>2026-09-20T00:00:00.000Z</published>
    </entry>
    <entry>
        <title type="html"><![CDATA[An agent that configures my machine without touching it]]></title>
        <id>https://unbeholden.dev/blog/an-agent-that-configures-my-machine</id>
        <link href="https://unbeholden.dev/blog/an-agent-that-configures-my-machine"/>
        <updated>2026-09-18T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[I set up a Linux laptop by hand twice in a few months. Before there was a third time, I had the agents I already run write its whole configuration, from a container that can't reach it.]]></summary>
        <content type="html"><![CDATA[<p>I moved off macOS recently and put Fedora on a new laptop, set up by hand like everyone does
the first time. The laptop turned out to be faulty, so I sent it back and dug an old ThinkPad
out of a drawer.</p>
<p>The second install was quicker because I had dotfiles, so my shell and editor were sorted in
minutes. The rest of the day went on everything else. Dotfiles stop at <code>$HOME</code>. The packages,
the services, the mounts, the fixes I’d made once and forgotten about: all of that was recorded
only on a laptop that was already in the post. So I redid it from memory, and not well.</p>
<p>I didn’t expect a third machine any time soon. What bothered me was that the parts of the
system I cared about most were the parts I’d never written down.</p>
<p>So now all of it is declared, and I wrote almost none of it myself. I already had an agent
working on my other repositories from a container. This became one more repository for it.</p>
<h2 id="two-machines">Two machines</h2>
<p>The laptop is that ThinkPad, a T460s, now running <a href="https://nixos.org" target="_blank" rel="noopener noreferrer">NixOS</a> with
<a href="https://github.com/niri-wm/niri" target="_blank" rel="noopener noreferrer">niri</a> and <a href="https://github.com/noctalia-dev/noctalia" target="_blank" rel="noopener noreferrer">noctalia</a>.
It’s a thin client. The real work happens on a host in the cupboard, and the agent has never
logged into the laptop.</p>
<p>I didn’t learn Nix one module at a time. The agent wrote the configuration and I read what it
produced: the disk layout, the window manager, the shell, and the module that installs the
command I use to apply it all.</p>
<h2 id="one-repository-three-profiles">One repository, three profiles</h2>
<p>Quick background if you haven’t used them: a <a href="https://nix.dev/concepts/flakes.html" target="_blank" rel="noopener noreferrer">Nix flake</a>
describes a system with its inputs pinned, so building it again later gives the same result.
<a href="https://github.com/nix-community/home-manager" target="_blank" rel="noopener noreferrer">Home Manager</a> handles the <code>$HOME</code> side, and
also runs on its own on distributions other than NixOS. The system side is NixOS itself, which
is exactly the part my Fedora dotfiles couldn’t cover.</p>
<p>The flake has one <code>nixosConfigurations.t460s</code> and three <code>homeConfigurations</code>: <code>pycan@t460s</code> for
the laptop, <code>root@deb-agent</code> for the LXC that runs the dev containers, and <code>container</code> for every
container, since a container’s hostname is a random ID. Home Manager runs standalone on those
last two, so Debian stays Debian.</p>
<p>I get the same shell on the laptop, over SSH on the host, and in the containers the
agent works in. One file builds all three.</p>
<h2 id="why-im-happy-to-point-an-agent-at-it">Why I’m happy to point an agent at it</h2>
<p>All it can produce is a diff.</p>
<figure><svg viewBox="0 0 1200 690" role="img" aria-labelledby="ai-title ai-desc" font-family="'IBM Plex Mono',ui-monospace,monospace" font-size="20" fill="none" stroke-width="1.5">
<title id="ai-title">Where the coding agent runs, and the only way its work leaves</title>
<desc id="ai-desc">The laptop holds the keys and runs no agent. It reaches a Proxmox host in the cupboard by SSH into one LXC container, deb-agent, which runs one dev container per repository: unbeholden.dev, dotfiles and infra. Those dev containers are the only place an agent runs. They have no route and no keys to the laptop. Their one way out is a push over the agent token to Forgejo, in another LXC on the same host, where the agent can push branches and open pull requests but cannot merge to main. The laptop pulls main from Forgejo and rebuilds itself with dots. The dev containers also fetch packages and docs from the open internet.</desc>
<g style="stroke:var(--faint,#675d51)" stroke-dasharray="6 6">
<rect x="420" y="100" width="750" height="430" rx="4" />
<rect x="450" y="150" width="390" height="350" rx="4" />
<rect x="880" y="150" width="260" height="350" rx="4" />
<rect x="480" y="590" width="330" height="80" rx="4" />
</g>
<g font-size="18" letter-spacing="0.12em" style="fill:var(--faint,#675d51)">
<text x="436" y="128">PROXMOX HOST · CUPBOARD</text>
<text x="466" y="178">LXC · DEB-AGENT</text>
<text x="896" y="178">LXC · FORGEJO</text>
</g>
<rect x="40" y="150" width="200" height="170" rx="4" style="stroke:var(--fg,#1c1915)" />
<text x="62" y="198" font-family="Rubik,sans-serif" font-size="34" font-weight="600" style="fill:var(--fg,#1c1915)">Laptop</text>
<text x="62" y="230" font-size="18" style="fill:var(--faint,#675d51)">T460s · NixOS</text>
<g font-family="'Nunito Sans',sans-serif" font-size="22" style="fill:var(--dim,#4a4238)">
<text x="62" y="270">Keys, sessions</text>
<text x="62" y="300">No agent</text>
</g>
<g style="stroke:var(--amber,#8a5a00)">
<rect x="480" y="200" width="330" height="70" rx="4" />
<rect x="480" y="285" width="330" height="70" rx="4" />
<rect x="480" y="370" width="330" height="70" rx="4" />
</g>
<g font-size="22" style="fill:var(--amber,#8a5a00)">
<text x="500" y="231">unbeholden.dev</text>
<text x="500" y="316">dotfiles</text>
<text x="500" y="401">infra</text>
</g>
<g font-family="'Nunito Sans',sans-serif" font-size="19" style="fill:var(--dim,#4a4238)">
<text x="500" y="257">dev container · agent</text>
<text x="500" y="342">dev container · agent</text>
<text x="500" y="427">dev container · agent</text>
</g>
<text x="466" y="482" font-family="'Nunito Sans',sans-serif" font-size="20" style="fill:var(--dim,#4a4238)">The only place an agent runs</text>
<rect x="905" y="200" width="210" height="230" rx="4" style="stroke:var(--fg,#1c1915)" />
<text x="925" y="244" font-family="Rubik,sans-serif" font-size="30" font-weight="600" style="fill:var(--fg,#1c1915)">Forgejo</text>
<text x="925" y="270" font-size="18" style="fill:var(--faint,#675d51)">agent user</text>
<g style="fill:var(--fg,#1c1915)">
<text x="951" y="318">push branch</text>
<text x="951" y="352">open PR</text>
</g>
<text x="951" y="386" style="fill:var(--mid,#b0551c)">merge main</text>
<path d="M926 311l5 5 10-12M926 345l5 5 10-12" style="stroke:var(--fg,#1c1915)" />
<path d="M928 373l10 10M938 373l-10 10" style="stroke:var(--mid,#b0551c)" />
<path d="M810 235H830V405H810M830 320H900" stroke-width="3" style="stroke:var(--amber,#8a5a00)" />
<path d="M890 312L902 320L890 328" stroke-width="3" style="stroke:var(--amber,#8a5a00)" />
<text x="840" y="308" font-size="18" style="fill:var(--amber,#8a5a00)">push</text>
<path d="M240 210H446" style="stroke:var(--fg,#1c1915)" />
<path d="M436 204L446 210L436 216" style="stroke:var(--fg,#1c1915)" />
<text x="256" y="198" font-size="18" style="fill:var(--fg,#1c1915)">SSH, attach</text>
<path d="M480 300H242" stroke-dasharray="6 6" style="stroke:var(--mid,#b0551c)" />
<path d="M352 290l20 20M372 290l-20 20" stroke-width="3" style="stroke:var(--mid,#b0551c)" />
<text x="256" y="338" font-size="18" style="fill:var(--mid,#b0551c)">no route, no keys</text>
<path d="M1010 200V60H140V146" style="stroke:var(--fg,#1c1915)" />
<path d="M134 136L140 146L146 136" style="stroke:var(--fg,#1c1915)" />
<text x="158" y="50" font-size="18" style="fill:var(--fg,#1c1915)">pull main, rebuild · dots</text>
<path d="M645 440V586" stroke-dasharray="6 6" style="stroke:var(--faint,#675d51)" />
<path d="M639 576L645 586L651 576" style="stroke:var(--faint,#675d51)" />
<text x="657" y="562" font-size="18" style="fill:var(--faint,#675d51)">fetch</text>
<text x="500" y="625" font-family="Rubik,sans-serif" font-size="24" font-weight="600" style="fill:var(--fg,#1c1915)">The internet</text>
<text x="500" y="654" font-family="'Nunito Sans',sans-serif" font-size="19" style="fill:var(--dim,#4a4238)">Packages, docs. Open on purpose.</text>
</svg></figure>
<p>The dev containers have no credentials for the laptop and no network path to it. An agent can
edit Nix files in a clone and push a branch to <a href="https://forgejo.org" target="_blank" rel="noopener noreferrer">Forgejo</a>, which is
another LXC on the same host, and that’s it. Nothing it writes runs anywhere, and the branch
never leaves that box.</p>
<p>Its token belongs to an agent user that can push branches and open pull requests on any of my
repos, but can’t merge to main on any of them. Forgejo enforces that, and the agent can’t touch
Forgejo’s settings, so I’m not relying on it to behave.</p>
<p>Because of that I run it with permissions off and no prompts. A prompt asks me to approve an
action, but the only action here is writing a file in a container that can’t reach the laptop.
Clicking yes or no would be theatre. I review once, on the diff.</p>
<p>The containers do have open internet access. They need package registries and docs, and the
only secret inside is a token that can’t merge anything.</p>
<p>Applying changes is my job. I run <code>dots</code>, a three-line script the repo installs for itself:</p>
<pre class="astro-code unbeholden" style="background-color:transparent;color:var(--dim);overflow-x:auto" tabindex="0" data-language="bash"><code><span class="line"><span style="color:var(--dim)">git </span><span style="color:var(--dim)">-C</span><span style="color:var(--dim)"> &quot;$dotfiles&quot;</span><span style="color:var(--dim)"> switch</span><span style="color:var(--dim)"> main</span></span>
<span class="line"><span style="color:var(--dim)">git </span><span style="color:var(--dim)">-C</span><span style="color:var(--dim)"> &quot;$dotfiles&quot;</span><span style="color:var(--dim)"> pull</span><span style="color:var(--dim)"> --rebase</span><span style="color:var(--dim)"> --autostash</span></span>
<span class="line"><span style="color:var(--dim)">sudo </span><span style="color:var(--dim)">nixos-rebuild</span><span style="color:var(--dim)"> switch</span><span style="color:var(--dim)"> --flake</span><span style="color:var(--dim)"> &quot;$dotfiles#t460s&quot;</span></span></code></pre>
<p>That’s the laptop version. The LXC has no system side, so there the last line is a
<code>home-manager switch</code>. If a change breaks something, the previous generation is still in the
boot menu.</p>
<h2 id="it-tests-its-own-changes">It tests its own changes</h2>
<p>I don’t want to review a change the agent hasn’t tried. Here it can try it on itself, because
the <code>container</code> profile is the environment it’s running in:</p>
<pre class="astro-code unbeholden" style="background-color:transparent;color:var(--dim);overflow-x:auto" tabindex="0" data-language="bash"><code><span class="line"><span style="color:var(--dim)">./install.sh </span><span style="color:var(--dim)">container</span><span style="color:var(--faint)">   # run it twice: it has to be idempotent</span></span>
<span class="line"><span style="color:var(--dim)">zsh </span><span style="color:var(--dim)">-ic</span><span style="color:var(--dim)"> exit</span><span style="color:var(--faint)">             # should print nothing</span></span></code></pre>
<p>If it breaks the shell, it breaks its own shell, straight away, in a container I can throw
away.</p>
<p>The system side gets checked without a NixOS machine anywhere:</p>
<pre class="astro-code unbeholden" style="background-color:transparent;color:var(--dim);overflow-x:auto" tabindex="0" data-language="bash"><code><span class="line"><span style="color:var(--dim)">nix </span><span style="color:var(--dim)">eval</span><span style="color:var(--dim)"> .#nixosConfigurations.t460s.config.system.build.toplevel.drvPath</span></span></code></pre>
<p>That evaluates the full configuration of a laptop the container has never seen. A broken
module, an option that doesn’t exist, a package renamed upstream: they all fail right there on
Debian, not when I reboot into them.</p>
<h2 id="day-to-day">Day to day</h2>
<p>The dev containers are long-running. I keep them in <a href="https://herdr.dev" target="_blank" rel="noopener noreferrer">herdr</a>, a terminal
multiplexer with a sidebar showing which agent is in which pane and what it’s doing. There are
usually a few going on different repos, and none of them can see each other’s files.</p>
<p>I close the lid whenever I like and nothing stops. When I SSH back in and attach to herdr,
everything is where I left it, plus whatever finished while the laptop was shut. I’ve read the
end of a long run on my phone on a train.</p>
<p>The ThinkPad was meant to be temporary. Since the work happens on the other machine, it’s
become my everyday laptop, and a faster one wouldn’t change much.</p>
<h2 id="the-downsides">The downsides</h2>
<p>My working day now depends on the box in the cupboard. If my power or internet goes, so does
everything else. And a long-running container is a pet: it drifts from its definition
without telling you, and you only find out what you’d come to rely on when you rebuild it.</p>
<p>Nix is a lot to ask of anyone. Most of the benefit here comes from the config being
declarative, not from Nix in particular, but Nix is what I use, and the learning curve is
steep.</p>
<p>Secrets need care. Each container gets one credential, a Forgejo token, which I type in when
it’s created. It never goes in a remote URL, because that writes it into <code>.git/config</code>, and a
push can carry it out from there. My wifi key sits in a mode 600 file outside the repo, because
NixOS copies network profiles into the Nix store, and the store is world readable.</p>
<p>And the traps are odd ones. A flake only sees files git tracks, so a new module needs a
<code>git add</code> before you switch, or Nix acts as if it isn’t there. Home Manager won’t overwrite a
file that’s already where it wants to put one. That’s the right call, and it’s also the error I
hit most. Anything an app rewrites itself can’t live in the read-only store, so it gets
symlinked out to the clone, and then just using the app leaves the repo dirty.</p>
<h2 id="will-it-hold-up">Will it hold up?</h2>
<p>The T460s is my first NixOS machine, and I’ll replace it at some point. I haven’t yet tested
whether this configuration is enough to set up its replacement.</p>]]></content>
        <category term="Agent tooling"/>
        <published>2026-09-18T00:00:00.000Z</published>
    </entry>
</feed>