Install the agent manually on Windows

If the MSI installation fails, try a manual installation

Download a ZIP package

Go to the release page of cagent on Github, and download the most recent stable version as ZIP file.

Windows Zip download

Do not download and install pre-releases. Only use stable version!

Unpack the content of the ZIP file to C:\Program Files\cagent

Unpack the ZIP

Create a configuration file

Inside the newly created folder C:\Program Files\cagent create a text file called cagent.conf.

Make sure the only file extension is .conf and not .conf.txt.

On select the host, and click on "install agent". Select "other (manual installation)". Copy the three-line config snippet to the clipboard and paste it to the cagent.conf file you are creating on the host.

Copy the config
Paste it into a file

Register the agent as windows service

Open a cmd.exe terminal as Administrator. Change to the directory C:\Program Files\cagent and execute the command cagent.exe -s This will create and start a Windows Service. Verify the command was successful with sc query cagent.

Register and start the service

You agent should now connect. You can test it with cagent -t.

Use NSSM as an alternative service manager

In very rare cases cagent refuses to run as a windows service. Either registering the service via cagent.exe -s fails, or starting the service hangs and the cagent.exe process doesn't come up.

You can try to use the NSSM as an alternative service manager.

  1. Download the latest version here to some folder and unpack the zip file.

  2. Open a console as administrator and change to the directory of the unpacked zip file. Change to the win64 directory. For example cd C:\Users\Administrator\Downloads\nssm-2.24\win64

  3. Execute nssm.exe install "Cagent via NSSM" "C:\Program Files\cagent\cagent.exe" "-c cagent.conf" That's a single line without line breaks.

  4. Open the windows services and start the newly created service.

Install the cagent service via the NSSM.
NSSM has installed the cagent service.