Skip to content

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.

Set AGENT_VERSION to your chosen release version without the v prefix. Pull the published manifest and detached signature with ORAS.

Terminal window
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.

  1. In the console, select your team and open Hosts → Host enrollment.
  2. Install the verified standalone executable at /usr/local/bin/patchtrail-host-agent. Check the artifact digest against the signed release metadata for its architecture.
  3. Run the command shown in Host enrollment on the host. It uses the team enrollment token to obtain a credential for this installation. Keep the token and local state private.
Terminal window
patchtrail-host-agent --enrollment-token "$PATCHTRAIL_HOST_ENROLLMENT_TOKEN"

The agent reports to https://api.patchtrail.io by default. When running the agent as a service, use the same persistent state directory for enrollment and service startup. That directory holds the installation credential and pending reports. Reuse it across restarts to keep the same installation identity.

The released binary includes its matching systemd files. For example, print the service definition with the following command.

Terminal window
patchtrail-host-agent systemd-unit watasu-security-host.service

Install watasu-security-host.service, watasu-security-journal.service, and watasu-security-journal.socket with their matching watasu-security.conf sysusers configuration. The service uses /var/lib/watasu-security-host as its persistent state directory. Point the first enrollment at that state directory with --state-dir, and run one agent process for the installation.

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.

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.