Next to Glances, Beszel also is a great tool for monitoring your servers. It consists of a hub that you install on your main server and agent clients that need to be installed on the machines you want to monitor.

To start with, install the hub. Create a new folder called beszel-hub on the main server you want to use for monitoring:

mkdir beszel-hub && cd beszel-hub

Create a docker-compose file:

nano docker-compose.yaml

Paste this code into nano:

services:
  beszel:
    image: 'henrygd/beszel'
    container_name: 'beszel'
    restart: unless-stopped
    ports:
      - '8090:8090'
    volumes:
      - ./beszel_data:/beszel_data

Save the file and run the docker container:

sudo docker compose up -d

Open the port for the hub in your firewall:

sudo ufw allow 8090

After the container has started, visit YOUR-SERVER-IP:8090 in your browser.

On the server, you want to monitor, create a new folder called beszel-agent:

mkdir beszel-agent && cd beszel-agent

Create a docker-compose file:

nano docker-compose.yaml

You find the code to copy into the compose file by clicking “+Add System” in the top-right corner of the website and then “Copy docker compose”. It looks like this (however the KEY value will be different for you):

services:
  beszel-agent:
    image: "henrygd/beszel-agent"
    container_name: "beszel-agent"
    restart: unless-stopped
    network_mode: host
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      # monitor other disks / partitions by mounting a folder in /extra-filesystems
      # - /mnt/disk1/.beszel:/extra-filesystems/disk1:ro
    environment:
      PORT: 45876
      KEY: "ssh-ed25519-XXX"
      # FILESYSTEM: /dev/sda1 # override the root partition / device for disk I/O stats

Save the file and run the docker container:

sudo docker compose up -d

Next, it’s important to open the port for the agent on the server to be monitored in case you use a firewall like UFW:

sudo ufw allow 45876

Back on the monitoring website, enter the IP of your server and the name. Then click “Add system”.