PatchMon Community Edition

PatchMon is an open-source platform for centralized Linux patch management, system monitoring and server administration. It provides a convenient way to keep track of multiple Linux systems, monitor available updates and manage hosts from a central web interface.

In this guide, I will explore the PatchMon Community Edition and demonstrate how to install it natively on a Proxmox LXC container running AlmaLinux 10, without using Docker.

Although Docker is the recommended deployment method, a native installation offers an interesting alternative for administrators who prefer managing individual components directly through the operating system and systemd. It also provides more insight into how the different parts of PatchMon work together.

The goal is to build a lightweight, self-hosted installation using native Linux services such as PostgreSQL, Valkey and Nginx.

This guide documents the complete installation process, from preparing the environment and building the frontend and backend to configuring the application and deploying the PatchMon agent.

Environment

  • Red Hat Enterprise Linux 10
  • Proxmox LXC container
  • PatchMon Community Edition
  • Native installation without Docker
  • Installation directory: /opt/patchmon

Install Required Packages

First, update the system and install the required development tools:

dnf update -y

dnf install -y \
  curl wget git tar gzip unzip \
  make gcc gcc-c++ \
  openssl openssl-devel \
  policycoreutils-python-utils \
  nano vim-enhanced

Install Node.js and npm:

dnf install -y nodejs

node --version
v22.23.5
npm --version
10.9.9

Install Go using the standard RHEL package repositories:

dnf install -y golang

go version
go version go1.27.4 (Red Hat 1.27.4-3.el10_3.alma.1) linux/amd64

Install PostgreSQL 17

RHEL 10 does not provide PostgreSQL 17 through its standard repositories. Therefore, the official PostgreSQL PGDG repository is used.

Add the repository:

dnf install -y \
  https://download.postgresql.org/pub/repos/yum/reporpms/EL-10-x86_64/pgdg-redhat-repo-latest.noarch.rpm

Install PostgreSQL:

dnf install -y postgresql17-server postgresql17-contrib

Initialize the database and enable the service:

/usr/pgsql-17/bin/postgresql-17-setup initdb
Initializing database ... OK

systemctl enable --now postgresql-17

Verify the installation:

systemctl status postgresql-17
● postgresql-17.service - PostgreSQL 17 database server
     Loaded: loaded (/usr/lib/systemd/system/postgresql-17.service; enabled; preset: disabled)
    Drop-In: /run/systemd/system/service.d
             └─zzz-lxc-service.conf
     Active: active (running) since Wed 2026-12-02 13:33:51 UTC; 12min ago
     [...]

Create the PatchMon Database

Generate a database password:

openssl rand -hex 24
56333e137df3d23fa1dabd16625cc957a13020a812a3ee32 # anonymized

Open the PostgreSQL console:

sudo -u postgres /usr/pgsql-17/bin/psql

Create the database user and database:

CREATE USER patchmon_user WITH PASSWORD 'YOUR_RANDOM_PASSWORD_CREATED_BEFORE';
CREATE ROLE
CREATE DATABASE patchmon_db OWNER patchmon_user;
CREATE DATABASE

Test the database connection:

/usr/pgsql-17/bin/psql \
-h localhost \
-U patchmon_user \
-d patchmon_db \
-c "SELECT version();"
Password for user patchmon_user:
                                                  version
-----------------------------------------------------------------------------------------------------------
 PostgreSQL 17.12 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 14.4.1 20260724 (Red Hat 14.4.1-5), 64-bit
(1 row)

Install Valkey

AlmaLinux 10 provides Valkey, an open-source, Redis-compatible data store that PatchMon uses for caching and background tasks.

Install and start the service:

dnf install -y valkey

systemctl enable --now valkey

Check the service:

systemctl status valkey

valkey-cli ping

Expected response:

PONG

Prepare the PatchMon Installation

All PatchMon files are stored under /opt/patchmon.

Create the directory structure:

mkdir -p /opt/patchmon/{source,agents}

