What is Beszel and when does it fit?
Beszel is a small monitoring system with two parts. The hub is a web app built on PocketBase that stores history, draws charts and sends alerts. The agent is a single binary or container on every server that reads system and Docker statistics and hands them to the hub. Both use little memory, so Beszel fits well when you run a few VPS instances and want one tidy overview without the setup work of Prometheus plus Grafana.
It does not try to be a full observability platform: there are no custom queries or log search. Combine it with the provider side Usage graphs tab for transfer and an outside checker such as Uptime Kuma for reachability.
What do I need before starting?
Use Ubuntu 24.04 or 22.04, or Debian 12 or 13, on the server that will host the hub, with Docker Engine and the Compose plugin. The Docker image includes both, or follow the Docker Engine tutorial. Prepare a DNS name such as beszel.example.net pointing at the hub server.
docker --version
docker compose version
dig +short beszel.example.netThe last command should return your server address, for example 198.51.100.24.
How do I run the hub with Docker Compose?
Create a folder with a compose file. This version runs the hub and a local agent side by side, connected through a Unix socket so the agent does not need any network port:
sudo mkdir -p /opt/beszel
cd /opt/beszel
sudo nano compose.yamlservices:
beszel:
image: henrygd/beszel:latest
container_name: beszel
restart: unless-stopped
ports:
- "127.0.0.1:8090:8090"
volumes:
- ./beszel_data:/beszel_data
- ./beszel_socket:/beszel_socket
beszel-agent:
image: henrygd/beszel-agent:latest
container_name: beszel-agent
restart: unless-stopped
network_mode: host
volumes:
- ./beszel_socket:/beszel_socket
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
LISTEN: /beszel_socket/beszel.sock
KEY: "PASTE_PUBLIC_KEY_FROM_HUB"Start only the hub for now, because the agent needs a key that the hub generates:
sudo docker compose up -d beszel
curl -sI http://127.0.0.1:8090 | head -n 1Publishing the port on 127.0.0.1 keeps Docker from exposing it to the internet, which a bare 8090:8090 mapping would do regardless of UFW.
How do I publish the hub over HTTPS?
Add a Caddy site as shown in Caddy HTTPS and open the web ports:
beszel.example.net {
reverse_proxy 127.0.0.1:8090
}sudo systemctl reload caddy
sudo ufw allow 80/tcp
sudo ufw allow 443/tcpVisit https://beszel.example.net straight away and create the first user, which becomes the administrator. Use a long password. The underlying PocketBase admin area is at /_/; it uses the same account. If you prefer not to publish anything, skip Caddy and use ssh -N -L 8090:127.0.0.1:8090 deploy@198.51.100.24.
How do I connect the local agent?
In the hub, click Add System. The dialog shows the hub public key and a ready made compose snippet or install command for your hub version; recent releases may also show a token and hub URL. Copy the key (and any other values it shows) into the environment block of your compose file, then start the agent:
sudo docker compose up -d beszel-agent
sudo docker compose logs --tail 20 beszel-agentBack in the dialog, name the system and enter /beszel_socket/beszel.sock as the host. Within a minute the system turns green and charts start filling in. Container stats appear because the agent can read the Docker socket; it is mounted read-only.
How do I add a remote server safely?
Remote servers talk to the hub across public IPs, since there is no private network between our instances. The hub contacts each agent over an SSH based protocol authenticated with the hub key, so the data stream is encrypted, but the agent port should still be reachable only from the hub. On the remote server, run the binary install command from the Add System dialog (it sets up a beszel-agent systemd service with your key), or use the agent container with network_mode: host and LISTEN: 45876. Then lock the port to the hub address (here 203.0.113.10):
sudo ss -tlnp | grep 45876
sudo ufw allow from 203.0.113.10 to any port 45876 proto tcp
sudo ufw status numberedAdd the system in the hub with the remote IP, for example 198.51.100.40, and port 45876. Where your hub version supports agents connecting outward to the hub URL with a token, the remote side needs no inbound port at all; follow the dialog and keep the hub on HTTPS. More firewall patterns are in UFW firewall.
How do I set alerts?
Open a system, click the bell icon and choose thresholds for CPU, memory, disk, bandwidth, temperature or a status change, each with a duration so short spikes do not page you. Notification targets are set in Settings, Notifications: Beszel supports many chat and push services through URL style addresses (Telegram, Discord, Slack, ntfy, Gotify, generic webhooks), plus email. For email, configure SMTP in the PocketBase settings with an authenticated relay on port 587, and open a support ticket before relying on outgoing port 25. Send a test from the settings page to confirm delivery.
How do I update, back up and troubleshoot?
cd /opt/beszel
sudo docker compose pull
sudo docker compose up -d
sudo tar czf /root/beszel-$(date +%F).tar.gz beszel_dataBinary agents installed by the script can update themselves with sudo /opt/beszel-agent/beszel-agent update (the path may differ by install method; systemctl cat beszel-agent shows it).
- System stays red: the key in the agent does not match the hub, or the firewall drops port 45876 from the hub IP.
- No container charts: the Docker socket is not mounted into the agent container.
- Hub page loads but shows errors: look at
docker compose logs beszel; a full disk is a frequent cause. - Wrong disk shown: the agent picks the root filesystem by default; extra filesystems are added with the
EXTRA_FILESYSTEMSvariable.
Plans that fit this guide
Base city prices. Every plan includes a dedicated IPv4 address, IPv6, full root and all 18 images.
Questions about Beszel lightweight monitoring
How heavy is Beszel?
Both hub and agent are small Go programs; they run comfortably on the smallest plans next to other services.
Can the agent run without Docker?
Yes. The Add System dialog offers a binary install that creates a systemd service, which suits servers without Docker.
Which port does the agent use?
TCP 45876 by default. Allow it only from the hub address, or use a Unix socket when hub and agent share a machine.
Does Beszel replace the console graphs?
No, they work together. The Usage graphs tab shows the provider view and monthly transfer, Beszel shows per-process and container detail from inside.
How long is history kept?
Beszel keeps several resolutions and thins older data automatically, so the database stays small. Back up beszel_data to keep it.
More in Monitoring and logs
- Netdata real-time monitoring
- Uptime Kuma status page
- Prometheus and node_exporter
- Grafana dashboards
- Zabbix monitoring
- Nagios Core
- Loki and Alloy for central logs
- Cacti graphs with SNMP
- Monit for self-healing services
- btop, htop and other live monitors
- Central logs with rsyslog
- Rotate logs with logrotate
- Read logs with journalctl
- Graylog log management
- Observium network monitoring
- Vector log and metrics pipeline