RelayLink provides two self-contained Agent archives for macOS (sharing the exact same configuration schema, control protocol, and channel model, with no macOS-specific channel logic):
- Intel Mac (
uname -m=x86_64):RelayLink-Agent-osx-x64-<version>.tar.gz - Apple Silicon Mac (
uname -m=arm64):RelayLink-Agent-osx-arm64-<version>.tar.gz
Unsigned & Unnotarized Notice: Current macOS release archives do not have a Developer ID signature or Apple notarization (the build pipeline has no notarization credentials and does not run
codesignornotarytool), so they must not be treated as signed distributions for unmanaged devices. Production delivery requires signing, notarization, and stapling in your release pipeline alongside your organization's Gatekeeper / MDM policy—never bypass verification by disabling Gatekeeper globally. Until signing is wired in, release notes explicitly mark macOS packages as unsigned.
Directories & Service Account
Have an administrator or MDM create a dedicated hidden service user and group _relaylink-agent with an unused local UID/GID (because directory services and UID allocations vary by organization, this repository does not hardcode a UID in account-creation commands).
Prepare the directories with the following ownership and permissions:
- Program directory: Extract to
/Library/RelayLink/Agent, owned byroot:wheelwith0755permissions on the directory and executables (not writable by the service account). - Configuration & state directory: Place under
/Library/Application Support/RelayLink/Agent, owned by_relaylink-agent:_relaylink-agentwith0700on the directory and0600onagent.json; per-server identities, port allocations, and diagnostic logs reside instate/<profileId>/. - Standard output/error log directory: Create
/Library/Logs/RelayLinkasroot, owned by_relaylink-agent:_relaylink-agentwith0750permissions.
Logging Policy: Agent runtime logs are written to logs/ inside the configuration directory (agent-*.jsonl retained for 14 days, error-*.jsonl retained indefinitely, rotated daily or at 10 MiB); stderr captures launcher, migrator, and log-sink failure diagnostics (see Installation & Usage Guide).
Download the client's new-format Agent JSON from the Server Admin UI and save it to /Library/Application Support/RelayLink/Agent/agent.json. Because this file contains the client secret, never commit it, copy it into /Library/RelayLink/Agent, or grant read access to other users. Ensure RelayLink.Agent, RelayLink.Agent.ConfigMigrator, and start-relaylink-agent.sh are executable, then run the migrator and config check as _relaylink-agent before loading the service:
sudo -u _relaylink-agent /Library/RelayLink/Agent/RelayLink.Agent.ConfigMigrator \
--config '/Library/Application Support/RelayLink/Agent/agent.json'
sudo -u _relaylink-agent /Library/RelayLink/Agent/RelayLink.Agent \
--config '/Library/Application Support/RelayLink/Agent/agent.json' \
--check-config
Installing the launchd Service
Install relaylink-agent.plist to /Library/LaunchDaemons/com.relaylink.agent.plist, owned by root:wheel with 0644 permissions. launchd invokes start-relaylink-agent.sh, which runs RelayLink.Agent.ConfigMigrator first and then execs RelayLink.Agent.
Validate the plist and load the daemon:
sudo plutil -lint /Library/LaunchDaemons/com.relaylink.agent.plist
sudo launchctl bootstrap system /Library/LaunchDaemons/com.relaylink.agent.plist
sudo launchctl enable system/com.relaylink.agent
sudo launchctl kickstart -k system/com.relaylink.agent
Check status and recent logs:
sudo launchctl print system/com.relaylink.agent
tail -n 100 '/Library/Application Support/RelayLink/Agent/logs/'agent-*.jsonl
tail -n 100 /Library/Logs/RelayLink/agent.stderr.log
The local read-only Agent status UI listens on http://127.0.0.1:18081/ by default (governed by dashboardPort in agent.json; set to 0 to disable). Channels remain centrally managed on the Server.
Upgrading & Uninstalling
Upgrading: Stop the daemon, replace only the program files in /Library/RelayLink/Agent (preserving config, identities, and port state in /Library/Application Support/RelayLink/Agent), and reload:
sudo launchctl bootout system/com.relaylink.agent
sudo launchctl bootstrap system /Library/LaunchDaemons/com.relaylink.agent.plist
sudo launchctl kickstart -k system/com.relaylink.agent
Uninstalling: Run sudo launchctl bootout system/com.relaylink.agent, then remove /Library/LaunchDaemons/com.relaylink.agent.plist and /Library/RelayLink/Agent. The /Library/Application Support/RelayLink/Agent directory containing client secrets and identities is preserved by default so an administrator can back it up or purge it safely once the client is decommissioned.
Verification Boundaries
- After installation, confirm the client shows
Onlinein the Server Admin UI, the local Agent status page loads, and after rebooting macOS the service starts automatically while preserving its identity and local peer entry ports. - Both Intel and Apple Silicon builds must be verified on physical hardware or matching-architecture macOS VMs covering
launchdlifecycle, file permissions, Gatekeeper, network-drop reconnection, and TCP forwarding. Cross-publishing on another OS only proves archive creation and does not replace on-device verification. - CI runs test-macos-agent.sh natively on GitHub-hosted Intel and Apple Silicon macOS runners to validate publish architecture, config checks,
launchdlifecycle, crash recovery, directory permissions, local status UI, and identity reuse. Script Boundary: Because this script creates system accounts and modifies/Library, it is restricted to GitHub-hosted runners. Hosted runners cannot persist a single job across reboots or simulate real sleep/wake cycles and browser-downloadquarantineextended attributes, so those checks still require self-hosted or physical Macs.
Upgrading with Verified Release Packages
- Download the Intel (
osx-x64) or Apple Silicon (osx-arm64) release archive from Version Status in the local Agent UI; prefer the file staged by the Agent on disk to avoid browser-addedquarantineattributes. - As an administrator, copy the verified archive and checksums to a
root-owned staging directory under/var/tmp, verify integrity withshasum -a 256 -c, and pre-extract the archive. - Stop the service, back up the existing binaries, and preserve configuration and state under
/Library/Application Support/RelayLink/Agent; swap/Library/RelayLink/Agent, run configuration checks, and reload thelaunchdjob (if the activelaunchdjob label cannot be confirmed, follow the foreground process workflow provided in the UI). - Because current archives lack a Developer ID signature or Apple notarization, verify the Agent version,
launchdjob state, and active tunnel connectivity locally after upgrading.