Clone the official PatchMon Community Edition repository to obtain the frontend, backend and agent source code:

cd /opt/patchmon/source

git clone https://github.com/PatchMon/PatchMon.git .

Build the Frontend

Navigate to the frontend directory:

cd /opt/patchmon/source/frontend

Install dependencies and build the frontend:

npm install

npm run build
> patchmon-frontend@0.0.0 build
> vite build

vite v7.3.7 building client environment for production...
✓ 3045 modules transformed.
dist/index.html                                   1.11 kB │ gzip:   0.49 kB
dist/assets/HostDetail-Dv47L9lv.css               4.13 kB │ gzip:   1.05 kB
dist/assets/index-BhpWoOWh.css                  120.97 kB │ gzip:  16.96 kB
dist/assets/SettingsHomeRedirect-cVa-5KC0.js      0.29 kB │ gzip:   0.21 kB
dist/assets/tag-Bj89QtK4.js                       0.32 kB │ gzip:   0.25 kB
dist/assets/VolumeDetail-DPyLYsdt.js              9.83 kB │ gzip:   1.82 kB
dist/assets/ContainerDetail-B7RP9s_S.js          10.39 kB │ gzip:   2.08 kB
dist/assets/DiscordSettings-CfTVuSkQ.js          10.84 kB │ gzip:   2.46 kB
dist/assets/AiSettings-CbL4Xp26.js               10.89 kB │ gzip:   2.85 kB
dist/assets/SettingsMetrics-r3HxCoYe.js          11.38 kB │ gzip:   3.00 kB
dist/assets/HostDetail-Dc2lB13A.js               11.43 kB │ gzip:   2.32 kB
dist/assets/EnvironmentSettings-BmgC8SjH.js      12.67 kB │ gzip:   3.73 kB
dist/assets/RuleDetail-CDtHyBg0.js               12.87 kB │ gzip:   3.36 kB
dist/assets/NetworkDetail-BnUQCRZ2.js            12.93 kB │ gzip:   2.23 kB
dist/assets/SettingsHostGroups-O5c5P5_C.js       15.64 kB │ gzip:   3.21 kB
dist/assets/ImageDetail-DjCAUbFs.js              15.91 kB │ gzip:   2.73 kB
dist/assets/HostDetail-DBqzqldx.js               17.26 kB │ gzip:   4.41 kB
dist/assets/RunDetail-Ds3L28zP.js                23.61 kB │ gzip:   6.01 kB
dist/assets/OidcSettings-DIQmh9I-.js             24.25 kB │ gzip:   5.38 kB
dist/assets/PackageDetail-Sq3sb623.js            24.85 kB │ gzip:   5.76 kB
dist/assets/RepositoryDetail-CQ_rO23C.js         27.26 kB │ gzip:   4.79 kB
dist/assets/SettingsServerConfig-CZ4CnnTy.js     32.58 kB │ gzip:   7.33 kB
dist/assets/Billing-BFdOj2MB.js                  32.88 kB │ gzip:   7.95 kB
dist/assets/SettingsAgentConfig-Bn3Qiy8x.js      33.98 kB │ gzip:   7.97 kB
dist/assets/Profile-CXAStQ83.js                  50.14 kB │ gzip:  10.12 kB
dist/assets/Integrations-BwYi59Hh.js             76.28 kB │ gzip:  11.21 kB
dist/assets/HostDetail-BRLVUXO3.js              656.42 kB │ gzip: 156.69 kB
dist/assets/index-BeX9UeuK.js                 2,075.23 kB │ gzip: 562.24 kB

(!) Some chunks are larger than 500 kB after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
✓ built in 21.33s

Copy the generated frontend files into the server’s static directory:

mkdir -p \
  /opt/patchmon/source/server-source-code/cmd/server/static/frontend/dist

cp -a dist/. \
  /opt/patchmon/source/server-source-code/cmd/server/static/frontend/dist/

Build the Go Backend

