This site!
You're reading this page on the thing it describes. hotchkiss.io is ONE self-contained Rust binary that doesn't just SERVE a site — it OPERATES one. It self-manages its own DNS, orders and renews its own TLS certs, handles passkey auth, runs the markdown-to-HTML pipeline, logs its own analytics, backs itself up daily and ships its own updates — all in a single process. It's a macOS .app with a tray icon, running as a LaunchAgent on a Mac mini on home fiber. No nginx, no Postgres, no Docker, no cloud hosting.
I'm always looking for opportunities to keep my knowledge current and that includes my own personal website. The original goal was a single executable running its own embedded data store (for cost reasons). That seed grew: it's now one binary that owns the WHOLE stack a normal site splits across a ton of containers.
I've also been running my own site on my own hardware since ~2003 — it was first cah.ath.cx on Joomla then chotchki.us, WordPress on a box in my house. This binary is just the newest rev of a 20-year habit of owning the box, the DNS and the certs myself, and the blog now carries posts I pulled back out of those early years (more in Publishing).
The source is public at github.com/chotchki/hotchkiss-io — and the proof it actually runs is that this page loaded: every feature here is running on the binary that served it.
It operates its own infrastructure
This is the part most "personal sites" hand to a cloud provider. Here it lives in the same process as the page rendering. A ServiceCoordinator wires four long-lived tokio tasks together over broadcast channels — the IP feeds DNS and ACME, ACME feeds the HTTPS endpoints.
direction: down
binary: "one Rust binary — macOS .app + tray icon (LaunchAgent on a Mac mini, home fiber)" {
style.fill: "#e7f0d4"; style.stroke: "#5f7a2a"; style.bold: true
coord: "ServiceCoordinator — 4 tokio tasks, wired by broadcast channels" {
style.fill: "#ffffff"; style.stroke: "#5f7a2a"
ip: "IpProviderService\npolls 1.1.1.1 hourly"
dns: "DnsProviderService\nCloudflare A records"
acme: "AcmeProviderService\nLet's Encrypt · DNS-01\nrefresh 6h"
ep: "EndpointsProviderService\naxum :443 (HTTP/2) · HTTP→HTTPS :80\nsession GC · log prune · daily backup"
ip -> dns: "public IP"
ip -> acme: "public IP"
acme -> ep: "RustlsConfig"
}
db: "single SQLite — the data tier\ncontent · users + passkeys + api keys · certs · sessions · crypto keys · request_log · media metadata" {
style.fill: "#f6f8fa"; style.stroke: "#d9e0e6"
}
store: "content-addressed media store\n(images/video/STL bytes, on disk — NOT in the DB)" {
style.fill: "#f6f8fa"; style.stroke: "#d9e0e6"
}
coord -> db: "everything persists here"
coord -> store: "media bytes"
}
cf: "Cloudflare API" { style.fill: "#f6f8fa"; style.stroke: "#d9e0e6" }
le: "Let's Encrypt" { style.fill: "#f6f8fa"; style.stroke: "#d9e0e6" }
visitors: "Visitors\n(HTTPS + passkeys)" { style.fill: "#f6f8fa"; style.stroke: "#d9e0e6" }
backblaze: "Backblaze (off-site)" { style.fill: "#f6f8fa"; style.stroke: "#d9e0e6" }
binary.coord.dns <-> cf: "A records"
binary.coord.acme -> cf: "DNS-01 TXT"
binary.coord.acme <-> le: "ACME order"
visitors <-> binary.coord.ep
binary.coord.ep -> backblaze: "daily backup"The chain runs IP → DNS → TLS → HTTPS and everything lands in one SQLite; almost nothing crosses the box.
IpProviderServicepollshttps://1.1.1.1/cdn-cgi/tracehourly and broadcasts the public IPv4 (connecting to the v4 literal forces a v4 path; in debug builds it forces127.0.0.1so dev never touches public DNS).DnsProviderServicedrives the Cloudflare API, updating A records when the live IP drifts from what DNS says. The binary owns its own DNS.AcmeProviderServiceorders or loads a Let's Encrypt cert (DNS-01 challenge via a Cloudflare TXT record), persists it in SQLite, broadcasts aRustlsConfigand refreshes every 6h. The binary owns its own TLS — no certbot cron, no cloud load balancer terminating SSL for me.EndpointsProviderServicewaits for theRustlsConfigthen runs an HTTP→HTTPS redirect on :80 and the real axum app on :443, served over HTTP/2 (ALPNh2, h1.1 fallback) with client-IP connect-info. It also owns the session GC, the dailyrequest_logprune and the daily DB backup.
The honest caveat is right there in tokio::try_join!: if any one of those tasks returns, the whole coordinator fails — there's no in-process auto-restart. launchd's KeepAlive bounces the app, so it's downtime, not a stay-down (more in the limits below).
It operates its own auth
I hate passwords! As a result, I always try to implement passkeys wherever possible and this site is no different — WebAuthn via webauthn-rs, discoverable credentials, conditional UI. The state machine is Anonymous → AuthOptions/RegistrationStarted → Authenticated. That said passkeys still have plenty of sharp edges, including needing browser shims and the conditional dialog can be flakey.
There's no signup flow to speak of: the FIRST user to register is auto-promoted to Admin (enforced inline in the SQL INSERT) because there is exactly one operator — me. Everyone else who registers is Registered (read-only, logged in); everyone else is Anonymous. I can manage users from /admin/users (promote/demote, or delete), and the LAST admin is protected from demote and delete so I can't lock myself out. A role change bites IMMEDIATELY — a middleware re-reads the logged-in user's role every request, so a demote or a delete takes effect on the LIVE session, not at next login.
Authorization is ONE fail-closed layer, not a check sprinkled across handlers. GET/HEAD/OPTIONS are public site-wide; every OTHER method requires an authenticated Admin by default. It's a default-DENY allowlist of safe methods (not a deny-list of known-mutating verbs), so a brand-new route or some exotic verb is gated automatically — which is the whole point, because the bug it replaced was exactly a per-handler omission that let an anonymous caller mutate /pages. The only exceptions are an EXACT (path, method) allowlist for the anonymous WebAuthn ceremony POSTs. Sessions are tower-sessions backed by SQLite, signed with a key auto-generated into the crypto_keys table on first boot — and the one cookie the app sets is HttpOnly + SameSite=Lax + Secure (in release).
There's a second way in, for automation: an Authorization: Bearer hio_… API key authenticates as its user and DELEGATES that user's role. The key itself is NEVER stored — only an HMAC-SHA256 of it, keyed by a server pepper (its own crypto_keys row) — so a database leak can neither recover a key nor verify a guessed one. A middleware resolves the key and injects the SAME authenticated session the cookie path produces, so the fail-closed layer and every handler just work with zero changes. (I dogfood it: the project links on my résumé were added by an API PUT, not in the editor.)
The content pipeline
Markdown in, HTML out, all server-side — and deliberately source-in-HTML so a crawler, an LLM or a no-JS reader still gets the real thing.
- Inline d2 diagrams. A fenced
```d2block becomes a placeholder that shows the d2 SOURCE in a<pre>(content-addressed by SHA-256), then HTMX-swaps at load via/diagram/{hash}, which shells out to thed2binary and embeds the SVG as a base64 data: URI. The endpoint only renders sources the server already emitted (it's NOT an open d2 compiler), and a missingd2degrades to a visible error block at HTTP 200, never a 500. The diagram up there went through exactly this path. - KaTeX math with single-dollar deliberately OFF —
$$…$$is math but a prose "$200" stays literal. The TeX is in the served HTML; KaTeX just typesets it client-side. highlight.jscode highlighting (the d2 source is excluded), GFM tables, an STL 3D-model viewer (.stlimage links become<object>tags wired to three.js) and height-capped click-to-zoom images sharing a zero-dependency pan/zoom lightbox.- On SAVE (not on render), links and image srcs pointing at the site's own registrable host get rewritten root-relative, so content is portable across prod and beta without touching the rest of the markdown byte-for-byte.
Pages are a self-referential tree in content_pages (parent → child) and URL lookup just walks the path segments. As Admin I author inline — the page defaults to the clean reader view and ?edit reveals the editor, so I can browse the real site without logging out.
The whole pipeline is panic-hardened, and that's not theoretical. The markdown library is an alpha (markdown-rs), and a post I recovered from 2012 — smart quotes plus some escaped angle brackets — made it PANIC. An uncaught panic under axum doesn't return a 500, it RESETS the connection, and because the feed renders EVERY post through the same transform, that one post took down its own page AND the entire feed. Two layers now: the transform catches its own panic and degrades to the escaped source, and a router-level catcher turns any handler panic into a styled 500 instead of a dropped connection. One bad post can no longer take the site down.
Media is content-addressed, and the URLs are keys not slugs
Images, video and STLs don't live in the database — they're files in a content-addressed disk store (sharded by SHA-256, atomic temp+rename, dedup'd by content), with only the metadata in SQLite. Authoring is uniform —  for EVERY kind — and the transformer dispatches by kind at render: a zoomable <img>, a multi-source <video> (HEVC ordered before AV1, because Safari's <video> AV1 path is jerky even on an AV1-hardware Mac), the STL viewer, or — for anything ffprobe can't type, a zip or a binary — a plain download link, so an upload is never rejected for being the wrong kind.
Uploads STREAM to disk: the multipart field is pulled chunk-by-chunk and SHA-256'd incrementally as it lands, so a multi-GB video is disk-bound, not RAM-bound. (The first cut buffered the whole upload into a Vec before hashing and OOM'd right around free-RAM size; streaming fixed it.) The store also spans drives — media_paths is an ordered list of roots that fill in order, each file records which root it landed on (so a read is an O(1) hint with a full-store scan as the self-healing fallback if a file ever moves), and a cleanly-ejected external drive is detected and skipped so unplugging it can't trick the binary into silently writing onto the boot disk.
Two URLs, both unguessable. The author ref is an opaque UUIDv7, NOT a slug — a slug is a guessing oracle. The byte URL is keyed by HMAC-SHA256(server key, file hash), so you can't walk the store by incrementing anything, and the bytes serve straight off disk with HTTP range support (so video seeks and a big STL streams). That byte route is public and same-origin, so an admin-uploaded .svg or .html serves with nosniff + Content-Disposition: attachment — uploader-controlled content can NEVER execute as script on the canonical origin (stored XSS), while a real image or video still renders inline.
Publishing surfaces
The blog lists posts newest-first as cards, paginated, with a no-JS search box — a plain GET form, a LIKE match over title and body (plenty at this size; a full-text index is the upgrade if the archive ever outgrows it). /projects runs on the EXACT same pagination + search machinery. There is ONE Atom feed at /feed.xml carrying blog posts AND project pages newest-first (/blog/feed.xml still serves it, for anyone subscribed to the old path). SEO is the binary's job too: a dynamic sitemap and a robots that DE-INDEXES the public beta host so the throwaway copy never competes with prod for the same content, plus per-page canonical + OpenGraph tags.
Post dates are editable, which sounds boring until you're backfilling history. I pulled my old posts back out of the Wayback Machine — the 2006 WordPress-on-a-box era through 2012 — converted the archived HTML to markdown and backdated each one to the byline date it originally ran. So a post from 2006 sits at its real spot in the timeline instead of bunched at "today", and a box that's long dead and this binary share one continuous blog.
The résumé is a single markdown source rendered at /resume, and /resume.pdf is rendered by the same binary off that same markdown — weasyprint shelled out locally, cached by content hash. No Google-Docs export, no external PDF service, no second printable document to keep in sync by hand. You can hit /resume and /resume.pdf right now.
Observability and backups
Request analytics are mine, not Google's: a request_log table (fire-and-forget inserts) and an /admin/analytics dashboard that aggregates a 90-day window on the fly — a server-rendered inline-SVG views/day chart, a total↔unique toggle, top pages with a Content↔All toggle (the All view surfaces the 4xx/5xx scanner probes) and top external referrers. No rollup table, just GROUP BY.
It backs itself up too: a daily task VACUUM INTOs a dated snapshot and prunes to a rolling 7. The backup loop logs every fallible step so a bad backup can't trip the coordinator's try_join! and take the app down — a bad day self-heals on the next tick. Backblaze covers off-site.
And the thing that makes all of the above possible: ONE SQLite file holds EVERYTHING the data tier needs — content, users and passkeys, API keys, TLS certs, sessions, crypto keys, the request log, the media metadata. The only thing NOT in it is the media bytes (the content-addressed store on disk). The daily backup is just a copy of that one file.
How one binary becomes the whole deployment
rust-embed bakes all of assets/ and the Askama templates/ INTO the binary at compile time — at runtime there are no loose static files except that one SQLite database. build.rs does two things that surprise people: it spins up an ephemeral schema DB so sqlx::query! macros are type-checked at COMPILE time, and it downloads a pinned Tailwind CLI to compile the CSS.
Deploys are a git push. A bare repo on the mini has a post-receive hook that dispatches by ref: git push origin main builds and restarts beta, a git push of a vX.Y.Z tag builds and restarts prod. The hook builds the .app, atomically swaps it into /Applications and restarts the matching LaunchAgent with a graceful SIGTERM (a plain SIGKILL filed a macOS "quit unexpectedly" crash report on every single deploy). A failed BUILD aborts before the swap so the running app keeps serving. Beta is a true mirror — every main push reboots it on a fresh snapshot of prod's data, so I dogfood the real content before a tag promotes it.
The stack, and where I'd reach for something else
I'm returning to my roots with a templated HTML frontend using Askama. For a site like this it's designed to be crawler-friendly — serving arbitrary pages by URL suits the template style. If this was an application, a React-style framework would make far more sense. CSS is Tailwind, which is a nice answer to how unmanageable CSS tends to become. HTMX has been a real uplift for plain HTML while still leaving room for more complicated JavaScript where it makes sense. The backend is axum coupled with SQLx — and the best part is you can have all your queries checked at compile time, which makes the whole thing far easier to test.
What this is NOT
The one-binary flex only works because the constraints are tiny, and pretending otherwise would be dishonest.
- It's a PERSONAL site and a personal CRM — a deliberate exercise to keep my Rust current. Not a product, not for sale, not a template.
- SCALE IS N=1: one admin (me), running on a single Mac mini that hangs off home fiber. The first-user-becomes-Admin rule only makes sense because there's exactly one operator. A real multi-tenant product is precisely where you'd reach back for the nginx / Postgres / managed-cert / cloud-LB stack this avoids on purpose.
- It is NOT highly available. If the coordinator sees any task return the app goes down with no in-process restart — launchd's KeepAlive relaunches it, so that's a bounce-with-downtime, not a permanent outage. But if the mini sleeps or the power blinks or the fiber drops, the site is just down. A deliberate single point of failure.
- It's not fully self-contained on every axis: the diagram pipeline shells out to an external
d2binary, the résumé PDF to weasyprint and media ingest to ffmpeg/ffprobe — those have to be installed or the feature degrades. Distribution is ad-hoc-signed (no Apple notarization), which is fine for self-hosting on my own mini and nothing else.