Docker

What it is: A platform for running applications in containers: isolated processes started from prebuilt images. In a homelab it's the standard way to run services like Node-RED, Home Assistant or an MQTT broker without installing them into the system.1 Current versions are Docker Engine 29.8.2 and Compose 5.6.0 (09โ€“10/2026).1

Core concepts

Docker architecture
Client, daemon, registry, containers, networks and volumes. Own diagram (Synthesis) based on Docker docs1.

Compose in practice

Synthesis based on Docker docs1 and2: Node-RED and an MQTT broker on one user-defined network, data in volumes, the Node-RED port on the LAN only.

services:
  node-red:
    image: nodered/node-red:5.0.7      # pinned version instead of latest
    restart: unless-stopped
    ports:
      - "1880:1880"                    # 127.0.0.1:1880:1880 = host only
    volumes:
      - node_red_data:/data
  mosquitto:
    image: eclipse-mosquitto:2         # Mosquitto 2.x
    restart: unless-stopped
    volumes:
      - mosquitto_data:/mosquitto/data
volumes:
  node_red_data:
  mosquitto_data:

Restart policy

Value Behaviour
no no restart (default)
on-failure[:n] only on error (non-zero exit code), optionally max. n attempts
always always. A manually stopped one comes back only after a daemon restart
unless-stopped like always, but a manually stopped one stays off even after a daemon restart

The policy only applies after a successful start (container up for at least 10 s).1 Umbrel uses on-failure for its apps.3

Data and backups

docker run --rm --volumes-from mynodered -v $(pwd):/backup ubuntu tar cvf /backup/backup.tar /data

Networking and ports

Logs

The default json-file driver does not rotate logs and can fill the disk. local is recommended1:

{ "log-driver": "local" }

It goes into /etc/docker/daemon.json. After restarting Docker it applies to newly created containers; existing ones don't pick up the new setting automatically.1

Security

Gotchas

Related

Sources

  1. Docker Docs (Engine, Compose) + releases โ†— โ€” official Docker documentation (Engine 29.8.2, Compose 5.6.0).
  2. Node-RED Documentation + release notes โ†— โ€” Node-RED in Docker.
  3. umbrelOS / Umbrel Home (README, app store, product page) โ†— โ€” how umbrelOS uses Docker.
  4. PostgreSQL: official Docker image + docs 17 (backups, upgrades) โ†—
  5. Mosquitto: mqtt(7) and mosquitto.conf(5) โ†—