Non-root Linux monitoring agent
Installed as a service, the WatchTower15 agent needs root once, to install itself; after that it runs as its own login-less user under a hardened systemd unit, with two Linux capabilities that it uses only for reading and that would allow more, as the table below shows. It makes outbound HTTPS requests only, with no inbound port, and in a container it runs as the container's user instead.
Install once, run without root
The installer needs root once, to create a dedicated, login-less wt15-server-agent service user and the systemd unit. From then on the agent runs as that user, never as root, under a hardened unit, and no setuid binary can raise its privileges. The service user also belongs to the adm and systemd-journal groups, for reading the journal and conventional log files. The server's Security tab shows, in its Agent security section, the privileges each agent reports it actually holds; a host whose card reads None for its privileges was installed without the two capabilities, and running the install command again, as root and with the organisation token, adds them. Source: Server agent: the privilege model.
The systemd unit
# /etc/systemd/system/wt15-server-agent.service (excerpt)
[Service]
User=wt15-server-agent
NoNewPrivileges=yes
AmbientCapabilities=CAP_SYS_PTRACE CAP_DAC_READ_SEARCH
CapabilityBoundingSet=CAP_SYS_PTRACE CAP_DAC_READ_SEARCH
ProtectSystem=strict
ReadWritePaths=/var/lib/wt15-server-agent /var/log/wt15-server-agent.log
PrivateTmp=yesThe installer also writes a one-shot unit, wt15-server-agent-preflight.service, with the same user and exactly the same hardening, for the telemetry check it runs before the service is enabled. Source: Server agent: the privilege model.
What it can read and change
| Capability or area | What the agent does with it | What it would allow, or the limit |
|---|---|---|
CAP_SYS_PTRACE | Reads other users' process details under /proc: per-process metrics, the process behind each listening port, each process's open-file count, and the disk usage report | It would also allow attaching to other processes and changing their memory; the agent never does |
CAP_DAC_READ_SEARCH | Reads files regardless of their permissions: other users' /proc entries and the log files your profile names, except the paths the agent never reads; lists the folders of a monitored volume for the disk usage report, without opening any file | In effect, the agent can read any file on the host. A file a service reads as a parameter is read with this capability set aside, so the file's own permissions apply |
Filesystem | Writes its own state directory and its own log file (ProtectSystem=strict, ReadWritePaths) | Every other path is read-only to it |
Privileges | Holds the two capabilities above (CapabilityBoundingSet) | It can never acquire any other (not CAP_SYS_ADMIN, CAP_NET_RAW or CAP_NET_ADMIN, for example), nor gain privileges through setuid or setgid binaries (NoNewPrivileges=yes) |
Open files | Counts each process's open files against its limit | No file name, socket address or command line is read or sent; full command lines are never sent |
Network | Makes outbound HTTPS requests to the WatchTower15 API | No inbound port |
Changing the host | Asks for its own removal when WatchTower15 deletes its server: a root-owned path unit then runs the root-owned uninstall script | Nothing else: the agent, or anything that takes it over, can ask for nothing but its own removal |
Sources: Server agent: the privilege model, Telemetry.
In a container
This page describes the service install. In a container there is no service: the install script runs the agent in the foreground, and the agent runs as the container's user, usually root inside the container, without the service's hardening (NoNewPrivileges=yes, ProtectSystem=strict, the two-capability bound): the container's own isolation is what contains it. Source: Installation: in a container.
How it talks to us
- Outbound HTTPS (port 443) to the WatchTower15 API,
api.watchtower15.com. Inbound: none required. - Every request carries an HMAC-SHA256 signature over the server's id, the timestamp and the body hash, keyed by the agent secret; the timestamp must be within ±300 seconds of WatchTower15's clock.
- Behind a firewall that allows outbound traffic by IP address, allow the three addresses
api.watchtower15.comanswers from. - Hosts that reach the internet only through an HTTP(S) forward proxy are supported: give the proxy to the installer with
--proxy=.
Sources: Server agent: how it talks to the backend, Installation: network requirements.
Credentials
At enrollment the agent stores its identity, including the secret it signs requests with, in /var/lib/wt15-server-agent/credentials.json. The file is owned by the wt15-server-agent service user and readable only by that user and root (mode 0600); the secret is stored as-is, so treat the file like a password. Source: Configuration: the credentials file.
Frequently asked questions
Does the agent run as root?
Installed as a service, no: only the installer runs as root, once, and the service runs as the login-less wt15-server-agent user. In a container it runs as the container's user, usually root inside the container, without the service's hardening.
Does it open a port?
No. It makes outbound HTTPS requests only; no inbound port is required.
Can it change anything on my server?
It never changes the host apart from asking for its own removal. It writes only its own state directory and its own log file; every other path is read-only to it.
What does it collect?
System metrics and information, such as per-process figures, listening ports and services, and the log files your profile names. It counts open files without reading or sending their names, socket addresses or command lines. Its disk usage reports name the folders and files that take the space, with their sizes and dates, and never open a file; each folder in /home is reported by its name and total size only. Its capabilities would let it read any file on the host (see the table above). The full list: Telemetry.
Where is its secret kept?
The agent secret it signs requests with is kept in /var/lib/wt15-server-agent/credentials.json, mode 0600, owned by the wt15-server-agent service user and readable only by that user and root.
Can I restrict it to fixed IP addresses?
Yes. Allow the three addresses api.watchtower15.com answers from in your egress firewall.
Monitor your first server.Get started