Skip to content
Free test

Look after agents

In development. Not available. Packages are not yet published for download.

Applies to: Reach 0.1.1, built from commit 08df4b0. There is no release.

Copied word for word from docs/admin/agents.md in the private Reach repository, commit 08df4b0, 21 November 2026.

The guide: Administering Reach agents

Reach is in development. Its packages are not published.

For the person who looks after the machines whose Reach agent (the read-only program that reports a machine's AI tools) sends to a Reach server.

Re-enrolling: when and how to use reach-agent enrol --force#

reach-agent enrol --token-file <file> gives a machine its identity, using an enrolment token (the secret that lets a machine join the server; see enrolment and tokens). If the machine already has one, the command stops and says:

Shell
This machine is already enrolled. Use --force to replace its identity.

That protects you from enrolling twice by accident. You need --force only when you really want a new identity on a machine that has an old one:

  • the machine's state folder was restored from an old backup or copied from another machine and it no longer matches the server;
  • you rebuilt the server (new data folder, new KEK) and the machine must join the new one;
  • the agent says its identity is damaged;
  • you are testing and want to enrol the same machine again.

How:

  1. In the console, on Add machines, make a new token: the first one may be used up.
  2. Save it with (umask 077; cat > ~/reach-token), then paste the token, press Enter and press Ctrl-D (the file is readable only by you; enrol ignores the line ending), then enrol again with --force. On a Linux machine with the agent service:
Shell
sudo install -o reach-agent -g reach-agent -m 0600 ~/reach-token /var/lib/reach-agent/token
sudo -u reach-agent reach-agent enrol --machine --force --token-file /var/lib/reach-agent/token

enrol deletes the copy in /var/lib/reach-agent, not ~/reach-token: delete that yourself with rm ~/reach-token, since the token may have uses left. The running service switches to the new identity by itself. On Windows, use the enrol command of the Windows guide with --force, from an elevated prompt. Only in the one-shot mode (scan --send run by a person, no service), as the same ordinary user that ran the agent before: reach-agent enrol --token-file ~/reach-token --force.

What --force does: it replaces the identity on this machine with a new one. What it does not do: it does not delete anything on the server. The server treats the new identity as a new machine, so the old record stays in Machines (it goes silent) beside the new one. Two machines with the same name are always shown as two. Do not use --force to "fix" a problem you have not understood: if enrolment fails with a message about the token, the address, the certificate or the clock, --force will not change that.

After agent_listen is set: agents enrolled earlier go quiet#

server.agent_listen in server.toml gives agents an address of their own, apart from the console (configuration). An agent enrolled against the old address, before agent_listen was set, does not keep working afterwards: it logs "server reply signature does not match" and the machine goes quiet in the console. Why: the agent keeps calling the address it was enrolled against, which is now the console's. Once agent_listen is set, the console address answers every agent request with a plain "not found", and that answer carries no server signature, so the agent cannot verify it and reports a signature failure. Nothing is wrong with the agent's keys or the server's. (The agent's message does not say that the address is the problem.) New tokens carry public_url, which must be the agents' address (see Users and sign-in), so the remedy is to re-enrol each such machine:

  1. In the console, on Add machines, make a new token (made after the change, so it carries the agents' address), and save it on the machine with (umask 077; cat > ~/reach-token), then paste the token, press Enter and press Ctrl-D (the file is readable only by you; enrol ignores the line ending).
  2. Run, on the machine, the same command the service uses, with --force:
Shell
sudo install -o reach-agent -g reach-agent -m 0600 ~/reach-token /var/lib/reach-agent/token
sudo -u reach-agent reach-agent enrol --machine --force --token-file /var/lib/reach-agent/token

enrol deletes the copy in /var/lib/reach-agent, not ~/reach-token: delete that yourself with rm ~/reach-token, since the token may have uses left. The running service switches to the new identity by itself (within a minute or so; sudo systemctl restart reach-agent does it at once). As with any --force, the server lists the machine as a new one and the old record goes silent.

The clock#

Every request an agent sends is signed with the time. Both sides need to keep time properly:

  • Aim for agent and server within 5 minutes. The server accepts a request whose time is within 300 seconds of its own.
  • Between 5 minutes and 24 hours apart the server answers that the clock differs, with its own signed time; the agent applies the difference and retries once, so reporting still works, but fix the clock anyway: the agent moves the time it records for what it saw by that difference, and TLS certificates are judged by your clock too.
  • More than 24 hours apart the agent refuses: "this machine's clock is more than 24 hours away from the server's clock". Nothing is sent. Set the clock right and run it again.
  • Token lifetimes are counted in days from the server's clock.

On Rocky Linux 9 (and, untested, compatible distributions such as RHEL 9), timedatectl shows whether the clock is synchronised, and chronyd (installed by default) keeps it so: sudo systemctl enable --now chronyd. On Windows, w32tm /query /status; on macOS, System Settings, General, Date & Time, "Set time and date automatically".

Removing or stopping an agent#

  • Linux: a resident service. Stop it with sudo systemctl stop reach-agent. Remove it with sudo dnf remove reach-agent on Rocky (this deletes its state folder) or sudo apt remove reach-agent, then sudo apt purge reach-agent to delete the state, on Ubuntu (details).
  • Windows: a resident service too. From an elevated prompt, reach-agent.exe uninstall-service removes it and keeps the machine's identity; add --purge to delete that as well (Windows).
  • One-shot mode (scan --send run by hand, no service): the agent runs only when you run it, so stopping is not running it. Its identity stays in the user's state folder until you delete it (Linux ~/.local/state/reach-agent/, macOS ~/Library/Application Support/Sys-Ki/Reach Agent/, Windows %LOCALAPPDATA%\Sys-Ki\Reach Agent\).

A removal that deletes the identity tries to tell the server, and a server that was told lists the machine as Retired: dnf remove on Rocky tries just before the state folder is deleted, and uninstall-service --purge on Windows once the identity file is gone. If the server was not told, if the machine was paused, and after any other removal (apt remove or apt purge on Ubuntu, stopping the service, a one-shot identity deleted by hand), the machine stays in the list and goes silent. Retiring a machine from the console is not built yet. Revoking a token does not stop an enrolled agent.