Docs / Agent
Install the agent on Linux
One command installs the agent and enrolls it: on Ubuntu and Debian from the apt repository, so it upgrades through apt; anywhere else with systemd, as a checked binary that upgrades itself with signed releases.
Builds: linux-amd64, linux-arm64, linux-arm (ARMv7: Raspberry Pi 2 and later on a 32-bit OS) and linux-386. The apt repository has amd64, arm64 and armhf packages.
One-line install
Put central's enrollment token in a file only root can read (agents.enrollment_tokens in central's server.yaml), then:
curl -fsSL https://uptight.io/install-agent.sh | sudo sh -s -- \
--central https://uptight.example.com --token-file /root/uptight-enroll.token
On Ubuntu and Debian it adds the apt.uptight.io source and its key, writes /etc/uptight/agent.yaml (mode 0600) and installs the uptight-agent package of the current release. Elsewhere (Rocky, RHEL, Fedora, Amazon Linux, Arch, SUSE…) it downloads the agent binary, refuses it unless its SHA-256 is the release's (the installer carries the checksums of the release's signed SHA256SUMS), and installs it as /usr/local/bin/uptight-agent with the systemd unit. The agent enrolls on its first push.
| Option | Does |
|---|---|
--central URL | Central's address (central_url); https:// |
--token-file FILE | The enrollment token. --token TOKEN works too, but shows in ps and your shell history; so does UPTIGHT_ENROLLMENT_TOKEN (with sudo -E) |
--tags role=web,team=payments | Static tags |
--ca-file /etc/uptight/ca.pem | Trust your own CA for central |
--insecure-http | Allow an http:// central, such as a Docker trial's port 8090. Labs only |
--method apt|binary | Force one method (default: apt on Ubuntu and Debian) |
--version X.Y.Z | Another release than the current one. The binary method then checks its Ed25519 signature with the release keys, which needs OpenSSL 3 (--skip-signature installs it unchecked where there is no OpenSSL 3) |
--upgrade-url URL | Download from your mirror; also written to agent.yaml for self-updates |
--dry-run | Print what it would do, change nothing |
--force | Replace an existing agent.yaml (kept as agent.yaml.bak) |
--uninstall | Remove the agent; agent.yaml and the agent's key stay |
An existing agent.yaml is never replaced without --force, so running the installer again upgrades the agent and keeps its settings. Read the script first if you like: curl -fsSL https://uptight.io/install-agent.sh | less. To roll out to many hosts, deploy/ansible/uptight-agent.yml in the repository adds the same apt source and key with Ansible.
With apt, by hand (Ubuntu, Debian)
Add the apt repository, then:
sudo apt install uptight-agent
Edit /etc/uptight/agent.yaml (it is created root-only, mode 0600) and set the two required keys:
central_url: https://uptight.example.com
enrollment_token: "the token from central's server.yaml"
sudo systemctl restart uptight-agent
journalctl -u uptight-agent -f
Or write agent.yaml first: the package never replaces an existing file, so the agent starts enrolled. Once enrolled, the agent saves its own key in /var/lib/uptight-agent/agent.key and no longer needs the token.
With the binary, by hand (any distribution)
Download uptight-agent-<version>-linux-<arch> and check it (how), then:
V=0.14.0
curl -fsSLO https://downloads.uptight.io/uptight-agent/$V/uptight-agent-$V-linux-amd64
curl -fsSLO https://downloads.uptight.io/uptight/$V/uptight-agent.service
curl -fsSLO https://downloads.uptight.io/uptight/$V/agent.example.yaml
sudo install -m 0755 uptight-agent-$V-linux-amd64 /usr/local/bin/uptight-agent
sudo install -d -m 0755 /etc/uptight
sudo install -m 0600 agent.example.yaml /etc/uptight/agent.yaml # then edit it
sudo install -m 0644 uptight-agent.service /etc/systemd/system/
sudo systemctl daemon-reload && sudo systemctl enable --now uptight-agent
Release binaries update themselves. A binary you build yourself with make build-agents does not, unless you build it with your own release key (make release-agents).
The unit logs to the journal (journalctl -u uptight-agent) and to /var/log/uptight-agent/uptight-agent.log. Rotate that file with logrotate's copytruncate; the deb ships a logrotate file that keeps 14 daily logs.
On NixOS
The flake has a NixOS module for the agent. Add the flake as an input (inputs.uptight.url = "github:uptight-io/uptight/<rev>", pinned to a release commit), then in the host's configuration:
{
imports = [ inputs.uptight.nixosModules.uptight-agent ];
services.uptight-agent = {
enable = true;
centralUrl = "https://uptight.example.com";
enrollmentTokenFile = config.sops.secrets.uptight-enrollment-token.path;
settings.tags.role = "web";
};
}
*Fileoptions take a runtime path, for example from sops-nix or agenix. Never use a Nix path literal such as./token: it would copy the secret into the world-readable store.- The module renders
/etc/uptight/agent.yaml(root-owned, 0600), sosudo uptight-agent testworks with no-c. State is in/var/lib/uptight-agent. - Logs go to the journal only:
journalctl -u uptight-agent. There is no-log-file. - Central cannot upgrade a NixOS agent: Fleet shows it as manual. Upgrade it by bumping the flake input, or with
system.autoUpgrade. - To build the package alone:
nix build github:uptight-io/uptight#uptight-agent.
Dry run first
uptight-agent test runs discovery once and prints what it would report, without contacting central:
sudo uptight-agent test -c /etc/uptight/agent.yaml
What Linux adds
- systemd units: services are discovered and wait under Discovered for you to approve them.
- Docker containers (0.10.0): each compose service or long-running container becomes a check, and the Docker daemon is checked as
<host>:docker-daemon. The agent needs Docker's socket at/var/run/docker.sock(the socket itself, not a symlink), owned by root with group root or docker, not world-writable, and must run as root on the host (the packaged unit does). Containers whose restart policy isalwaysorunless-stoppedare watched; others wait for approval. See Docker containers. - Running in a container: the agent measures its cgroup's CPU and memory limits, and reports pressure (PSI) where the kernel has it.
- pm2 apps are discovered with their restart counts.
- Packages: the agent reports installed packages on Ubuntu, Debian and NixOS (turn it off with
report_packages: false). Team matches them against vulnerability feeds Team; there is no Debian feed, so only Ubuntu and NixOS are matched. - Vulnerability fixes Team: a deb install can upgrade vulnerable packages when you allow it (below).
Automatic upgrades
Central decides when each agent upgrades (Upgrade now in Settings → Fleet, or agent upgrade rings Team), and the order carries only a version number. auto_upgrade: true is the default; set it to false in agent.yaml to opt a host out.
- Package installs upgrade through apt: the package's own upgrade unit installs exactly that version from the host's apt sources, with apt's signature checks.
apt-mark hold uptight-agentalso stops it. - Binary installs (release binaries, and agents you built with your own release key) upgrade by signed self-update: the agent downloads the new version from
https://downloads.uptight.io/uptight-agent, checks its Ed25519 signature against the release keys built into it and the binary's checksum, runs it once asuptight-agent selftestwith your agent.yaml (it starts up as far as it can without contacting or writing anything) to make sure it starts on this host and accepts your configuration, swaps it in next to itself, and exits so systemd starts the new one. The new version must reach central within 10 minutes, or the previous binary is put back automatically (only one that passed the trial run and still dies on every start before it gets that far is not: renameuptight-agent.previousback by hand). It never downgrades, and central cannot make it run anything that was not signed with the offline release key.
The shipped uptight-agent.service allows the agent to replace /usr/local/bin/uptight-agent (ReadWritePaths=-/usr/local/bin) and restarts it after the update (Restart=always). sudo uptight-agent test prints whether upgrades work on this host, and if not, why (Fleet shows the same reason; for a binary install, test run from a shell cannot check that systemd runs the agent, and says so). Agents in Docker or Kubernetes and NixOS hosts are upgraded by rebuilding the image or with Nix.
A self-updating agent downloads <upgrade_url>/<version>/uptight-agent-<version>-linux-<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 the agent cannot update itself:
| Reason | Fix |
|---|---|
this build has no release key | Install a release binary from downloads.uptight.io (or one built by make release-agents). make build-agents without RELEASE_PUBKEY builds agents that never update themselves. |
no upgrade_url is set and this build has none built in | Set upgrade_url in agent.yaml, or build with AGENT_UPGRADE_URL. |
not run by a service manager that restarts it (…) | Run it from the shipped unit. On Linux only systemd is recognized. |
cannot write /usr/local/bin: read-only file system (…) | Add ReadWritePaths=-/usr/local/bin to the unit (in deploy/uptight-agent.service from 0.10.0). |
installed by Nix / running in a container | Upgrade with Nix, or rebuild the image. |
A version that failed is not retried on that host for an hour. See an upgrade failed or rolled back.
Vulnerability remediation Team
Off by default, on two switches: central's vulnerability_remediation.enabled and this host's remediation.enabled in agent.yaml (settings). Ubuntu and Debian package installs of uptight-agent 0.10.0 or later only; on macOS, Windows, FreeBSD, NixOS, Docker images and plain binaries the agent reports remediation unsupported, with the reason.
Central's switch lives in the config repository: one file, git only (read-only in uptight-web), checked by uptight validate. It is not a server.yaml key.
vulnerability_remediation:
enabled: true # default false: no Fix now, and the API answers 409
auto: # optional, off by default
enabled: false
min: kev # kev (default): known exploited only; critical: and critical; high: and high
envs: [staging] # empty: every env
With auto.enabled: true the leader checks every 5 minutes, with the alerts, and queues one request per server for its open, not accepted, fix_available rows at or above min in envs. They are recorded as requested_by: auto. A CVE whose last fix on a server failed or was refused is not retried automatically for 24 hours (1 hour when the result was retryable). Fix now still works.
On the host:
- Central asks for package names and minimum versions, nothing else. The agent refuses unless remediation is on and every package is installed and allowed by your
packages,denyandallow_kernelsettings. - The agent never runs apt. It writes the request to
/var/lib/uptight-agent/remediate/request(root only), and the package'suptight-agent-remediate.pathunit startsuptight-agent-remediate.service, which runsuptight-agent remediate-applyas root. - That helper checks everything again, skips held packages, runs
apt-get update, and installs each package's apt candidate only when it is newer than what is installed:apt-get install --only-upgrade --no-remove, keeping your configuration files. It refuses the whole request if apt would remove anything. It never reboots: the result says when/run/reboot-requiredasks for one. - The result appears on the Security page and in the audit log, and the fixed rows clear once the agent reports its new package versions.
Limits on the host:
- At most 50 packages per request, one request at a time per server, and at most one request handed to the helper every 5 minutes.
- The agent refuses Uptight's own packages: they upgrade through
auto_upgrade. - Kernel packages need
allow_kernel: true. The host still needs a reboot, which Uptight never does: the row then reads reboot needed. - The root unit runs for at most 1 hour.
A request goes queued → sent → running → succeeded, failed or refused, or canceled before it was sent. One still queued after 24 hours, sent but not started after 15 minutes, or running after 2 hours fails with the reason.
Stop it on a host at any time with remediation.enabled: false or sudo systemctl disable --now uptight-agent-remediate.path. Check a host with sudo uptight-agent test, which prints Remediation: on, supported or why not. If Fix now is refused, see Fix now is refused.
Cloned machines and images
The agent id comes from /etc/machine-id. In image builds, truncate it (truncate -s 0 /etc/machine-id) and never bake /var/lib/uptight-agent into the image, so each instance enrolls as itself. A clone that gets 409 agent already enrolled needs a new machine id: rm /etc/machine-id && systemd-machine-id-setup.
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. pm2 apps, and Java and Node processes that have run for 5 minutes (long_running), get checks of their own, named <host>:<kind>:<identity>. Only systemd units wait under Discovered for you to approve them. If it does not show up, see the agent does not show up.