Navigate to the server source directory:

cd /opt/patchmon/source/server-source-code

The PatchMon backend is written in Go. Compile the server application using the provided Makefile:

make build
Building patchmon-server...

Check whether the server binary was generated:

find /opt/patchmon/source/server-source-code \
  -type f -name 'patchmon-server'
/opt/patchmon/source/server-source-code/patchmon-server

If present, inspect the binary:

ls -lh /opt/patchmon/source/server-source-code/patchmon-server

Configure the PatchMon Backend

The PatchMon backend is configured through environment variables stored in a .env file.

Create the configuration directory and copy the example environment file from the repository:

mkdir -p /opt/patchmon/config
cd /opt/patchmon
cp source/docker/env.example .env
chmod 600 .env

Open the configuration file:

vim /opt/patchmon/.env

Generate Application Secrets

Generate three independent random secrets for the PatchMon application:

openssl rand -hex 64
openssl rand -hex 64
openssl rand -hex 64

Generate three independent random secrets for the PatchMon application:

openssl rand -hex 64
openssl rand -hex 64
openssl rand -hex 64

Copy each generated value into the corresponding variable in the .env file. Store these secrets securely and do not reuse the PostgreSQL password.

Store these secrets securely and do not reuse the PostgreSQL password.Configure Database and Cache Access

The PostgreSQL and Valkey services are running locally inside the LXC container.

Since this is a native installation, the application must connect directly to these services using localhost instead of Docker container names.

Configure the following environment variables in /opt/patchmon/.env:

# ==============================================================================
# SERVER
# ==============================================================================
# CORS_ORIGIN must match your frontend URL. Comma-separated for multiple origins.
# Example: 
#CORS_ORIGIN=https://patchmon.domain.tld,http://patchmon.local:3000

CORS_ORIGIN=http://localhost:3000,http://patchmon:3000,http://patchmon01.examplecorp.io,https://patchmon01.examplecorp.io,http://patchmon.examplecorp.io,https://examplecorp.io
JWT_SECRET=YOUR_GENERATED_SECRET

# ==============================================================================
# DATABASE (Postgresql)
# ==============================================================================
# It's optional to change the patchmon_user and patchmon_db
# POSTGRES_HOST is "database" because that's the name of the docker container.
# If you are using an external DB or localhost then you may change this accordingly

POSTGRES_HOST=localhost
POSTGRES_PASSWORD=56333e137df3d23fa1dabd16625cc957a13020a812a3ee32
POSTGRES_USER=patchmon_user
POSTGRES_DB=patchmon_db
DATABASE_URL=postgresql://patchmon_user:56333e137df3d23fa1dabd16625cc957a13020a812a3ee32@localhost:5432/patchmon_db?sslmode=disable

# ==============================================================================
# REDIS
# ==============================================================================
## REDIS_HOST is "redis" because that's the name of the docker container.
# If you are using an external redis server then you may change this accordingly

REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=
REDIS_DB=0

# ==============================================================================
# SESSION ENCRYPTION SECRETS
# ==============================================================================
# Used in various encryptions (keep these safe)

SESSION_SECRET=YOUR_GENERATED_SECRET
AI_ENCRYPTION_KEY=YOUR_GENERATED_SECRET

Replace all placeholders with the actual values generated or configured during installation.

Make sure that the environment variable names match the requirements of your checked-out PatchMon version.

Configure the Backend

The PatchMon backend uses the environment variables defined in the .env file to configure database access, caching, authentication and application settings.

Before proceeding, make sure that all required values are configured correctly and that PostgreSQL and Valkey are running.

The backend is now ready for database initialization.

Initialize the Database

Initialize the PatchMon database schema using the migration mechanism provided by the application.

Make sure that all database migrations complete successfully before starting the PatchMon backend.

A successful database initialization is required for the application to operate correctly.

Create a Dedicated Service User

For security reasons, PatchMon runs under a dedicated Linux system account instead of using the root user.

