Installation of the PatchMon Agent
Introduction
The agent installer script authenticates with PatchMon server and proceeds to install the patchmon-agent.sh.
Adding a host:
Go to the Hosts page, press Add host:
You will be greeted by this screen where you enter in a friendly name for the server:
Groups will show empty unless you have added groups already.
Here is how to add groups
As soon as you press "Create Host" it will redirect you to the credentials and deployment script page:
Now we have two ways of installation however we should first take care of a few things:
The first is the checkbox "Force Install (bypass broken packages)"
At times in Linux, certain packages are broken and throw dependency issues when installing software which break the installation script. If you find this is happening then ideally you need to fix your server before you install more software, hoever that's not always possible so by pressing this flag it will bypass package manager issues.
Secondly, at times you may have a self-signed certificate in which this curl command needs an extra flag to go through. This would apply to both the Installation command as well as the agent communication within. Here is how to enable the -k flag installation-wide in settings.
Installing the agent in the Automated way
The one-line command includes the api-id and api-key which is utilized to download the PatchMon agent as well as to populate the credentials.txt file.
SSH into your server, ensure you are root and lets copy and paste this one-line command and see the output:
đ Verifying system datetime and timezone... đ Current System Date/Time: âĸ Date/Time: Sat Oct 4 07:16:00 PM BST 2025 âĸ Timezone: Europe/London â ī¸ Non-interactive installation detected Please verify the date/time shown above is correct. If the date/time is incorrect, it may cause issues with: âĸ Logging timestamps âĸ Scheduled updates âĸ Data synchronization â Continuing with installation... â â Date/time verification completed (assumed correct) âšī¸ đ Starting PatchMon Agent Installation... âšī¸ đ Server: https://demo09.eu-west-02.patchmon.cloud âšī¸ đ API ID: patchmon_90dd7fe... âšī¸ đ Machine ID: a9295dcd387f979b... đ§ Installation Diagnostics: âĸ URL: https://demo09.eu-west-02.patchmon.cloud âĸ CURL FLAGS: -s âĸ API ID: patchmon_90dd7fe... âĸ API Key: 49ff8a6f6b67abf5... âšī¸ đĻ Installing required dependencies... âšī¸ Detected apt-get (Debian/Ubuntu) âšī¸ Updating package lists... Hit:1 https://cli.github.com/packages stable InRelease Hit:2 https://linux.teamviewer.com/deb stable InRelease Hit:3 https://download.docker.com/linux/ubuntu jammy InRelease Hit:4 https://ppa.launchpadcontent.net/damentz/liquorix/ubuntu jammy InRelease Hit:5 https://deb.nodesource.com/node_20.x nodistro InRelease Hit:6 https://packages.microsoft.com/ubuntu/20.04/prod focal InRelease Hit:7 https://packages.microsoft.com/repos/code stable InRelease Hit:8 http://apt.pop-os.org/proprietary jammy InRelease Hit:9 http://apt.pop-os.org/release jammy InRelease Hit:10 https://apt.postgresql.org/pub/repos/apt jammy-pgdg InRelease Hit:12 https://ngrok-agent.s3.amazonaws.com buster InRelease Hit:13 http://apt.pop-os.org/ubuntu jammy InRelease Hit:14 http://apt.pop-os.org/ubuntu jammy-security InRelease Hit:15 http://apt.pop-os.org/ubuntu jammy-updates InRelease Hit:11 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease Hit:16 http://apt.pop-os.org/ubuntu jammy-backports InRelease Reading package lists... Done N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'https://apt.postgresql.org/pub/repos/apt jammy-pgdg InRelease' doesn't support architecture 'i386' âšī¸ Installing jq, curl, and bc... â All required packages are already installed â Dependencies installation completed âšī¸ đ Setting up configuration directory... âšī¸ đ Creating new configuration directory... âšī¸ đ Creating API credentials file... âšī¸ đĨ Downloading PatchMon agent script... âšī¸ đ Agent version: 1.2.7 âšī¸ đ Checking if machine is already enrolled... â â Machine not yet enrolled - proceeding with installation âšī¸ đ§Ē Testing API credentials and connectivity... â API credentials are valid â â TEST: API credentials are valid and server is reachable âšī¸ đ Sending initial package data to server... âšī¸ Verifying system datetime and timezone... âšī¸ Collecting system information... âšī¸ Sending update to PatchMon server... â Update sent successfully (190 packages processed) âšī¸ Checking crontab configuration... âšī¸ Updating crontab with current policy... âšī¸ Setting update interval to 60 minutes â Crontab updated successfully (duplicates removed) â Crontab updated successfully â â UPDATE: Initial package data sent successfully âšī¸ â Automated updates configured by agent â đ PatchMon Agent installation completed successfully! đ Installation Summary: âĸ Configuration directory: /etc/patchmon âĸ Agent installed: /usr/local/bin/patchmon-agent.sh âĸ Dependencies installed: jq, curl, bc âĸ Automated updates configured via crontab âĸ API credentials configured and tested âĸ Update schedule managed by agent đ§ Management Commands: âĸ Test connection: /usr/local/bin/patchmon-agent.sh test âĸ Manual update: /usr/local/bin/patchmon-agent.sh update âĸ Check status: /usr/local/bin/patchmon-agent.sh diagnostics â â Your system is now being monitored by PatchMon!
Lets go through what this script has done:
- Asked you if the Time is correct, this is for informational purposes and it should be correct if it isn't. It causes issues with logs etc. Set that if it isn't right
- The script wants to install
jq bc curl
For the agent to work properly.
- It will install the credentials file in the location :
/etc/patchmon/credentials
It's important to note that this credentials file includes the PATCHMON_URL="https://yourinstance.domiain", Ensure this is correct if you have issues connecting to the agent after changing urls or ports
The Agent script location is in the following location:
/usr/local/bin/patchmon-agent.sh
Once the installation is done, Click off the page in PatchMon and refresh the hosts page.
You will see the information of your host now showing along with all the other information: