Document updating the agents, and harden the Windows update check

- AGENT_UPDATE.md: when an agent needs updating, how (reuse the stored token or rotate it), how to do many
  servers, how to check it worked, and why a server can stay 'not reported'.
- Windows agent: the Windows Update search runs in its own process with a 150 s limit (the scheduled task is
  stopped after five minutes), a failed search is not retried for an hour, and the cache is read the same in
  PowerShell 7 and Windows PowerShell 5.1.
- Linux agent: says in the journal when the package manager could not be read.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-10-17 02:13:08 +02:00
1 parent 171511c6db
commit 3da5c639b1
5 files changed
+225 -18

No files matched your search

+2 -1
View File
@@ -6,9 +6,10 @@ runs as a scheduled task (as SYSTEM, every 15 minutes) and pushes to `POST /api/
the machine never needs to be reachable from Homelab Manager.
Each report also says how many updates Windows Update has waiting (and how many are security or critical, and whether a restart is due). Searching Windows Update goes over the network and can take a minute or two, so it is done at most every six hours; the answer is kept in `%ProgramData%\HomelabManager\updates.json` and reused between. Nothing is downloaded or installed.
Each report also says how many updates Windows Update has waiting (and how many are security or critical, and whether a restart is due). Searching Windows Update goes over the network and can take a minute or two, so it runs in a separate process with a 150-second limit and is done at most every six hours; the answer is kept in `%ProgramData%\HomelabManager\updates.json` and reused between (a search that fails is not tried again for an hour, and that report simply leaves updates out). Nothing is downloaded or installed. To update an agent that was installed before this existed, see [AGENT_UPDATE.md](../../AGENT_UPDATE.md).
The installer limits `%ProgramData%\HomelabManager` to SYSTEM and Administrators. The agent runs as SYSTEM, so anyone who could change its script could run code as SYSTEM; the folder is not left to inherit ProgramData's default permissions. Re-running the install one-liner applies this to an existing install.
## Install
1. In Homelab Manager, **Servers → Manage servers → Add a server**, choose **Windows** as the