Enroll a Linux host
The standalone patchtrail-host-agent reports installed packages and the booted kernel. Package inventory supports Debian, Ubuntu, and Rocky Linux 9. Use the signed release artifact for linux/amd64 or linux/arm64 from the host-agent package.
Get the release artifact
Section titled “Get the release artifact”Set AGENT_VERSION to 0.1.10 or later, without the v prefix. Pull the published manifest and detached signature with ORAS.
oras pull "ghcr.io/patchtrail-io/host-agent:v${AGENT_VERSION}-release"Verify release.json.sig against release.json with your trusted PatchTrail release public key. For the executable artifact that matches your architecture, pull the digest-pinned OCI reference in the verified manifest. The artifact contains patchtrail-host-agent.
Enroll the host
Section titled “Enroll the host”- In the console, select your team and open Assets → Hosts → Host enrollment.
- Install the verified standalone executable at
/usr/local/bin/patchtrail-host-agent. Check the artifact digest against the signed release metadata for its architecture. - Store the team enrollment token in an owner-only file on the host. The agent exchanges it for a credential for this installation.
patchtrail-host-agent --enrollment-token-file /path/to/private-enrollment-tokenThe agent reports to https://api.patchtrail.io by default. Its persistent state directory holds the installation credential and pending reports. Reuse it across restarts to keep the same installation identity.
Run with systemd
Section titled “Run with systemd”The host administrator installs the matching units from the verified binary. Review the journal helper before installing it.
patchtrail-host-agent systemd-unit patchtrail-host-journal.servicepatchtrail-host-agent systemd-unit patchtrail-host-journal.socketSystemd gives the helper the host’s existing systemd-journal group via SupplementaryGroups=systemd-journal. The uploader runs in the separate patchtrail-host-telemetry group, which gives it access to the local socket. The helper serves supported journal queries through that socket.
As a host administrator, create the local group and install the units you reviewed.
sudo install -d -m 0755 /etc/sysusers.dpatchtrail-host-agent systemd-unit patchtrail-host-agent.conf | sudo tee /etc/sysusers.d/patchtrail-host-agent.conf >/dev/nullsudo systemd-sysusers /etc/sysusers.d/patchtrail-host-agent.conf
for unit in patchtrail-host-agent.service patchtrail-host-journal.service patchtrail-host-journal.socket; do patchtrail-host-agent systemd-unit "$unit" | sudo tee "/etc/systemd/system/$unit" >/dev/nulldonesudo systemctl daemon-reloadThe service uses /var/lib/patchtrail-host-agent as its persistent state directory.
For first enrollment through systemd, save the token in a root-owned file with mode 0600. Create a temporary drop-in with sudo systemctl edit --runtime patchtrail-host-agent.service. Replace the credential source path with your private token file.
[Service]LoadCredential=patchtrail-enrollment-token:/path/to/private-enrollment-tokenExecStart=ExecStart=/usr/local/bin/patchtrail-host-agent --state-dir ${STATE_DIRECTORY} --enrollment-token-file %d/patchtrail-enrollment-tokenEnable and start the agent with sudo systemctl enable --now patchtrail-host-agent.service. Once the host reports its first observation, remove the token file and the enrollment drop-in, reload systemd, and restart the agent. Check that the same host reports again.
For signed automatic updates, install a separate root-owned copy of the binary at /usr/local/libexec/patchtrail-host-updater and the matching patchtrail-host-update.service and patchtrail-host-update.timer units. The updater verifies the release and executable, confirms a healthy startup, and restores the previous executable if startup fails.
Check the first observation
Section titled “Check the first observation”Open the host in Hosts and look for a current observation. Check the distro release, package versions, and booted kernel. A fixed kernel that has been installed but is still awaiting a reboot remains an exposure until a fresh observation confirms the fixed kernel is running. See Verify a fix.