Lightweight Container Monitoring: Setting up Beszel on Podman

Published: (March 2, 2026 at 05:10 AM EST)
4 min read
Source: Dev.to

Source: Dev.to

Beszel – Lightweight Monitoring for Podman Containers

Below is a step‑by‑step guide for deploying Beszel Hub and Beszel Agent (both local and remote) using Podman quadlet files. All commands are shown as they would appear on a Raspberry Pi (or any Linux host).

1. Beszel Hub Deployment

Create the required directories

mkdir -p /home/solifugo/pods/beszel/beszel_data
mkdir -p /home/solifugo/pods/beszel/beszel_socket

Quadlet file for the hub

~/.config/containers/systemd/beszel_hub.container

[Unit]
Description=beszel hub

[Container]
Image=docker.io/henrygd/beszel
ContainerName=beszel_hub
AutoUpdate=registry
Volume=/home/solifugo/pods/beszel/beszel_data:/beszel_data
Volume=/home/solifugo/pods/beszel/beszel_socket:/beszel_socket
PublishPort=8090:8090

[Service]
Restart=unless-stopped

[Install]
WantedBy=multi-user.target default.target

Start the hub

systemctl --user daemon-reload
systemctl --user start beszel_hub.service

Verify it’s running:

podman ps
# Example output
# CONTAINER ID  IMAGE                     COMMAND               CREATED          STATUS          PORTS                     NAMES
# 641ede03f72a  docker.io/henrygd/beszel  serve --http=0.0...  3 minutes ago    Up 3 minutes    0.0.0.0:8090->8090/tcp   beszel_hub

Next step: Open http://:8090 in a browser, create the admin user, and note the Public Key and Token shown on the hub UI.

When adding the local system in the hub UI, use:

  • Name: Your system name
  • Host / IP: /beszel_socket/beszel.sock

2. Beszel Agent Deployment – Local

Create the data directory

mkdir -p /home/solifugo/pods/beszel/beszel_agent_data

Quadlet file for the local agent

~/.config/containers/systemd/beszel_agent.container

[Unit]
Description=beszel agent

[Container]
Image=docker.io/henrygd/beszel-agent:latest
ContainerName=beszel_agent
AutoUpdate=registry
User=1001                         # UID that owns the podman socket
Volume=/run/user/1001/podman/podman.sock:/run/user/1001/podman/podman.sock:ro
Volume=/home/solifugo/pods/beszel/beszel_agent_data:/var/lib/beszel-agent
Volume=/home/solifugo/pods/beszel/beszel_socket:/beszel_socket
Environment=KEY="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOgfG4iXqHmqcYT/LhNQvgNCRA0HIIxEHjnk79rg+ypF" \
            HUB_URL="http://localhost:8090" \
            TOKEN="5f2b-126b3d08f8-a8dd-e796537cf8" \
            LISTEN=/beszel_socket/beszel.sock
Network=host

[Service]
Restart=unless-stopped

[Install]
WantedBy=multi-user.target default.target

Start the local agent

systemctl --user daemon-reload
systemctl --user start beszel_agent.service

Check that it’s up:

podman ps
# Example output (last line is the agent)
# 5dd1a629b6bb  docker.io/henrygd/beszel-agent:latest  ...  Up 16 seconds  beszel_agent

Now go back to the hub UI → Add system → you should see the newly registered local system.

3. Beszel Agent Deployment – Remote

If the agent runs on a different host, you only need to point the hub to the host’s IP/port (instead of a Unix socket).

One‑liner podman run for a remote agent

podman run -d --name beszel-agent \
  --user 1000 \
  --network host \
  --restart unless-stopped \
  -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro \
  -e KEY="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOgfG4iXqHmqcYT/LhNQvgNCRA0HIIxEHjnk79rg+ypF" \
  -e HUB_URL="http://192.168.0.130:8090" \
  -e TOKEN="5be-0f813ae513-27d9-83664c253c" \
  -e LISTEN=45876 \
  docker.io/henrygd/beszel-agent:latest

Replace 192.168.0.130 with the IP address of your hub.

After the container starts, add the remote system in the hub UI using the host’s IP and the port you supplied (LISTEN=45876).

4. Additional Details

Ensure the Podman socket is active

systemctl --user enable podman.socket
systemctl --user start podman.socket
systemctl --user status podman.socket

You should see something like:

● podman.socket - Podman API Socket
   Loaded: loaded (/usr/lib/systemd/user/podman.socket; enabled; preset: enabled)
   Active: active (listening) since ...
   Listen: /run/user/1001/podman/podman.sock (Stream)

Common issue on Raspberry Pi

When monitoring a container (e.g., systemd-wordpress) you may encounter:

Error getting container stats err="systemd-wordpress - bad memory stats - see https://github.com/henrygd/beszel/"

This is a known limitation on some ARM kernels. Check the linked issue for work‑arounds or updates.

TL;DR Quick Commands

# Hub
mkdir -p ~/pods/beszel/beszel_data ~/pods/beszel/beszel_socket
# (create beszel_hub.container as shown above)
systemctl --user daemon-reload && systemctl --user start beszel_hub.service

# Local Agent
mkdir -p ~/pods/beszel/beszel_agent_data
# (create beszel_agent.container as shown above)
systemctl --user daemon-reload && systemctl --user start beszel_agent.service

# Remote Agent (example)
podman run -d --name beszel-agent \
  --user 1000 --network host --restart unless-stopped \
  -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro \
  -e KEY="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOgfG4iXqHmqcYT/LhNQvgNCRA0HIIxEHjnk79rg+ypF" \
  -e HUB_URL="http://:8090" \
  -e TOKEN="" -e LISTEN=45876 \
  docker.io/henrygd/beszel-agent:latest

You now have a fully functional Beszel monitoring stack for Podman containers—both locally and on remote hosts. Happy monitoring!

Issue

issues/144
Error getting container stats err="mariadb - bad memory stats - see https://github.com/henrygd/beszel/issues/144"

Solution

Add the required components to /boot/cmdline.txt as described in the guide below:

Updated cmdline.txt

[|=| raspi in ~ ]$ sudo cat /boot/cmdline.txt
console=tty1 root=PARTUUID=dc0d2f94-02 rootfstype=ext4 fsck.repair=yes rootwait cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1
[|=| raspi in ~ ]$

Running Podman on Crostini (Chromebook Linux Subsystem)

If you need to run Podman inside Crostini (or Chrome OS Flex), see the following resource for setup instructions and troubleshooting steps:

  • Setup Podman on Chrome OS Flex and CrostiniSetup Podman on Chrome OS Flex and Crostini.md (you may need to execute the additional troubleshooting commands provided in the document).
0 views
Back to Blog

Related posts

Read more »

Google Gemini Writing Challenge

What I Built - Where Gemini fit in - Used Gemini’s multimodal capabilities to let users upload screenshots of notes, diagrams, or code snippets. - Gemini gener...