Sign inSign up

petersulyok/smfc

By petersulyok

•Updated 28 days ago

Super Micro fan control for Linux (home) servers.

Image
Monitoring & observability
0

10K+

petersulyok/smfc repository overview

⁠smfc in docker

This page describes the most important docker-specific information for smfc. Please visit the GitHub repository⁠ of smfc for more details or for reporting issues.

⚠️ Runtime configuration changed: the host mount was narrowed from /run:/run:ro to /run/udev:/run/udev:ro (see issue #107⁠). If you are upgrading an existing setup, update the volumes section of your docker run command / compose file accordingly. The old wide /run:/run:ro mount prevents the GPU images from starting under the NVIDIA Container Toolkit (mkdirat run/nvidia-ctk-hook: read-only file system).

⁠Content

There are three images created for smfc:

Image typeTagsBase imageProsCons
Standard6.4.2 / latestAlpine Linux 3.24.1Small image sizeGPU/NPU fan controllers not supported
NVIDIA GPU-enabled6.4.2-nvidia/ latest-nvidiaDebian 13.6 (slim)GPU fan controller supported via nvidia-smiLarger image size; requires NVIDIA Container Toolkit on host
AMD GPU-enabled6.4.2-amd / latest-amdUbuntu 24.04.4 (ROCm 7.8.0)GPU fan controller supported via rocm-smiLarger image size; requires amdgpu kernel driver on host

Docker image tags changed for GPU-enabled images with the newly implemented AMD GPU support in smfc v5.4.0!

⚠️ The NPU fan controller is currently not supported in any of the docker images. npu-smi is part of the Ascend driver installed on the host and is not present in the images, so an enabled [NPU] section stops the container at start-up with ERROR: npu-smi command cannot be found! (exit code 7, runtime dependency error). Run smfc as a systemd service on the host if you need the NPU fan controller.

Generic notes for the docker images:

  1. smfc is executed here as a simple foreground process (not as a systemd service).
  2. ipmitool and smartctl require read-only access to host's /dev/ and /run/udev folders and admin privilege.
  3. The /sys filesystem can be accessed in the container, but the proper kernel module (i.e. coretemp, k10temp, and drivetemp) needs to be loaded on host side. The same applies to the PCI fan controller: the driver of the card (e.g. atlantic) must be loaded on the host, and the card's HWMON files are then visible in the container.
  4. The container can send log messages to the host's journald daemon (as it is configured in Usage chapter), but feel free to configure other logging drivers⁠.
  5. IPMI remote access can be used (see [IPMI] remote_parameters=-U USERNAME -P PASSWORD -H HOST parameter in the configuration file) if IPMI interface is not accessible from docker container.
  6. Networking is enabled again for IPMI remote access.

⁠Standard image

This image contains the following components:

  • Alpine Linux 3.24.1
  • Python 3.14.7-r1
  • ipmitool 1.8.19-r1
  • smartmontools 7.5-r0

⁠Usage #1: docker CLI

The service can be started:

docker run \
    -d \
    --rm \
    --log-driver=journald \
    --privileged=true \
    --name "smfc" \
    -v /dev:/dev:ro \
    -v /run/udev:/run/udev:ro \
    -v /etc/timezone:/etc/timezone:ro \
    -v /etc/localtime:/etc/localtime:ro \
    -v /etc/smfc/smfc.conf:/etc/smfc/smfc.conf:ro \
    -e SMFC_ARGS="-l 3" \
    petersulyok/smfc:latest

(sample script can be found here⁠), and can be terminated:

docker stop smfc

docker-compose requires this file:

services:
  smfc:
    image: petersulyok/smfc:latest
    container_name: smfc
    logging:
        driver: journald
    privileged: true
    environment:
      - SMFC_ARGS=-l 3
    volumes:
      - /dev:/dev:ro
      - /run/udev:/run/udev:ro
      - /etc/smfc/smfc.conf:/etc/smfc/smfc.conf:ro
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    restart: unless-stopped

(sample yaml file can be found here⁠), and docker image can be started/stopped this way:

docker compose up -d
docker compose down

⁠NVIDIA GPU-enabled image

This image contains the following components:

  • Debian Linux 13.6 (slim)
  • Python 3.13.5
  • ipmitool 1.8.19-9
  • smartmontools 7.4-3

⁠How to enable NVIDIA GPU in the docker image?

Install the NVIDIA driver and the NVIDIA Container Toolkit on your host as it is described here⁠. After a successful installation, execute the following commands:

nvidia-ctk runtime configure --runtime=docker
systemctl restart docker

Restart is needed because NVIDIA Container Toolkit modified the /etc/docker/daemon.json file, and added the nvidia runtime parameters.

⁠Usage #1: docker CLI

The service can be started:

docker run \
    -d \
    --rm \
    --runtime=nvidia \
    --gpus all \
    --log-driver=journald \
    --privileged=true \
    --name "smfc" \
    -v /dev:/dev:ro \
    -v /run/udev:/run/udev:ro \
    -v /etc/timezone:/etc/timezone:ro \
    -v /etc/localtime:/etc/localtime:ro \
    -v /etc/smfc/smfc.conf:/etc/smfc/smfc.conf:ro \
    -e SMFC_ARGS="-l 3" \
    petersulyok/smfc:latest-nvidia

(sample script can be found here⁠), and can be terminated:

docker stop smfc

docker-compose requires this file:

services:
  smfc:
    image: petersulyok/smfc:latest-nvidia
    container_name: smfc
    runtime: nvidia
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              capabilities: [gpu]
    logging:
        driver: journald
    privileged: true
    environment:
      - SMFC_ARGS=-l 3
      - NVIDIA_VISIBLE_DEVICES=all
      - NVIDIA_DRIVER_CAPABILITIES=all
    volumes:
      - /dev:/dev:ro
      - /run/udev:/run/udev:ro
      - /etc/smfc/smfc.conf:/etc/smfc/smfc.conf:ro
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    restart: unless-stopped

(sample yaml file can be found here⁠), and docker image can be started/stopped this way:

docker compose -f docker-compose-nvidia.yaml up -d
docker compose -f docker-compose-nvidia.yaml down

⁠AMD GPU-enabled image

This image contains the following components:

  • Ubuntu 24.04.4
  • Python 3.12.3
  • ipmitool 1.8.19
  • smartmontools 7.4
  • rocm-smi 7.8.0 (rocm-smi-lib package from the 7.2.4 repository of the official AMD package repository)

Note: from smfc v6.0.1 this image is built on the standard Ubuntu base image, and only the rocm-smi-lib package is installed from the AMD package repository⁠ instead of using the rocm/dev-ubuntu base image (which contains the complete ROCm SDK). This reduces the image size from 4 GB to 233 MB. The rocm-smi command is installed in /opt/rocm/bin, but it is also linked to /usr/bin/rocm-smi, which is the default value of the [GPU] rocm_smi_path= configuration parameter, so no extra configuration is needed.

⁠How to enable AMD GPU in the docker image?

rocm-smi is installed inside the Docker image — it does not need to be installed on the host. The host only needs the amdgpu kernel driver loaded, which exposes /dev/kfd and /dev/dri. This driver has been part of the Linux kernel since 4.5, so it is already present on most modern systems. You can verify it is loaded with:

lsmod | grep amdgpu

⁠Usage #1: docker CLI

The service can be started:

docker run \
    -d \
    --rm \
    --device /dev/kfd \
    --device /dev/dri \
    --group-add video \
    --group-add render \
    --security-opt seccomp=unconfined \
    --log-driver=journald \
    --privileged=true \
    --name "smfc" \
    -v /dev:/dev:ro \
    -v /run/udev:/run/udev:ro \
    -v /etc/timezone:/etc/timezone:ro \
    -v /etc/localtime:/etc/localtime:ro \
    -v /etc/smfc/smfc.conf:/etc/smfc/smfc.conf:ro \
    -e SMFC_ARGS="-l 3" \
    petersulyok/smfc:latest-amd

(sample script can be found here⁠), and can be terminated:

docker stop smfc

docker-compose requires this file:

services:
  smfc:
    image: petersulyok/smfc:latest-amd
    container_name: smfc
    devices:
      - /dev/kfd
      - /dev/dri
    group_add:
      - video
      - render
    security_opt:
      - seccomp:unconfined
    logging:
        driver: journald
    privileged: true
    environment:
      - SMFC_ARGS=-l 3
    volumes:
      - /dev:/dev:ro
      - /run/udev:/run/udev:ro
      - /etc/smfc/smfc.conf:/etc/smfc/smfc.conf:ro
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    restart: unless-stopped

(sample yaml file can be found here⁠), and docker image can be started/stopped this way:

docker compose -f docker-compose-amd.yaml up -d
docker compose -f docker-compose-amd.yaml down

⁠Parameters for smfc

Use the following parameters to configure smfc:

Parametertypefunction
SMFC_ARGSenvironment variablecommand-line arguments for smfc (only for -o, -l parameters!)
smfc.confvolume (ro)configuration file for smfc, mapped from host side

Stopping the container (docker stop, docker compose down, or a container restart) sends SIGTERM to smfc, which applies the configured [Ipmi] exit_level= (100% by default) to all configured IPMI zones before it exits, so the fans are never left unregulated. Set exit_level=-1 in your configuration file if smfc should not change the fan levels at exit. Note that a docker kill sends SIGKILL, where no in-process handler can run.

⁠smfc-client in docker

All three images contain the smfc-client command (see README chapter 14.⁠), which displays a read-only snapshot of the fan controllers, fan levels, IPMI zones and standby state. The easiest way to use it is executing the command in the running container:

docker exec smfc smfc-client
docker exec smfc smfc-client --verbose

Notes:

  1. If the HTTP exporter is enabled in the configuration file ([Exporter] enabled=1) then smfc-client reads the live snapshot of the running smfc service. Otherwise it falls back to standalone mode and reads the sensors itself (i.e. it executes ipmitool and smartctl again).

  2. The command runs as root in the container, so the --sudo parameter is not needed.

  3. smfc-client can also be started in a separate container with --entrypoint smfc-client. In this case only standalone mode is available (the exporter of the service is not reachable from another container, unless --network container:smfc is specified), and the container needs exactly the same command-line parameters and volumes as the docker run command of the given image (described earlier on this page), because smfc-client reads the very same sensors as the service. In case of remote IPMI access ([Ipmi] remote_parameters=) the --privileged parameter and the /dev volume can be omitted, because ipmitool uses the network instead of the local /dev/ipmi0 device:

    docker run --rm \
        -v /run/udev:/run/udev:ro \
        -v /etc/smfc/smfc.conf:/etc/smfc/smfc.conf:ro \
        --entrypoint smfc-client \
        petersulyok/smfc:latest
    

⁠Versions

See CHANGELOG.md⁠ for more details:

  • 6.4.2 (2026.09.07): Updated to smfc 6.4.2 (Alpine 3.24.1/Debian 13.6 slim/Ubuntu 24.04.4 with rocm-smi 7.8.0)
  • 6.4.0 (2026.09.02): Updated to smfc 6.4.0 (Alpine 3.24.1/Debian 13.6 slim/Ubuntu 24.04.4 with rocm-smi 7.8.0)
  • 6.3.0 (2026.08.30): Updated to smfc 6.3.0 (Alpine 3.24.1/Debian 13.6 slim/Ubuntu 24.04.4 with rocm-smi 7.8.0)
  • 6.2.1 (2026.08.24): Updated to smfc 6.2.1 (Alpine 3.24.1/Debian 13.6 slim/Ubuntu 24.04.4 with rocm-smi 7.8.0)
  • 6.2.0 (2026.08.14): Updated to smfc 6.2.0 (Alpine 3.24.1/Debian 13.6 slim/Ubuntu 24.04.4 with rocm-smi 7.8.0)
  • 6.1.0 (2026.07.31): Updated to smfc 6.1.0 (Alpine 3.24.1/Debian 13.6 slim/Ubuntu 24.04.4 with rocm-smi 7.8.0)
  • 6.0.1 (2026.07.26): Updated to smfc 6.0.1 (Alpine 3.24.1/Debian 13.6 slim/Ubuntu 24.04.4 with rocm-smi 7.2.4) - much smaller images!
  • 6.0.0 (2026.07.09): Updated to smfc 6.0.0 (Alpine 3.24.1/Debian 13 slim/ROCm-ubuntu)
  • 5.4.0 (2026.04.30): Updated to smfc 5.4.0 (Alpine 3.23.4/Debian 13 slim/ROCm-ubuntu) - new tags!!
  • 5.3.0 (2026.04.02): Updated to smfc 5.3.0 (Alpine 3.23.3/Debian 13 slim)
  • 5.2.0 (2026.03.30): Updated to smfc 5.2.0 (Alpine 3.23.3/Debian 13 slim)
  • 5.1.2 (2026.03.28): Updated to smfc 5.1.2 (Alpine 3.23.3/Debian 13 slim)
  • 5.0.0 (2026.03.04): Updated to smfc 5.0.0 (Alpine 3.23.3/Debian 12 slim)
  • 4.2.1 (2025.10.26): Updated to smfc 4.2.1 (Alpine 3.22.2/Debian 12 slim)
  • 4.1.0 (2025.08.28): Updated to smfc 4.1.0 (Alpine 3.22.1/Debian 12 slim)
  • 4.0.0 (2025.07.08): Updated to smfc 4.0.0 (Alpine 3.22/Debian 12 slim) - beta releases deleted
  • 3.8.0 (2025.03.15): Updated to smfc 3.8.0 and (Alpine 3.20.6)
  • 3.7.0 (2025.01.27): Updated to smfc 3.7.0 and (Alpine 3.20.5)
  • 3.6.0 (2024.12.12): Updated to smfc 3.6.0 and (Alpine 3.20.3)
  • 3.5.1 (2024.08.23): Updated to smfc 3.5.1 and (Alpine 3.20)
  • 3.5.0 (2024.03.21): Updated to smfc 3.5.0 and (Alpine 3.19)
  • 3.4.0 (2023.11.28): Documentation updated
  • 3.3.0 (2023.11.19): Initial release

Tag summary

Content type

Image

Digest

sha256:b19c970f3…

Size

22.2 MB

Last updated

28 days ago

docker pull petersulyok/smfc