Skip to content

patchmon PatchMon

PatchMon is a web-based application designed to monitor and manage software patches and updates across multiple systems.

🛠 Installation

The application is installed by cloning the GitHub repository and running a series of npm commands to build the frontend and backend. The update.sh script handles the installation of a new version.

Default Port: 3399

Installation path: /opt/patchmon

⚙ Config

Configuration for PatchMon is managed through .env files for both the frontend and backend, and a patchmon.creds file for credentials.

pve/patchmon/.env.tmpl

--8<-- "patchmon/.env.tmpl"

🤝 Service

PatchMon runs as a systemd service.

pve/patchmon/patchmon-server.service

--8<-- "patchmon/patchmon-server.service"

To install the service, you can use the service:install task.

Install Service

task service:install
sudo cp ./patchmon-server.service /etc/systemd/system/
sudo systemctl enable --now patchmon-server.service

🔧 Settings

The update-settings.js script is used to configure the database settings for PatchMon.

pve/patchmon/update-settings.js

--8<-- "patchmon/update-settings.js"

This can be run using the settings:install task.

Update Settings

task settings:install
sudo cp ./update-settings.js /opt/patchmon/backend/update-settings.js
node /opt/patchmon/backend/update-settings.js

🚀 Upgrade

The update.sh script automates the process of downloading and installing the latest version of PatchMon. It checks for the latest release on GitHub, backs up existing configuration, downloads the new version, builds it, and restarts the service.

Upgrade

task update
sudo ./update.sh
pve/patchmon/update.sh
--8<-- "patchmon/update.sh"

💾 Backup

The backup.sh script is used to back up the Redis database. It triggers a BGSAVE, waits for it to complete, and then encrypts the dump file using sops.

Backup

task backup
sudo ./backup.sh
pve/patchmon/backup.sh
--8<-- "patchmon/backup.sh"

Traefik

homelab/pve/traefik/conf.d/patchmon.yaml
--8<-- "traefik/conf.d/patchmon.yaml"

Task List

--8<-- "patchmon/task-list.txt"

🔗 References