Create a system user without interactive login access and assign ownership of the application directory:

useradd --system \
  --home-dir /opt/patchmon \
  --shell /sbin/nologin \
  patchmon

Assign ownership of the application files and runtime directories as required:

chown -R patchmon:patchmon /opt/patchmon

Configure the systemd Service

Create a native systemd service to run the PatchMon backend automatically in the background.

The service runs under the dedicated patchmon system user, loads its configuration from the .env file and automatically restarts if the application exits unexpectedly.

nano /etc/systemd/system/patchmon.service
[Unit]
Description=PatchMon Server
After=network.target postgresql-17.service valkey.service
Wants=postgresql-17.service valkey.service

[Service]
Type=simple
User=patchmon
Group=patchmon
WorkingDirectory=/opt/patchmon/source/server-source-code
EnvironmentFile=/opt/patchmon/.env
ExecStart=/opt/patchmon/source/server-source-code/patchmon-server
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target

The service definition must use the actual backend executable, its required working directory and the environment configuration.

After creating the service:

systemctl daemon-reload
systemctl enable --now patchmon
Created symlink '/etc/systemd/system/multi-user.target.wants/patchmon.service' → '/etc/systemd/system/patchmon.service'.

Verify its status:

systemctl status patchmon

Inspect application logs:

journalctl -u patchmon -f

Install Nginx

Nginx is used as a reverse proxy to provide secure external access to the PatchMon web interface.

Install Nginx using the AlmaLinux 10 package repositories and enable the service:

dnf install -y nginx

Enable and start the service:

systemctl enable --now nginx

Verify the service:

systemctl status nginx

Configure Nginx as a Reverse Proxy

Nginx will act as a reverse proxy in front of the PatchMon application.

The application itself continues listening on port 3000. Nginx accepts incoming HTTP requests on port 80 and forwards them to the local PatchMon backend.

Create a new Nginx configuration file:

nano /etc/nginx/conf.d/patchmon.conf

Add the following configuration:

server {
    listen 80;
    server_name patchmon.examplecorp.io;
    return 301 https://$server_name$request_uri;
    access_log /var/log/nginx/patchmon_access.log;
    error_log /var/log/nginx/patchmon_error.log;
}
server {
    listen 443 ssl;
    server_name patchmon.examplecorp.io;
    index index.html index.htm index.php;
    access_log /var/log/nginx/patchmon_access.log;
    error_log /var/log/nginx/patchmon_error.log;
    ssl_certificate /etc/nginx/conf.d/patchmon01.examplecorp.io.crt;
    ssl_certificate_key /etc/nginx/conf.d/patchmon01.examplecorp.io.key;

    # Allow larger compliance scan uploads
    client_max_body_size 40m;

    location / {
        proxy_pass http://127.0.0.1:3000;

        proxy_http_version 1.1;

        # WebSocket Support
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";

        # Proxy Headers
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;

        # Timeouts
        proxy_connect_timeout 60s;
        proxy_send_timeout 3600s;
        proxy_read_timeout 3600s;
    }
}

Replace patchmon.example.com with the actual hostname used to access your PatchMon installation.

Configure the Allowed Application URLs

PatchMon validates incoming requests against the origins configured in the CORS_ORIGIN environment variable.

For this native installation, configure the HTTPS hostname used to access PatchMon through the Nginx reverse proxy.

Edit the environment configuration:

nano /opt/patchmon/.env

Set the allowed origin:

CORS_ORIGIN=https://YOUR_PATCHMON_HOSTNAME

Replace YOUR_PATCHMON_HOSTNAME with the actual hostname used to access your PatchMon installation.

Save the file and restart the PatchMon service to apply the changes:

systemctl restart patchmon

Validate and Start Nginx

Check the Nginx configuration for syntax errors:

nginx -t

Expected output:

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

If the configuration test is successful, enable and reload Nginx:

systemctl enable nginx
systemctl reload nginx

