Docs / Agent

Install the agent on macOS

The agent runs as a launchd daemon, as root, and starts at boot. Use darwin-arm64 on Apple silicon and darwin-amd64 on Intel Macs.

One-line install

Put central's enrollment token in a file only root can read, then:

curl -fsSL https://uptight.io/install-agent.sh | sudo sh -s -- \
  --central https://uptight.example.com --token-file /var/root/uptight-enroll.token

It downloads the agent for your Mac, refuses it unless its SHA-256 is the release's, installs it as /usr/local/bin/uptight-agent, writes /Library/Application Support/Uptight/agent.yaml (mode 0600) and loads the launchd daemon. The options are the same as on Linux (--tags, --ca-file, --dry-run, --uninstall…). Release binaries are ad-hoc signed and downloaded with curl, so Gatekeeper does not quarantine them.

By hand

Download uptight-agent-<version>-darwin-<arch> and its launchd plist, and check them:

V=0.14.0
curl -fsSLO https://downloads.uptight.io/uptight-agent/$V/uptight-agent-$V-darwin-arm64
curl -fsSLO https://downloads.uptight.io/uptight/$V/com.uptight.agent.plist
sudo install -m 0755 uptight-agent-$V-darwin-arm64 /usr/local/bin/uptight-agent
sudo xattr -d com.apple.quarantine /usr/local/bin/uptight-agent 2>/dev/null || true
sudo mkdir -p "/Library/Application Support/Uptight" /Library/Logs/Uptight
sudo chmod 0700 "/Library/Application Support/Uptight"

Create /Library/Application Support/Uptight/agent.yaml:

central_url: https://uptight.example.com
enrollment_token: "the token from central's server.yaml"

Then install and load the daemon:

sudo cp com.uptight.agent.plist /Library/LaunchDaemons/
sudo launchctl bootstrap system /Library/LaunchDaemons/com.uptight.agent.plist

Release binaries update themselves; a binary you build yourself does so only when built with your own release key (make release-agents).

Manage it

ToRun
Restart after a config changesudo launchctl kickstart -k system/com.uptight.agent
See its statesudo launchctl print system/com.uptight.agent
Read its logtail -f /Library/Logs/Uptight/uptight-agent.log
Dry runsudo uptight-agent test
Remove itsudo launchctl bootout system/com.uptight.agent

Files: config and state in /Library/Application Support/Uptight/ (state in its state/ folder), log in /Library/Logs/Uptight/. launchd sends the agent's standard output and error to /Library/Logs/Uptight/uptight-agent.out.log: look there when the agent dies before its own log starts.

What it watches on a Mac

Not on macOS: systemd units, pm2 apps (macOS does not let the agent read another process's environment) and package reports.

Automatic upgrades

Central decides when the agent upgrades (Upgrade now in Settings → Fleet, or agent upgrade rings Team), and the order carries only a version number. The agent then upgrades itself by signed self-update:

  1. It downloads that version for macOS and your Mac's architecture, over HTTPS.
  2. It checks the release's Ed25519 signature against the release key built into the agent, and the binary's checksum. Anything else is refused, and so is any version not newer than the one running.
  3. Before the swap it runs the verified binary once as uptight-agent selftest with your agent.yaml: the new version starts up as far as it can without contacting anything or writing anything. A release that does not start on this Mac (say one built for a newer macOS) or that would refuse your agent.yaml is refused, and the running version stays.
  4. It swaps the new binary in at /usr/local/bin/uptight-agent, keeping the old one as uptight-agent.previous, and exits. launchd starts the new one (the plist restarts the agent after any non-zero exit).
  5. The new version must reach central within 10 minutes. If it cannot, keeps crashing after it starts, or refuses agent.yaml, the previous binary is put back and Fleet shows rolled back. Only a binary that passed step 3 and still dies on every start before it gets that far (something the trial run could not reproduce) is not rolled back: rename uptight-agent.previous back by hand.

Central can only choose among releases signed with the offline release key, so it cannot make your Mac run anything else. It is on by default for agents built with a release key. Opt out with auto_upgrade: false in agent.yaml. sudo uptight-agent test prints whether it works on this Mac, and if not, why. Run from a shell it cannot check that launchd runs the agent; Fleet shows the running agent's own answer. An agent started by hand (even with nohup) is not under launchd and does not update itself: use the plist.

A self-updating agent downloads <upgrade_url>/<version>/uptight-agent-<version>-darwin-<arch> and the same name plus .sig. upgrade_url in agent.yaml wins over the URL the agent was built with (AGENT_UPGRADE_URL). Fleet shows manual, with the reason, when:

A version that failed is not retried on that host for an hour. See an upgrade failed or rolled back.

Check it worked

Within a minute the host appears in the web UI under Inventory and on the dashboard, with CPU, memory, IO and disk checks. Java and Node processes that have run for 5 minutes (long_running) get checks of their own, named <host>:<kind>:<identity>. There are no systemd units on macOS, so nothing waits under Discovered for approval. If it does not show up, see the agent does not show up.