Beszel Monitoring Service

Beszel Monitoring Service
Beszel Monitor

I am still stuffing about with my server.

I would be a lot further along with this if it was not for Docker version 29, Proxmox VE 9.1, Apparmor and Portainer CE. I think nearly every single one broke in some way after they updated their software.

Anyhow moving on.

Beszel is great although I have a few teething problems to iron out.

Beszel | Simple, lightweight server monitoring
Lightweight server monitoring with historical data, Docker stats, and alerts.
Beszel is a lightweight server monitoring platform that includes Docker statistics, historical data, and alert functions.
It has a friendly web interface, simple configuration, and is ready to use out of the box. It supports automatic backup, multi-user, OAuth authentication, and API access.

Supported metrics

  • CPU usage - Host system and Docker / Podman containers.
  • Memory usage - Host system and containers. Includes swap and ZFS ARC.
  • Disk usage - Host system. Supports multiple partitions and devices.
  • Disk I/O - Host system. Supports multiple partitions and devices.
  • Network usage - Host system and containers.
  • Load average - Host system.
  • Temperature - Host system sensors.
  • GPU usage / power draw - Nvidia, AMD, and Intel.
  • Battery - Host system battery charge.

My system

  • Hypervisor: Proxmox VE 9.1 - clean install
  • Servers: Podman LXC servers based on Debian 13
  • NAS: None at the moment
  • Container Management: Portainer CE and agents
  • Beszel: Server and Agents via Portainer - Proxmox Agent is binary

Installation

The host installation is simple enough as per below although you have to allow for the following:

  • Reverse Proxy configuration.
  • Firewall - ensure you allow the 8090 port or you will drop back to SSH alot
  • If using Podman ensure the networks exist via Podman CLI prior to deployment
  • Configure the Beszel Server as soon as you get it running, by adding your hosts. You can recover the token keys easily enough afterwards to deploy your agents
  • The environment file I have not published. Depending on how you deploy you will need one. Grab the generic from their website and modify accordingly iaw your container system/management method.

The server setup is easy. Note there are differences between Podman and Docker.

 Proxmox LXC Podman Stack File for Beszel Hub
#   This stack deploys the Beszel Hub application for data visualization and management.  
# NOTE (17-11-2025):
#   Podman is running rootful inside a privileged LXC container.
#   Podman networking is configured externally to allow container communication.
#   Ensure that the 'backend-net' network is created in Podman before deploying this stack.
#   Refer to Proxmox/LXC/Podman/README.md for setup instructions.


services:
  beszel:
    # https://beszel.dev/guide/hub-installation
    image: henrygd/beszel
    container_name: beszel
    hostname: beszel
    restart: always
    labels:
      - com.docker.compose.project=beszel
      - com.docker.compose.service=beszel
      - homepage.group=IT Management
      - homepage.name=Beszel
      - homepage.href=http://[FQDN+PORT]
      - dockflare.enable=false
    ports:
      - 8890:8090
    environment:
      - TZ=Australia/Perth
      - BESZEL_PORT=8090
      - BESZEL_HOST=http://[FQDN OF SERVER]
    volumes:
      - beszel-data:/beszel_data:U
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro
    # Insert healthcheck here later
    cap_drop:
      - ALL
    cap_add:
      - SYS_TIME
    security_opt:
      - no-new-privileges:true
    networks:
      - backend-net

volumes:
  beszel-data:

networks:
  backend-net:
    external: true

The agent configuration file via Portainer is here. This is a snippet

ervices:

  beszel-agent:
    # https://beszel.dev/guide/agent-installation
    image: henrygd/beszel-agent:latest
    container_name: beszel-agent
    hostname: beszel-agent
    restart: always
    labels:
      - com.docker.compose.project=basestack
      - com.docker.compose.service=beszel-agent
      - dockflare.enable=false
    environment:
      TZ: ${TZ}
      LISTEN: 45876
      KEY: ${SSH_Key}
      TOKEN: ${SSH_Token}
      HUB_URL: http://[FQDN:PORT]
    volumes:
      # Docker socket - containers
      - /run/podman/podman.sock:/var/run/docker.sock
      # System socket - system
      - /run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket:ro
      - beszel-agent:/var/lib/beszel-agent:U
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro
    cap_add:
      - SYS_TIME
    security_opt:
      - no-new-privileges:true
    networks:
      - backend-net

volumes:
  beszel-agent:

networks:
  bridge:
    external: true
  proxy-net:
    external: true
  backend-net:
    external: true

Reverse Proxy

This is my configuration and so far, I have had no issues. I use NPMPlus with Openappsec.

# Advanced Proxy Configuration for Beszel

# Preserve host and client details
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;

# Pass through authorization and cookies
proxy_set_header Authorization $http_authorization;
proxy_set_header Cookie $http_cookie;

# Ensure HTTP/1.1 for keep-alive and WebSocket upgrades
proxy_http_version 1.1;

# Support WebSocket traffic
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;

The Proxmox Server

This one was slightly more difficult and apparently, I have a problematic M2 disk, in that it does not like the SMART agent software that is installed with Proxmox or actually the Beszel agent.

To install the Beszel agent on the Proxmox server and feed it to Beszel Server on the LXC (yes I know but I don't want this server on my primary hypervisor) I used script method as explained here.

Beszel | Simple, lightweight server monitoring
Lightweight server monitoring with historical data, Docker stats, and alerts.

I used the binary method by copying the Linux command and running it on the Proxmox Server. But this will not give you SMART monitoring to do that you need to run the following commands

# Run this command on the Proxmox server not the LXC.

sudo smartctl --scan

# Copy the information to your notepad
# After the beszel agent is installed on the Proxmox Server do a restart
# Modify the beszel-agent.service as follows changing the M2 as required

[Service]
AmbientCapabilities=CAP_SYS_RAWIO CAP_SYS_ADMIN
CapabilityBoundingSet=CAP_SYS_RAWIO CAP_SYS_ADMIN
DeviceAllow=/dev/sda r
DeviceAllow=/dev/nvme0 r

# Restart the daemon and agent

sudo systemctl daemon-reload
sudo systemctl restart beszel-agent

# Happy hunting.

This should get you going and there are numerous variations on deployment such as via Podman directly, using quadlets (troublesome) using systemd and then of course good old docker compose via docker engine 29.

Quick after thought. I took the liberty of copying the shell script from the installation that gets put in the /tmp directory. It's a nice piece of code that creates update and timer services for the agent. I might at a later date use these to help template other services.

I am not saying this is right, but it works.

#enoughsaid