Skip to content
github-actions[bot] edited this page Mar 27, 2026 · 1 revision

Docker Deployment

system2mqtt can be run in a Docker container. The Docker image is primarily designed for Proxmox API monitoring — it does not have access to the host's hardware sensors, so bare-metal CPU/memory monitoring is not available in a standard Docker deployment.

Note: The Docker image is available on Docker Hub as optimusgreen/system2mqtt.


Quick Start

1. Create a configuration directory

mkdir -p ~/system2mqtt/data

2. Create your configuration file

Copy the Docker-specific example:

cp docker/s2m.conf ~/system2mqtt/data/s2m.conf

Or create a new one:

cat > ~/system2mqtt/data/s2m.conf << 'EOF'
COMPUTER_NAME=MyPveNode

MQTT_HOST=192.168.1.100
#MQTT_USER=myuser
#MQTT_PASSWORD=mypassword

PVE_SYSTEM=True
PVE_HOST=192.168.1.50
PVE_NODE_NAME=pve
PVE_USER=root@pam
PVE_PASSWORD=mysecretpassword

HA_DISCOVERY=True
EOF

3. Create a docker-compose.yaml

version: "2"
services:
  system2mqtt:
    image: optimusgreen/system2mqtt:latest
    container_name: system2mqtt
    restart: unless-stopped
    volumes:
      - ./data:/config

4. Start the container

docker-compose up -d

5. Check the logs

docker-compose logs -f

Configuration

The container expects your s2m.conf to be placed in the /config volume. The container runs:

python3 /system2mqtt/run.py /config/s2m.conf

Any changes to s2m.conf require a container restart to take effect:

docker-compose restart

Building the Image Locally

If you want to build the image yourself from the included Dockerfile:

cd docker
docker build -t my-system2mqtt .

Then update your docker-compose.yaml to use the local image:

services:
  system2mqtt:
    image: my-system2mqtt
    ...

Docker and Bare-Metal Monitoring

The standard Docker image does not support bare-metal system monitoring because:

  • It cannot access the host's /sys/class/thermal for CPU temperature.
  • It cannot access the host's disks via psutil inside the container.

If you specifically need to monitor the Docker host machine:

  • Run system2mqtt directly on the host instead (see Getting Started).
  • Or, use --privileged mode and mount host filesystems — this is an advanced configuration not officially supported.

Updating

Pull the latest image and recreate the container:

docker-compose pull
docker-compose up -d

Clone this wiki locally