Grafana

Fixing doas: not installed setuid on macOS (MacPorts)

Date: 2026-02-08
Host: macOS (MacPorts prefix: /opt/local)
Component: doas (MacPorts)

My WireGuard client app failed to load profiles because the code path relies on doas for privilege escalation. This fix corrects the macOS (MacPorts) doas installation so the client can elevate properly.

doas: not installed setuid

…and exiting with status 1.


Root Cause

On macOS, MacPorts installs doas without the setuid bit by default.

Because doas is not setuid-root, it cannot elevate privileges. Any command relying on it will immediately fail, including:

 …

Fixing a grafana instance on macOS

Date: 2026-02-08
Host: server (macOS Monterey; Homebrew prefix: /usr/local)
Grafana install: Homebrew (/usr/local/opt/grafana)
Grafana data: /usr/local/var/lib/grafana

Grafana (Homebrew on macOS Monterey) & Password Reset + Boot-Time Startup (No GUI Login)


Summary (what was fixed)

  1. Admin login/password wouldn’t work even after “reset” attempts.
  2. Grafana would run manually, but would not reliably run as a user service via brew services and you needed it to start at boot without any desktop login.
  3. fixed both by:
  • Resetting the password against the actual Brew paths + DB that the running server uses.
  • Replacing the GUI-bound LaunchAgent approach with a system LaunchDaemon at /Library/LaunchDaemons/... that runs at boot as your user.

Caveats

“Password reset succeeded” was misleading because I was hitting the wrong DB

Grafana can be pointed at different data directories. In this setup, the running Brew Grafana server uses:

 …