Files
ansible/roles/mac/templates/hermes-dashboard.plist.j2
T
PhilandClaude Opus 5.5 d617a2aa64 Mac: Hermes dashboard as a launchd service behind Tailscale Serve
The dashboard used to be started by hand as `serve --host 0.0.0.0`, so it
was reachable from the LAN and didn't survive a reboot or a Hermes update.
Now, following Hermes's docs:

- launchd agent local.hermes-dashboard runs `hermes dashboard` on
  127.0.0.1:9119 (KeepAlive, --skip-build since `hermes update` builds it).
- Tailscale Serve publishes it on https://cogitator-02.porgy-porgy.ts.net,
  tailnet only. No module exists for Serve; the task reads
  `serve status --json` and only sets it when it differs.
- Login: scrypt password hash and a real signing secret from the vault
  (the old secret was the literal text "$(openssl rand -base64 32)"); the
  plaintext password line is removed from .env since it overrides the hash.
- After Serve is set, the play checks /api/status demands the basic login;
  if not, it turns Serve off and fails.
- Hermes's Python no longer needs a firewall exception, so that's gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 06:46:47 -07:00

39 lines
1.3 KiB
Django/Jinja

<?xml version="1.0" encoding="UTF-8"?>
<!-- {{ ansible_managed }} -->
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>{{ hermes_dashboard_label }}</string>
<key>ProgramArguments</key>
<array>
<string>{{ ansible_user_dir }}/.local/bin/hermes</string>
<string>dashboard</string>
<string>--host</string>
<string>127.0.0.1</string>
<string>--port</string>
<string>{{ hermes_dashboard_port }}</string>
<string>--no-open</string>
<!-- hermes update builds the web UI; don't rebuild on every start -->
<string>--skip-build</string>
</array>
<key>EnvironmentVariables</key>
<dict>
<key>HERMES_HOME</key>
<string>{{ ansible_user_dir }}/.hermes</string>
<key>PATH</key>
<string>{{ ansible_user_dir }}/.local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
</dict>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>ThrottleInterval</key>
<integer>30</integer>
<key>StandardOutPath</key>
<string>{{ ansible_user_dir }}/.hermes/logs/dashboard.log</string>
<key>StandardErrorPath</key>
<string>{{ ansible_user_dir }}/.hermes/logs/dashboard.error.log</string>
</dict>
</plist>