Skip to content

Mac Mini Rebuild

The owner wipes and reinstalls the Mac mini (Mac16,10, Apple M4, 10 cores, 16 GiB, 228 GiB data volume) (owner decision, 2026-10-22, Taskbase #1477). After the rebuild it has two jobs only:

  1. the always-on agent runner mac-mini (Taskbase runner 1), plus the macOS release runner mac-mini-release (macOS Release Runner);
  2. everything Linux, in one Lima VM k3s under the account agent-ops (ADR 0022, The k3s VM on the Mac Mini):
  3. the operational agent in the namespace ops-agent (ADR 0020, install task #1452);
  4. the Gitea Actions runners in the namespace ci (ADR 0021, install task #1466).

Everything else on the old install (openclaw, local models, the trading jobs, the game server) goes. This page records what the old install had, what to save, and how to rebuild. It links to the install pages instead of copying them.

What the old install had

Read on the Mac mini on 2026-10-22 (Taskbase #1476) with dscl, launchctl, brew, pmset, fdesetup, df and du, as the account skatziopenclaw, without changing anything. Secret values were not read; only where they live.

Accounts

Account Type What it runs
skatziopenclaw admin, auto-login Everything except the release runner: the mac-mini agent runner, the agent browser, the desktop app, Homebrew (owns /opt/homebrew), PostgreSQL, MySQL, the nightgain trading jobs, Ollama, VS Code
agent-release-build standard mac-mini-release (LaunchDaemon below)

agent-ops and ci-runner did not exist yet. The mac-mini runner ran as the owner's admin account, which the agent-runner docs advise against (the agent can do whatever its OS user can).

launchd jobs

Where Label What it runs
/Library/LaunchDaemons com.skatzi.agent-release-build /opt/homebrew/bin/gitea-runner daemon as agent-release-build, in ~/actions-runner, KeepAlive
/Library/LaunchAgents — empty
~skatziopenclaw/Library/LaunchAgents com.skatzi.mac-mini ~/repos/skatzi/agent-runner/bin/agent-runner run --config ~/Library/Application Support/agent-runner/agent-runner.yaml, KeepAlive (written by agent-runner service install)
com.skatzi.agent-browser Google Chrome with --remote-debugging-port=9222 --user-data-dir=/Users/Shared/agent-browser, KeepAlive: the browser behind the runner's browser label
com.skatzi.agent-runner-desktop the Agent Runner desktop app (menu bar), pointed at the same runner and config
com.skatzi.agent-runner.plist.disabled an older copy of the runner's plist, disabled
homebrew.mxcl.mysql@8.4, sh.brew.postgresql@16 brew services: MySQL 8.4 (the AzerothCore game server) and PostgreSQL 16 (agents' local test databases taskbase, taskbase_366, botyard_1216)
com.nightgain.ai-portfolio, com.nightgain.daily-context, com.nightgain.ross-watcher scripts in ~/repos/nightgain/trading-engine/scripts/, on weekday timers. Not a platform job
com.google.* Chrome's updater

Ollama (/Applications/Ollama.app, /usr/local/bin/ollama, models glm-4.7-flash and qwen2.5) and Tailscale (Tailscale.app) start as login items. No Docker, Colima, Lima or openclaw process or binary was found. Garage is not installed and nothing uses it: the backups go to Hetzner Object Storage (why).

The mac-mini agent runner

Version v0.5.21, self-updated to Taskbase's target. The binary is ~/repos/skatzi/agent-runner/bin/agent-runner, in an old source checkout (tag v0.5.3)
Config ~/Library/Application Support/agent-runner/agent-runner.yaml, with claude-mcp.json next to it. Neither holds a secret value
Data ~/Library/Application Support/agent-runner/data/ (state.json, logs/, workspaces/)
Name, users runner mac-mini; Keycloak and Gitea user dunk-mac-mini-agent
Labels role=reviewer, browser (plus the automatic os=darwin, arch=arm64). No dedicated_label
Slots slots: 1 in the file, 3 from Taskbase; session slots 1 from Taskbase
Adapters claude (Claude Code CLI 2.1.283, npm global in /opt/homebrew) and codex (Codex CLI 0.157.1, standalone in ~/.local/bin). Models come from Taskbase: Claude claude-sonnet-5-5 (small), claude-opus-5-5 (medium, large), claude-sonnet-5, claude-opus-4-7, claude-fable-5-1; Codex gpt-6-luna (small), gpt-6-sol (medium, large), gpt-6-astra
MCP Taskbase (per-run proxy) and browser: @playwright/mcp 0.0.83 (npm global) on Chrome's CDP port 9222
Scope Taskbase does not show a runner's scope to an agent. The owner reads it in the control room before the wipe (see below)

Its secrets are in secrets.json next to the config (mode 0600): agent-runner secrets list shows password, gitea and claude stored. Codex uses the ChatGPT login cached in ~/.codex/auth.json. No secret is in the macOS keychain.

mac-mini-release

Account agent-release-build (standard)
Service /Library/LaunchDaemons/com.skatzi.agent-release-build.plist
Runner Homebrew gitea-runner 4.1.0 (act_runner's new formula name), binary /opt/homebrew/bin/gitea-runner
Registration ~agent-release-build/actions-runner/.runner (mode 0600), label macos-arm64:host
Signing The release key (MINISIGN_SECRET_KEY, MINISIGN_PASSWORD) and GITEA_TOKEN are Gitea Actions secrets of Skatzi/agent-runner, not files on the Mac. There is no Apple code-signing identity (security find-identity -p codesigning: 0)

Other secrets and keys on disk

Where What Decision before the wipe
~skatziopenclaw/botyard-runner-release-key/ a minisign key pair and its password file. Its public key is not agent-runner's current release key Save it to the password manager if anything still verifies against it; otherwise let it go
~skatziopenclaw/.ssh/id_gitea_kodexet an SSH key for Kodexet's Gitea access (Kodexet's cluster is closed, #1448) Let it go unless still used
~skatziopenclaw/.kube/daily-context.yaml the nightgain jobs' kubeconfig Goes with nightgain
/Users/Shared/agent-browser (1.8 GiB) the agent browser's Chrome profile and its logged-in sessions Log in again after the rebuild

Homebrew

Formulae installed on request (brew leaves): bash bash-completion boost cmake coreutils gitea-runner gnu-tar go goreleaser helm kubeconform kubernetes-cli kustomize makensis minisign mysql mysql@8.4 node@22 p7zip postgresql@16 prometheus python@3.12 rclone shellcheck. No casks. lima, flux and gh were not installed. Xcode Command Line Tools were installed.

Needed after the rebuild:

  • Agent work (seen in the runner's run logs): go, helm, kubeconform, kustomize, kubernetes-cli, prometheus (promtool), shellcheck, python@3.12, node@22, postgresql@16, goreleaser, minisign, makensis, p7zip, gnu-tar, coreutils, gh.
  • Release runner: gitea-runner, go, minisign (jq, zip, curl, make and plutil come with macOS 15 and the Command Line Tools).
  • VMs: lima (2.2 or later), fluxcd/tap/flux.
  • Not needed: mysql, mysql@8.4, boost, cmake (the game server); rclone (no job uses it).

Network, power and disk encryption

Hostname LocalHostName skatzis-Mac-mini (so skatzis-Mac-mini.local); computer name "skatzi's Mac mini"
Public IP The home connection's IP. From the Mac, nc -z 78.47.74.196 6443 and … 50000 both connect, so it is in the firewall's admin_ip today. The value is not written here; it is in the owner's 1-bootstrap/terraform.tfvars
SSH On: port 22 accepts connections
Tailscale Installed and logged in
pmset sleep 0, disksleep 0, displaysleep 0, autorestart 1, womp 1, powernap 1
FileVault Off
Auto-login On, as skatziopenclaw. That is why the runner's LaunchAgents start after a reboot
Software Update Automatic download and automatic install of macOS updates on

Disk use

The data volume had 26 GiB free of 228 GiB (168 GiB used). What the wipe frees, measured with du (protected folders such as ~/Desktop and ~/Documents could not be measured without a privacy prompt; ~/Library timed out partway, so its figures are lower bounds):

Area Size
~/.ollama (local models) 26.1 GiB
~/Library/Caches ≥ 20 GiB
~/azerothcore + ~/azeroth-server (game server) 19.8 GiB
~/Library/Application Support ≥ 14 GiB
/Applications 10.7 GiB
~/.npm 6.9 GiB
~/go 6.0 GiB
~/.vscode 5.1 GiB
/opt/homebrew (with 1.6 GiB of database files) 4.6 GiB
~/.codex 4.1 GiB
/Users/Shared (the agent browser profile) 1.8 GiB
The rest: macOS, other ~/Library folders, protected folders about 50 GiB

Before the wipe

Save or note

Save these somewhere off the Mac (the password manager for secrets, anywhere for the rest):

  1. The runner's config files: ~/Library/Application Support/agent-runner/agent-runner.yaml and claude-mcp.json. They hold no secret values and give back the adapters and their flags as they are.
  2. The runner's scope and labels as the Taskbase control room shows them for mac-mini. The runner stays the same Taskbase runner, so they stay as they are; note them to check against afterwards.
  3. The runner's credentials, if they are not in the password manager yet. Read them with the runner's own tools, never into a task or a file:
  4. the Keycloak password of dunk-mac-mini-agent;
  5. the Gitea token of dunk-mac-mini-agent;
  6. the Claude setup token (sk-ant-oat01-…).

If one is not saved, it is simply re-created after the wipe (see Credentials). 4. Keys you still want from Other secrets and keys on disk, above all the botyard-runner-release-key folder: a lost signing key cannot be recovered. 5. Personal data that is not part of the rebuild: ~/repos/nightgain, the game server, anything in ~/Desktop, ~/Documents and ~/Downloads, the MySQL and PostgreSQL data (/opt/homebrew/var). The agents' test databases do not need saving.

The mac-mini-release registration does not need saving: it is registered again with a new token. Its signing secrets are in Gitea.

Drain, in this order

  1. Pause mac-mini in the Taskbase control room. Wait until it runs nothing: agent-runner status shows no active run, or the control room shows it idle.
  2. Skatzi and Dupondforge agent work stops until it is back: emilia-container-agent serves only Emmalia, and dunk-windows-pc has been offline since 2026-10-12.
  3. Check that no macOS job runs on mac-mini-release (Gitea → Site Administration → Actions → Runners). macOS release builds stop until it is back: a v* tag still publishes the runner binaries, but without the desktop app zip and .dmg.
  4. CI is not affected: the hetzner-mgmt runners keep working until #1459.
  5. Wipe: Erase All Content and Settings (System Settings → General → Transfer or Reset), or reinstall from macOS Recovery.

Fresh macOS base

As the first account (the admin) on the new install:

  1. Updates. Install all macOS updates. Then, in System Settings → General → Software Update → Automatic updates: keep downloads and Security Responses and system files on, and turn Install macOS updates off. An automatic update reboots in the middle of agent runs; pause the runner and install them yourself instead.
  2. Command Line Tools and Homebrew, as the admin, so /opt/homebrew belongs to the admin:
    xcode-select --install
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    brew install go helm kubeconform kustomize kubernetes-cli prometheus shellcheck python@3.12 \
      node@22 postgresql@16 goreleaser minisign makensis p7zip gnu-tar coreutils gh \
      gitea-runner lima fluxcd/tap/flux
    softwareupdate --install-rosetta --agree-to-license   # CI jobs in the k3s VM run amd64 images
    
  3. Power:
    sudo pmset -a sleep 0 disksleep 0 autorestart 1 womp 1
    pmset -g | grep -E ' sleep|autorestart'               # sleep 0, autorestart 1
    
  4. Name: sudo scutil --set LocalHostName skatzis-Mac-mini. #1452 reaches the Mac as skatzis-Mac-mini.local.
  5. SSH: turn on System Settings → General → Sharing → Remote Login, and allow only the admin account. #1452 checks the VM over SSH after a reboot without a login. Install Tailscale again if you reach the Mac from outside the home network.
  6. FileVault: leave it off (see below).
  7. Check the firewall IP: nc -z -G 5 78.47.74.196 6443 must connect. A reinstall does not change the home IP, but if it fails, the IP has left admin_ip (Disaster Recovery).

FileVault: off

With FileVault on, every boot stops at the disk-unlock screen until someone types a password at the Mac. Until then nothing starts: no LaunchDaemon (the k3s VM, the release runner) and no LaunchAgent. And macOS does not allow automatic login while FileVault is on, so even after an unlock the mac-mini runner (a LaunchAgent, see below) waits for a login. sudo fdesetup authrestart skips the unlock screen once, for a restart an admin starts on purpose (man fdesetup). It does not help after a power cut, a kernel panic or a restart macOS starts by itself, which are exactly the cases where the operational agent should come back on its own.

With FileVault off, the Mac boots, starts the daemons and logs the runner account in by itself. The price: the data on the disk is not encrypted at rest. Someone who takes the Mac can read:

  • the runner's secrets.json (Keycloak password, Gitea token, Claude token): all revocable;
  • the CI runners' registration token, in the k3s VM disk: revocable;
  • the two plain files in ~agent-ops/.dr/ (mode 0600, and copied into the k3s VM disk as the Secret ops-agent-break-glass, ADR 0020 §4):
  • kubeconfig, the break-glass kubeconfig: cluster-admin on hetzner-mgmt, and it cannot be revoked on its own;
  • github-token, a fine-grained GitHub PAT with Contents and Issues write on DunkRing/bootstrap-cluster (the Git fallback and the dr issues): revocable.

After a theft:

  1. rotate the cluster's client CA (or wait for the certificate to expire, one year at most);
  2. revoke the github-token PAT on GitHub (Settings → Developer settings → Fine-grained tokens);
  3. revoke the other credentials above.

Recommendation: FileVault off, as on the old install. The Mac is an unattended server at home, and ADR 0020 requires the operational agent to start after a reboot without anyone present. Keep the Mac physically at home, and treat its theft as the incident above. The agent-runner docs (Where secrets live) ask for full-disk encryption on personal machines; this server is the exception.

Accounts

All service accounts are standard, not admin. Create each one as the admin with sudo sysadminctl -addUser <name> -fullName "<full name>" -password -, then sudo createhomedir -c -u <name>.

Account Type Logs in Runs Created in
your admin (any name, e.g. skatzi-admin) admin only when you work on the Mac Homebrew, the installs below, SSH macOS setup
agent-runner standard automatically at boot the mac-mini agent runner, the agent browser, the desktop app; the Claude and Codex logins this page
agent-release-build standard never mac-mini-release (LaunchDaemon) this page
agent-ops standard never Lima VM k3s (LaunchDaemon): the operator and the CI runners this page; the VM install uses it

There is no ci-runner account any more (ADR 0022): CI jobs run unprivileged inside the VM, so they do not need an account apart from the operator's. agent-ops owns the VM because its owner can be root in it, and the VM holds the break-glass kubeconfig (why).

Why the runner gets its own account and auto-login. The agents run with bypassPermissions/full access: they can do whatever their OS user can. On the old install that user was the admin, which also owns Homebrew: an agent could replace go or gitea-runner that the release runner uses to build signed releases. A dedicated standard account limits an agent to its own home. The agent runner installs itself on macOS as a LaunchAgent of its user, which starts only at that user's login (agent-runner install), and the agent browser needs a GUI session for Chrome. So that account is the one that logs in automatically: System Settings → Users & Groups → Automatically log in as agent-runner.

Install order

Do them in this order; each one is checked before the next. Steps 1 to 3 are #1477; steps 4 and 5 are #1466 and #1452.

1. The mac-mini agent runner

It is the same Taskbase runner (mac-mini, Keycloak and Gitea user dunk-mac-mini-agent), so its scope, labels and slots in Taskbase stay as they are. Do not create a new runner.

  1. Log in at the Mac (screen sharing works) as agent-runner once, so its GUI session and ~/Library exist.
  2. As agent-runner, install the agent CLIs into its home, so they can update themselves:
  3. Claude Code with the native installer (claude in ~/.local/bin);
  4. Codex CLI with its standalone installer, then codex login (Codex).
  5. As the admin, install the browser MCP server: npm install -g @playwright/mcp. Install Google Chrome into /Applications.
  6. As agent-runner, install the runner by following agent-runner install, either with the desktop app (.dmg from the latest release) or the CLI:
  7. put the saved agent-runner.yaml and claude-mcp.json into ~/Library/Application Support/agent-runner/;
  8. store the secrets with hidden prompts: agent-runner secrets set password, … set gitea, … set claude;
  9. agent-runner check, then agent-runner service install (without sudo) and agent-runner service start.
  10. As agent-runner, recreate the agent browser by following The browser label, step 1 only. Its step 2 is step 3 above. Its step 3 is in the saved claude-mcp.json and agent-runner.yaml (the old install had the browser MCP server and label); check them against it. One difference from that page: keep the profile in this account's home, --user-data-dir=/Users/agent-runner/Library/Application Support/agent-browser, instead of /Users/Shared/agent-browser, so no other account can read its logged-in sessions. Then log in to the sites the browser tasks need in that Chrome window.
  11. As the admin, run PostgreSQL 16 at boot as agent-runner, and give that account a role (Homebrew's cluster allows local connections without a password). Agents create their test databases there. This was not tried on the old install, which ran it as the admin:
    sudo chown -R agent-runner /opt/homebrew/var/postgresql@16
    sudo touch /opt/homebrew/var/log/postgresql@16.log
    sudo chown agent-runner /opt/homebrew/var/log/postgresql@16.log
    sudo brew services start --sudo-service-user agent-runner postgresql@16
    createuser --superuser agent-runner
    sudo -iu agent-runner psql -d postgres -c 'select 1'      # 1 row
    
  12. Turn on automatic login for agent-runner (see Accounts), then resume mac-mini in Taskbase.

Check: Taskbase shows mac-mini online, with the labels, scope and slots noted before the wipe and version = its target. agent-runner status shows a heartbeat. curl -s http://127.0.0.1:9222/json/version answers. One small task finishes with a pull request.

2. mac-mini-release

  1. In Gitea → Site Administration → Actions → Runners, delete the old mac-mini-release (its local registration is gone), and copy the instance registration token. Do not reset it.
  2. Register and install the LaunchDaemon by following macOS Gitea Actions runner (platform side), as sudo -iu agent-release-build (no GUI login is needed). That page uses the Homebrew binary /opt/homebrew/bin/gitea-runner and reads the registration token from a hidden prompt; skip its brew install, which Fresh macOS base did as the admin.

Check: Gitea lists mac-mini-release online with the label macos-arm64. The macos job of the next Skatzi/agent-runner pull request passes on it.

3. The k3s VM

Follow The k3s VM on the Mac Mini → Install. This page has created agent-ops and installed lima, flux and Rosetta.

Check: that page's "Done when", including the reboot.

4. The CI runners

Follow Gitea Actions Runners on the Mac Mini → Install (first done in #1466): the registration token, KEDA's queue token, the cache server's secret, and the measurement of the ci egress policy.

Check: that page's "Done when": a pushed commit's jobs run on mac-mini-gitea-act-runner-… pods, and the egress check blocks the API server and the kubelet.

5. The operational agent

Follow #1452 (Install the operational agent on the Mac mini). It waits for #1465 (the agent-runner chart in Harbor) and for step 4's egress check: the break-glass kubeconfig goes into the VM only once CI is shown to be unable to reach it.

Check: #1452's "Done when", including the reboot without a login.

Final check: one reboot

sudo shutdown -r now, touch nothing, and after 5 minutes check over SSH:

sudo launchctl print system/com.skatzi.agent-release-build | grep -m1 state     # running
sudo launchctl print system/io.lima-vm.daemon.k3s | grep -m1 state             # running
sudo launchctl print gui/$(id -u agent-runner)/com.skatzi.mac-mini | grep -m1 state   # running

and that mac-mini is online in Taskbase.

Budget on the fresh install

Disk (228 GiB data volume):

What Up to
macOS, Command Line Tools, Homebrew and the formulae above, Chrome about 35 GiB
mac-mini runner: workspaces, Go, npm and Claude/Codex caches, the test database about 20 GiB
mac-mini-release: checkout, Go module cache, setup-go toolcache about 5 GiB
k3s VM disk 50 GiB
Total about 110 GiB, leaving about 115 GiB free, well above the 40 GiB ADR 0020 §3 keeps

Memory (16 GiB) and CPU (10 cores):

What Memory Cores
macOS and the always-on services about 3 GiB —
k3s VM (operator and CI) 9 GiB set, up to about 10–11 GiB held (ADR 0021 measured 7.2 GiB for a 6 GiB VM) 6
mac-mini runner, 3 slots: Claude Code about 0.8 GiB per run, Chrome 1–2 GiB, builds and tests about 4–5 GiB the rest
mac-mini-release during a build about 1–2 GiB, now and then

At full load this is about 17–19 GiB, more than the 16 GiB. macOS compresses and swaps, which is acceptable for short peaks. If memory_pressure stays low on free memory, or runs slow down, lower the CI runners first (a lower maxReplicaCount in cluster/mac-mini/ci/overlay/scaled-job.yaml, 2 pods with a 3 GiB limit each), then the runner's slots in Taskbase, then the VM's memory. Inside the VM the CI pods' memory limits, 6 GiB in all, keep CI from starving the operational agent.

Credentials

What must exist again after the wipe, and where it comes from:

Credential Lived in After the wipe
Keycloak password of dunk-mac-mini-agent runner secrets.json From the password manager; otherwise reset it in Keycloak (realm skatzi), no OTP, no required actions
Gitea token of dunk-mac-mini-agent runner secrets.json From the password manager; otherwise create a new token for that user, then delete the old one
Claude setup token runner secrets.json From the password manager (valid a year); otherwise claude setup-token with the subscription's login
Codex (ChatGPT) login ~/.codex/auth.json codex login as agent-runner
Agent browser sessions Chrome profile Log in again
mac-mini-release registration .runner New registration (step 2)
Release signing key, GITEA_TOKEN Gitea Actions secrets Nothing to do
Operator and CI credentials in the k3s VM did not exist Created in #1452 and #1466