Skip to content

Novak on macOS

Novak runs on Apple Silicon with oMLX as the engine, and this page covers what is different there. The main setup path in deploy-checklist.md is written for the Unraid host, which is the reference deployment today. Read that first, then use this page for the macOS version of each phase. The macOS path was the original one and was verified on real hardware (decision #28), but it has not been through the power-loss test in Phase 11, and anything marked VERIFY has not been checked since.

Phase 0, hardware. Apple Silicon, tuned for a 24 GB machine. Less memory means smaller models, not failure. FileVault decides whether the machine comes back on its own after a power cut, and it is annoying to change later, so decide before you start. Read Running headless below.

Phase 1, admin setup. Create a Standard service account called novak (System Settings, Users & Groups). From an admin account, run ./scripts/bootstrap-admin.sh --service-user novak. It applies the power profile, installs OrbStack and oMLX into /Applications, and gives novak a FileVault unlock token. Check with sudo fdesetup list (novak must appear, or it cannot unlock at the pre-boot screen) and pmset -g | grep -E 'autorestart|sleep' (autorestart 1, sleep 0).

Phase 2, the CLI. Log in as novak, which is a separate account, so nothing carries over. Run git clone https://github.com/almadon/novak.git ~/Workspaces/Novak/novak, then ./scripts/bootstrap.sh from the checkout. No sudo is needed. The CLI ends up at ~/.local/bin/novak, because this account cannot write to /usr/local/bin. Each macOS account has its own OrbStack VM, so containers from another account are invisible here and docker ps shows nothing while services run elsewhere. Launch OrbStack once by hand and click through the first-run dialog, because until it is dismissed the Docker socket does not listen and the error is an unhelpful EOF.

Phase 3, secrets. They live in the macOS Keychain, and .env holds the literal text set-in-keychain on every secret line. If you replaced one with a real value, undo that and use novak secret set.

Phase 4, the model. The engine is oMLX (omlx-settings.md). Download Qwen3-4B-Instruct 4bit and Qwen3-14B 4bit in the oMLX app, set OMLX_API_KEY, and create profiles named ha-voice, chat, deep and task (novak omlx apply). Give the 14B a 15 to 30 minute TTL and the 4B none, because voice cannot absorb a model load. Profiles cannot hold a system prompt (decision #17), so personas are set per client or injected by the router.

Phase 10, unattended operation. Auto-start is a LaunchAgent. bootstrap.sh has already installed the plist with your checkout path in it, and you only load it: launchctl load ~/Library/LaunchAgents/one.a64.novak.stack.plist. Do not copy the template by hand, because it carries a placeholder, not a path. Set your secrets before loading it, because up.sh exits non-zero on a missing secret and KeepAlive retries every 60 seconds, so loading early gives a failure loop in /tmp/novak-stack.err. Login items for OrbStack and oMLX are set as novak, since they are per-account. Tailscale runs as a system daemon with a tagged node, never per-user. For recovery, a network KVM with Tailscale installed on the KVM itself, and a UPS that powers the KVM first, then the network gear, then the Mac, with the data cable connected so macOS shuts down cleanly.

Phase 11, the test that counts. Reach the KVM from a phone on cellular with home wifi off, then pull the plug. The machine should power back on and stop at the FileVault prompt. You unlock it through the KVM and it proceeds to a running stack. As novak, ls /Users/<you> must say Permission denied. This test has not been run on the macOS path yet.

Backups and reset. Time Machine covers the OrbStack volumes and ~/.omlx. ./scripts/reset.sh removes containers and keeps config, secrets and data. --purge-data and --purge-config exist and both ask first. It is written for macOS and has not been ported to Unraid.

How to make the Mac come back on its own after a reboot or a power cut, and what that costs you in security.

macOS will not auto-login while FileVault is enabled. It isn’t a setting to hunt for: FileVault’s pre-boot password prompt is the login, so there is nothing left to automate. Any guide describing both together is describing two machines.

So “unattended after power loss” and “disk encrypted at rest” look like a straight either/or. There is a third way, and it is the one this setup uses.

The path here: FileVault on, unlocked remotely by the JetKVM

Section titled “The path here: FileVault on, unlocked remotely by the JetKVM”

The trick is that on macOS, unlocking FileVault is logging in. Type a FileVault-enabled account’s password at the pre-boot prompt and macOS carries those credentials through and lands you in that account’s desktop session, with no second login and no auto-login needed.

So if novak is FileVault-enabled, one remote password entry after a power cut gets you: the disk decrypted, novak logged in, a window server running, and therefore oMLX and OrbStack able to start. Everything auto-login was wanted for, without any of what it costs.

Compared with turning FileVault off:

FileVault off + auto-login FileVault on + KVM unlock
Disk encrypted at rest no yes
Password on disk in /etc/kcpassword yes, recoverable no
Human needed after an outage no one remote password entry
Account may be Administrator never safe your choice

The cost is one deliberate action per unexpected outage. The UPS makes those rare, and planned reboots skip it entirely (see below).

This is the part that is easy to get wrong. Remote unlock depends on a chain of devices, and the Mac is only the last of them. If the outage takes down the network but not the Mac, you cannot reach the thing that unlocks it.

On the UPS, in order of importance:

  1. The JetKVM: no KVM, no unlock. It draws almost nothing.
  2. Router and switch: the KVM needs a network path out.
  3. The host.

If your UPS cannot carry all three, carry the KVM and the network gear and let the Mac drop. A Mac that lost power is recoverable remotely; a Mac you cannot reach is not.

Put Tailscale on the JetKVM itself. It has native support, so the KVM joins the tailnet as its own node, meaning the unlock path does not depend on the internal reverse proxy, or on any other host at home being up. One less thing in the chain that has to survive the outage that broke everything else.

If the UPS has a USB data cable, connect it to the Mac. macOS reads UPS battery state natively (System Settings → Energy Saver → UPS options) and can shut down cleanly before the battery dies, instead of the Mac being cut off mid-write. The cable is worth it, because an unclean shutdown of a running Postgres is a much worse morning than a cold boot.

For updates and anything else you initiate:

Terminal window
sudo fdesetup authrestart

This stores the unlock key in memory for exactly one reboot, so the machine comes back to a logged-in session unattended. Verified supported on this hardware (fdesetup supportsauthrestart → true). Use it instead of reboot and remote unlock becomes an outage-only chore.

The auto-login pitfall: why the other path was rejected

Section titled “The auto-login pitfall: why the other path was rejected”

Recorded because it is not widely known, and because it is what makes the KVM route worth the extra hardware:

Auto-login writes the account password to /etc/kcpassword, obfuscated with a fixed XOR key. It is not encrypted. Anyone who can read that file, or the disk, which is now unencrypted, recovers the password in seconds.

Consequences, and they are not theoretical:

  • The account would have to be Standard, not Administrator. A recoverable password on an admin account is a recoverable root password.
  • novak’s Keychain is reachable by anyone with that password, and the Keychain is where the stack’s API keys live. That is the real cost of A: not “someone reads my files”, but “someone gets the credentials”.
  • Physical access already implied a lot. Auto-login makes it immediate.

None of this applies to the KVM route: nothing is written to disk, because nothing is automated and a person types the password each time.

Set a screen lock anyway (System Settings → Lock Screen → require password immediately). It does not stop the services (the session stays active). It just means a walk-past doesn’t get a desktop.

Running as novak rather than as yourself is worth it regardless:

  • Your home is already inaccessible. /Users/tmeuze is mode 700, so novak cannot read your documents, keys, or browser data. Nothing to configure. Verify it with ls -ld /Users/tmeuze.
  • Blast radius. A compromised container escaping into the novak session finds a Standard account with its own Keychain and nothing of yours.
  • No accidental coupling. Services can’t quietly grow a dependency on a path in your home if they can’t see it.

Keep it that way: do not give novak access to your home

Section titled “Keep it that way: do not give novak access to your home”

You asked whether the stack needs to reach your home directory. It should not, and it is easier if it doesn’t. Everything it needs can live in novak’s own space:

Where it goes
The repos /Users/novak/novak, /Users/novak/novak-integracije
oMLX models and settings /Users/novak/.omlx
OrbStack data /Users/novak/.orbstack
Secrets novak’s own Keychain

There is a second, sharper reason beyond tidiness. macOS TCC guards Desktop, Documents and Downloads behind a permission dialog. If anything running as novak touches a protected path, macOS shows a prompt, and on a headless box, nobody clicks it. The process hangs or silently fails, at 3am, with no indication why. Full separation avoids an entire class of confusing failure.

If you ever do need to share a file, use /Users/Shared rather than opening up your home.

Do these as your own admin user, in order.

Setup is split in two because the service account has no administrator rights and shouldn’t: bootstrap-admin.sh does everything needing sudo or a system-wide install, once; bootstrap.sh does the rest, as novak.

1. Create the account. System Settings → Users & Groups → Add User. Name it novak. Standard is the safer default, though Administrator is defensible here since no password is being written to disk, but the stack does not need it, so Standard unless something later proves otherwise.

2. Run the admin half, from your own admin account:

Terminal window
./scripts/bootstrap-admin.sh --service-user novak

Applies the power profile (never sleep, restart after power failure), installs OrbStack and oMLX into /Applications so every account can run them, and gives novak a FileVault unlock token. Without that token novak cannot unlock at the pre-boot screen and the whole approach collapses, so confirm it took, rather than assuming:

Terminal window
sudo fdesetup list # novak must appear

3. Log in as novak and install the stack there: repos, bootstrap.sh, Keychain secrets. It is a separate account, so none of your setup carries over:

Terminal window
git clone https://github.com/almadon/novak.git ~/novak
cd ~/novak && ./scripts/bootstrap.sh

bootstrap.sh needs no sudo. It checks the admin half has been done and tells you exactly what to ask for if not, rather than failing halfway through.

4. Start on login. Add OrbStack and oMLX to Login Items (Users & Groups → Login Items) while logged in as novak, then install the LaunchAgent below to bring the stack up once Docker is actually ready.

5. Wire up the JetKVM. HDMI and USB to the Mac, Tailscale installed on the KVM, and both it and the network gear on the UPS. Then test it before you need it. See below.

Three separate concerns, deliberately not in one place:

Path (as novak) Who owns it
Code /Users/novak/novak git (replaceable, never written to at runtime)
Runtime /Users/novak/.novak you (config, per-deployment settings, data)
Container data Docker volumes Docker (memories, chat history, Postgres)

Runtime is split out so git pull never conflicts with a running stack, and so a checkout can be deleted and re-cloned without losing configuration. The mechanism is docker compose --project-directory, which makes every relative bind in docker-compose.yml resolve against the runtime directory rather than the checkout.

~/.novak is the default. Set NOVAK_HOME to put it anywhere:

Terminal window
export NOVAK_HOME="$HOME/Almadon/Novak"

What ends up there:

~/.novak/
.env config and non-Keychain settings
registry/mcp-servers.yaml which MCP servers THIS install runs
wakeword/models/ wake-word models you trained
docker-compose.mcp.yml generated; never edit
.venv/ generated; PyYAML for the reconciler

The virtualenv is deliberate. pip install --user is per-account and Homebrew’s python refuses it outright (PEP 668), so “I installed PyYAML” and “the script can’t find it” are easily both true at once. up.sh builds this on first run and reuses it after, delete it and it rebuilds.

The registry lives here, not in the repo. It records what this particular machine runs and at what risk level. That is a per-deployment fact, not catalogue content. The copy in the checkout is a starting template, copied across on first run and yours from then on. Edit it here. The repo’s copy is not read once this exists.

Your home directory is mode 700, so novak cannot read a checkout under /Users/tmeuze. That is working as intended, so do not loosen it. novak clones from GitHub itself:

Terminal window
git clone https://github.com/almadon/novak.git ~/novak

So there are two checkouts: yours for development, novak’s for running. They meet through GitHub, not the filesystem. Deploying is git pull as novak.

Tailscale must be a system daemon, and the node should be tagged

Section titled “Tailscale must be a system daemon, and the node should be tagged”

Two separate problems, both of which bite a headless install.

Per-user by default. The macOS Tailscale app normally runs as a LaunchAgent in whichever account is logged in. Set up from your admin account, it is invisible to novak: no tailscale status, and nothing this stack does can reach the tailnet.

User-owned keys expire. A node authenticated as a person carries a key expiry (180 days by default). When it lapses the machine silently leaves the tailnet and needs a human to re-authenticate, on the box you specifically chose because you did not want to visit it.

Tagged nodes fix both. They belong to the tailnet rather than to a person, and key expiry is disabled by default.

Check which you have, since the bundle id matters:

Terminal window
launchctl list | grep -i tailscale

io.tailscale.ipn.macsys is the standalone build and can run system-wide. io.tailscale.ipn.macos is the App Store build, which is sandboxed and cannot do this. Replace it with the standalone package from tailscale.com first.

Then, once:

  1. Allow the tag in your tailnet ACL (admin console → Access controls):

    "tagOwners": { "tag:server": ["autogroup:admin"] }
  2. Generate an auth key carrying that tag (Settings → Keys). Make it reusable only if you will re-run this; ephemeral is wrong here.

  3. On the Mac, install the daemon and authenticate as a tagged node:

    Terminal window
    sudo /Applications/Tailscale.app/Contents/MacOS/Tailscaled install-system-daemon
    sudo tailscale up --authkey=tskey-auth-... --advertise-tags=tag:server

    VERIFY the daemon path and command against Tailscale’s current docs. This was not tested here, and the standalone build has moved things before.

  4. Confirm it took:

    Terminal window
    tailscale status --json | grep -A2 '"Tags"'

    Tags present and no key expiry. Then check it from novak’s session, which is the account that actually needs it.

Re-authenticating an existing node with tags may make it appear as a new device needing approval. That is expected, not a failure. Its Tailscale IP can change, so re-check anything pinned to the old address, including HOST_NAME.

The login keychain unlocks at login, not at boot. That single fact makes the chain longer than it looks:

FileVault unlocked (KVM) → novak's session starts → login keychain unlocks
→ LaunchAgent runs
→ up.sh reads secrets

So the KVM unlock is not only what boots the machine, it is what makes the secrets readable. Nothing extra is needed, because unlocking FileVault is logging in and the keychain comes with it. No password is stored anywhere to make that automatic, which is the point.

The corollary is worth saying plainly: if nobody logs in, there are no secrets. A machine sitting at the FileVault prompt has a locked keychain and cannot start the stack. It is waiting, not broken.

The failure that actually catches people is different. macOS can raise a GUI dialog the first time a given tool reads an item (“security wants to use your confidential information”). On an unattended boot nothing clicks it, so up.sh hangs rather than failing, which is far worse than an error: no log line, no exit code, just a stack that never comes up.

novak secret set avoids this by pre-authorising the reader (-T /usr/bin/security) when it stores the item. A secret added by hand with a bare security add-generic-password has no such grant and will hang.

Check rather than assume:

Terminal window
novak secret verify

It reads every secret the way up.sh does, with a timeout, and reports anything that would block. Re-add whatever it flags with novak secret set.

The alternative is a file: real values in $NOVAK_HOME/.env, mode 600, owned by novak. It always works and needs no session.

On a FileVault’d disk with a dedicated Standard account that is not far off what the Keychain gives you, since the Keychain auto-unlocks at that same account’s login anyway. What you lose is protection from other logged-in users and from processes never granted access, which is real but modest on a single-purpose box.

up.sh falls back to .env whenever a Keychain lookup finds nothing, so this is a per-secret choice and needs no code change.

Each macOS user runs their own OrbStack VM with its own socket. Containers started by one account are invisible to another. docker ps shows nothing, even while the services are up and answering.

So run the stack from one account, consistently: novak. If you started it from your admin account while testing, those containers live over there and novak cannot see, stop or restart them. Stop them from the account that owns them, then start again as novak.

novak ports detects this and says so, because “docker ps is empty but the service responds” is otherwise five confusing minutes.

scripts/reset.sh undoes what bootstrap.sh did, so it can be re-run:

Terminal window
./scripts/reset.sh # containers only; config and data kept
./scripts/reset.sh --purge-data # also volumes (memories and chats are gone)
./scripts/reset.sh --purge-config # also ~/.novak

The default is conservative on purpose: re-running bootstrap is routine and shouldn’t be a decision with consequences. Keychain secrets, oMLX models, Homebrew and OrbStack are never touched by any flag. The script prints the commands to remove those by hand if you actually want them gone.

Login Items start OrbStack, but Docker isn’t usable the instant the app launches. docker compose run too early fails against a socket that isn’t listening yet. scripts/launch-stack.sh waits for it.

bootstrap.sh installs the plist for you, substituting the real path to your checkout. Loading it is the only manual step:

Terminal window
launchctl load ~/Library/LaunchAgents/one.a64.novak.stack.plist

The checked-in template holds a __NOVAK_REPO__ placeholder rather than a default path, so copying it by hand produces an agent that cannot start. That failure is worth understanding: the containers carry restart=unless-stopped, so OrbStack brings them back on its own and the stack looks perfectly healthy while boot recovery is broken. Check launchctl list | grep novak: a - in the PID column with a non-zero status is an agent that never ran.

If the checkout moves, re-run bootstrap.sh, then unload and load the agent.

Logs to /tmp/novak-stack.log and /tmp/novak-stack.err.

It must be a LaunchAgent, not a LaunchDaemon. Daemons run at boot with no login session and no window server. oMLX and OrbStack are GUI applications and cannot run there, which is the underlying reason a logged-in session is required at all, and therefore why auto-login matters.

The only test that counts is pulling the plug.

  • pmset -g | grep -E 'autorestart|sleep': autorestart 1, sleep 0
  • sudo fdesetup list: novak is there
  • Reach the JetKVM over Tailscale from a phone on cellular, with home wifi off. This proves the unlock path does not secretly depend on being on the home network.
  • sudo fdesetup authrestart: comes back to a logged-in novak session with no intervention
  • docker compose ps as novak: everything running
  • Voice through Home Assistant answers, with nobody having touched the Mac
  • As novak: ls /Users/tmeuze → Permission denied (this is correct)
  • Pull the plug. The Mac should power back on and stop at the FileVault prompt. You unlock it through the KVM and it proceeds to a running stack. Do this once deliberately, when you have time. Finding out the KVM has no video at the pre-boot screen during a real outage is the bad version.