Docs / Agent
Install the agent on Windows
The agent runs as a Windows service (LocalSystem) that starts automatically (delayed start). After a failure the service manager restarts it after 5, 30 and 60 seconds, and resets the failure count after a day without one.
Builds: windows-amd64 and windows-arm64.
One-line install
Put central's enrollment token in a file only Administrators can read, then from an elevated PowerShell (Windows PowerShell 5.1 or PowerShell 7):
& ([scriptblock]::Create((irm https://uptight.io/install-agent.ps1))) -CentralUrl https://uptight.example.com -TokenFile C:\uptight-enroll.token
It picks the build for this machine's architecture, refuses it unless its SHA-256 is the release's, copies it to C:\Program Files\Uptight\, restricts C:\ProgramData\Uptight to Administrators and SYSTEM before it writes agent.yaml there, installs the uptight-agent service and starts it. Options: -Tags role=web,team=ops, -CaFile, -AllowInsecureHttp, -UpgradeUrl, -DryRun, -Force (replace an existing agent.yaml) and -Uninstall. Running it again upgrades the agent and keeps agent.yaml. Another release than the current one (-Version) needs -SkipSignature, because Windows has no built-in Ed25519 check: check its signature yourself first.
With the install script
With a binary you downloaded and checked yourself: put it, renamed uptight-agent.exe, next to install.ps1 (in each release's https://downloads.uptight.io/uptight/<version>/, and the repository's deploy/windows/), and run, from an elevated PowerShell:
Unblock-File .\uptight-agent.exe
powershell -ExecutionPolicy Bypass -File .\install.ps1 -CentralUrl https://uptight.example.com -TokenFile C:\uptight-enroll.token
It does the same as the one-line installer, with that exe. Release binaries update themselves; one you build yourself does so only when built with your own release key (make release-agents).
By hand
- Copy
uptight-agent.exetoC:\Program Files\Uptight\. - Create
C:\ProgramData\Uptight\agent.yamlwithcentral_urlandenrollment_token. - From an elevated prompt:
"C:\Program Files\Uptight\uptight-agent.exe" service install "C:\Program Files\Uptight\uptight-agent.exe" service start
Manage it
| To | Run (elevated) |
|---|---|
| Stop or start | uptight-agent.exe service stop / service start, or the Services console ("Uptight agent") |
| Restart after a config change | Restart-Service uptight-agent |
| Read its log | Get-Content C:\ProgramData\Uptight\logs\uptight-agent.log -Wait |
| Dry run | uptight-agent.exe test |
| Remove it | uptight-agent.exe service stop, then service uninstall |
service install takes -c (agent.yaml) and -log-file to use other paths. The service runs uptight-agent.exe run -c <agent.yaml> -log-file <log>. It is named uptight-agent, shown as "Uptight agent". service install creates the config, log and C:\ProgramData\Uptight\state folders, and refuses when the service already exists: uninstall it first.
What it watches on Windows
- CPU, memory and disk IO from Windows' performance counters.
- Every fixed drive (NTFS, ReFS, exFAT):
C:\,D:\... Their checks are named<host>:disk:cand so on. Windows reports no inode counts. - Java and Node processes that keep running.
- The agent id comes from the machine's
MachineGuid.
Not on Windows yet: Windows services as checks and package reports. The agent only needs outbound HTTPS to central (and to the release download host for upgrades); open no inbound port.
Automatic upgrades
Central decides when the agent upgrades (Upgrade now in Settings → Fleet, or agent upgrade rings Team), and the order carries only a version number. The agent then upgrades itself by signed self-update:
- It downloads that version's
.exefor your architecture, over HTTPS. - It checks the release's Ed25519 signature against the release key built into the agent, and the file's checksum. Anything else is refused, and so is any version not newer than the one running.
- Before the swap it runs the verified
.exeonce asuptight-agent.exe selftestwith your agent.yaml: the new version starts up as far as it can without contacting anything or writing anything. A release that does not start on this server (say one built for a newer Windows) or that would refuse your agent.yaml is refused, and the running version stays. - It renames the running
uptight-agent.exetouptight-agent.exe.previous(Windows lets a running program be renamed, not replaced), puts the new one in its place and ends. The service's recovery actions, set byservice install, start the new one 5 seconds later. - The new version must reach central within 10 minutes. If it cannot, keeps crashing after it starts, or refuses agent.yaml, the previous
.exeis put back and Fleet shows rolled back. Only a binary that passed step 3 and still dies on every start before it gets that far (something the trial run could not reproduce) is not rolled back: renameuptight-agent.exe.previousback by hand.
Central can only choose among releases signed with the offline release key, so it cannot make the server run anything else. It is on by default for agents built with a release key. Opt out with auto_upgrade: false in agent.yaml. uptight-agent.exe test prints whether it works on this server, and if not, why. Run from a console it cannot check that the agent runs as the service; Fleet shows the running agent's own answer.
A self-updating agent downloads <upgrade_url>/<version>/uptight-agent-<version>-windows-<arch>.exe 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:
this build has no release key: install an agent built bymake release-agents.no upgrade_url is set and this build has none built in: setupgrade_urlin agent.yaml.not run by a service manager that restarts it (…): run it as the Windows service.
A version that failed is not retried on that host for an hour. See an upgrade failed or rolled back.
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. Java and Node processes that have run for 5 minutes (long_running) get checks of their own, named <host>:<kind>:<identity>. Windows has no systemd units, so nothing waits under Discovered for approval. If it does not show up, see the agent does not show up.