Verify that Nginx is running:

systemctl status nginx

Verify the PatchMon Backend

Before testing the reverse proxy, verify that PatchMon is responding directly on its internal application port.

Run:

curl -I http://localhost:3000

Expected response:

HTTP/1.1 200 OK
Accept-Ranges: bytes
Access-Control-Allow-Headers: Content-Type, Authorization, X-API-ID, X-API-KEY, X-Device-ID
Access-Control-Allow-Methods: GET, POST, PUT, PATCH, DELETE, OPTIONS
Cache-Control: no-cache, no-store, must-revalidate
Content-Type: text/html; charset=utf-8

An HTTP 200 OK response confirms that the PatchMon backend is running and successfully serving its web interface.

Verify the Nginx Reverse Proxy

Now test the application through the Nginx reverse proxy:

curl -I https://patchmon.examplecorp.io

Expected response:

HTTP/2 200
server: nginx
content-type: text/html; charset=utf-8

A successful HTTP 200 response confirms that Nginx is forwarding requests to the PatchMon application.

Open the configured hostname in a web browser to access the PatchMon interface:

https://patchmon.examplecorp.io

The configured hostname must match the URL used in the browser, including the protocol.

Build the Agent

In a native installation, the PatchMon agent must be compiled manually and deployed to the server’s agent directory so that it can be distributed to monitored hosts.

git config --global --add safe.directory /opt/patchmon/source
cd /opt/patchmon/source/agent-source-code

Install dependencies and build the agent:

VERSION=$(git -C /opt/patchmon/source describe --tags --abbrev=0 | sed 's/^v//')

echo "Building PatchMon Agent version: $VERSION"

make clean
make deps
make build VERSION="$VERSION"

The compiled binary should be available at:

build/patchmon-agent

Deploy the Agent Binary

Create the agent directory inside the PatchMon server working directory:

mkdir -p /opt/patchmon/source/server-source-code/agents

Copy the compiled binary into the directory using the expected filename:

install -m 755 build/patchmon-agent \
/opt/patchmon/source/server-source-code/agents/patchmon-agent-linux-amd64

Verify the file:

ls -lh /opt/patchmon/source/server-source-code/agents/

Restart the PatchMon Server

Restart the backend to apply the changes:

systemctl restart patchmon

Install the Agent on the First Host

Open the PatchMon web interface and navigate to Hosts → Add Host.

Generate a new Linux installation command and execute it as root on the PatchMon server itself.

Make sure the configured server URL uses HTTPS:

https://YOUR_PATCHMON_HOSTNAME

The installer should now be able to download and install the agent binary successfully.

Verify the Installation

Check the agent service:

systemctl status patchmon-agent

Check the agent logs:

journalctl -u patchmon-agent -n 30 --no-pager

Once the agent successfully connects, the PatchMon server should appear as an active host in the web interface.

Add the PatchMon Server as the First Host

It makes sense to monitor the PatchMon server itself before adding other Linux systems.

Create a New Host

  1. Open the PatchMon web interface:
    https://patchmon.exampleorg.io
  2. Navigate to Hosts.
  3. Click Add Host.
  4. Enter patchmon01 as the hostname.
  5. Select Linux as the operating system.
  6. Generate the agent installation command.

Install the Agent

Connect to the PatchMon server via SSH and execute the installation command generated by the web interface as root.

The installer automatically downloads and configures the agent.

Verify the Installation

Check whether the agent service is running:

systemctl status patchmon-agent

Check the agent logs if necessary:

journalctl -u patchmon-agent -n 30 --no-pager

Conclusion

Setting up PatchMon Community Edition without Docker was an interesting way to explore the platform and understand how its individual components work together.

The native installation provides a flexible foundation for managing Linux systems in a self-hosted environment. While the setup requires a few additional manual steps, it offers full control over the underlying services and configuration.

If you prefer managing your infrastructure directly at the operating system level, this approach is certainly worth exploring.

Happy patching!