ubunatic.com

Headless browser launcher

headbox runs a headless browser that leaves nothing behind.

headbox installs a pinned chrome-headless-shell and runs it inside bubblewrap, with every writable path in a size-capped tmpfs. Tests and coding agents talk to it over the Chrome DevTools Protocol; when headbox ends, even by kill -9, the browser and its files are gone.

go install ubunatic.com/headbox@latest

Key facts

12-week commit activity

2026-10-26
View 12-week data table
Week startingCommits
2026-08-030
2026-08-100
2026-08-170
2026-08-240
2026-08-310
2026-09-070
2026-09-140
2026-09-210
2026-09-280
2026-10-050
2026-10-120
2026-10-1910

Key Features

  • Installs a pinned, sha256-checked chrome-headless-shell.
  • Runs it in bwrap with a tmpfs profile and hands tests and agents a CDP URL.
  • Stops an agent browser after an idle period.

Verified Engineering Milestones

  • Research of nine headless browser setups with kill -9 canaries (ubunatic.com #095)
  • Pinned install, bwrap sandbox and exec/serve with kill -9 tests (#001, 6b6db83)
  • v0.1.0 release with signed binaries and the ubunatic.com/headbox vanity path (8861575)

Stack

Go 1.26, Cobra, bubblewrap, chrome-headless-shell, YAML + JSON Schema, GoReleaser

One binary, one pinned browser, no leftovers

Pinned and checked

headbox install downloads the chrome-headless-shell version pinned in the binary and checks its sha256 before unpacking.

Kernel cleanup

The browser runs in its own PID namespace as a direct child of headbox; when headbox dies, the kernel ends the whole tree.

Nothing on disk

Profile, caches, /tmp and /dev/shm live in size-capped tmpfs mounts that vanish with the sandbox.

Any CDP client

Puppeteer, Playwright's connectOverCDP, chromedp or chrome-devtools-mcp connect through CDP_URL.

Fast

headbox exec -- true takes about 0.2 s, including the browser start.

Idle stop

headbox serve keeps a browser for agents and stops it after a period without CDP connections.

Wrap a command or serve a browser

headbox install                  # once: download + sha256-check the pinned browser
headbox exec -- node check.mjs   # browser up, CDP_URL set, browser gone when the command ends
headbox exec -- sh -c 'curl -s "$CDP_URL/json/version"'

# a browser for coding agents, on a fixed port, gone after 30 idle minutes
headbox serve --port 9333 --idle 30m &
chrome-devtools-mcp --browserUrl http://127.0.0.1:9333
Command What it does
install [--zip FILE] Download the pinned browser, check its sha256, unpack it to ~/.local/share/headbox/
exec -- CMD Start the browser, run CMD with CDP_URL, HEADBOX_WS_URL and HEADBOX_CDP_PORT, exit with its code
serve [--idle 15m] Keep a browser for agents until idle, Ctrl-C or SIGTERM
path Print the browser's install dir
version Print the headbox and browser versions

What the browser sees

/tmp, /dev/shm
tmpfs, 256 MiB each.
$HOME
tmpfs, 512 MiB, for the profile and caches.
/usr, /lib64, /etc
Read-only from the host.
/opt/browser
The browser dir, read-only.
network
Shared, so pages load and the CDP port is reachable on 127.0.0.1.

Chrome's own sandbox stays on inside bwrap. Sizes, browser version, URL and sha256 live in spec/browser.yaml, embedded in the binary.

Install with Go

Requires Linux with unprivileged user namespaces and bwrap (dnf install bubblewrap or apt install bubblewrap), and Go 1.26 or newer to build. Release binaries for x86_64 and aarch64 are on Codeberg.

go install ubunatic.com/headbox@latest
headbox install

Why a browser needs a box

Read the headbox engineering story, which compares nine headless browser setups and what each leaves behind after kill -9.

Project details

Stack
Go 1.26, Cobra, bubblewrap, chrome-headless-shell, YAML + JSON Schema, GoReleaser
Milestones
Research of nine headless browser setups with kill -9 canaries (ubunatic.com #095) · Pinned install, bwrap sandbox and exec/serve with kill -9 tests (#001, 6b6db83) · v0.1.0 release with signed binaries and the ubunatic.com/headbox vanity path (8861575)

Layer composition

Terminal
CLI
Desktop
Linux, bwrap, /proc
Inference / AI
—
Containers / VM
user namespaces
Web
Chrome DevTools Protocol

headbox: the story behind the project

The ubunatic.com site checks ran a Flatpak Chromium. On 2026-10-22 its sandbox /tmp , which lives in RAM under /run/user/1000 , held 2.4 GB of old browser profiles and filled the runtime dir; an unrelated tool then failed with "no space lef…

Read the engineering story