Skip to main content

mii Lite on Docker

The mii-lite image holds everything: Console, PostgreSQL 16, the historian, one built-in Site Runtime and an MQTT broker. All state lives in one volume mounted at /data.

Requirements​

  • A Linux x86-64 server with Docker that can reach your PLCs.
  • 4 cores, 8 GB RAM, 40 GB free disk.

The image is based on Debian bookworm-slim and runs as the non-root user mii (uid 10001). It exposes ports 8080, 1883 and 5433.

Run​

docker run -d --name mii --restart unless-stopped --network host \
-v mii-data:/data localhost/makeintelligent/mii-lite:4.0.1

If you received the image as a file, load it first. The load puts it under a local name:

docker load -i mii-lite-4.0.1-docker-amd64.tar.gz
docker run -d --name mii --restart unless-stopped --network host \
-v mii-data:/data localhost/makeintelligent/mii-lite:4.0.1

For a serial device, add --device /dev/ttyUSB0.

Read the logins and open the Console at http://<server>:8080:

docker exec mii cat /data/FIRST-LOGIN.txt
docker exec mii cat /data/DATA-ACCESS.txt

Health​

The image has a health check that calls http://127.0.0.1:8080/api/v2/health every 15 seconds (start period 60 seconds, 10 retries). It covers the Console only.

docker ps
docker logs mii

Public read-only data access​

Lite can let your own applications read data without the Console API. Both accesses are read-only.

MQTT (live values)PostgreSQL (history)
SettingMI_LITE_MQTT_PUBLIC_LISTENMI_LITE_PG_PUBLIC
Docker image default0.0.0.0:1883on
Linux and Windows defaultoffoff
Port1883MI_LITE_PG_PORT (5433)
Loginuser mii-readerrole mii_reader, database makeitintelligent
Contenttopics mii/uns/#schema mii_data

To close an access in Docker, set it to off:

docker run -d --name mii --restart unless-stopped --network host \
-e MI_LITE_MQTT_PUBLIC_LISTEN=off -e MI_LITE_PG_PUBLIC=off \
-v mii-data:/data localhost/makeintelligent/mii-lite:4.0.1

A value of off, 0, false, no or an empty value closes the MQTT listener. A public port that collides with a Lite port stops the start. On Windows and Linux set the same keys in mii.env.

MQTT​

  • Broker mqtt://<host>:1883, user mii-reader, password from DATA-ACCESS.txt.
  • Topic pattern: mii/uns/<enterprise>/<site>/<area>/<work center>[/<work unit>]/<equipment>/<tag>.
  • Payload:
    {"value":12.4,"quality":"good","ts":"2026-12-02T10:15:00.123Z","tagId":"..."}

Example with a client from the Mosquitto package:

mosquitto_sub -h <host> -p 1883 -u mii-reader -P '<password>' -t 'mii/uns/#' -v

PostgreSQL​

ViewColumns
mii_data.samplests, path, tag_id, value, value_text, quality
mii_data.latestLast value of every path
mii_data.tagstag_id, path, enterprise, site, area, work_center, work_unit, equipment, tag
mii_data.alarmsts, path, tag_id, kind, event, from_state, to_state, priority, value, value_text, message
SELECT ts, value
FROM mii_data.samples
WHERE path = 'DEMOFOODS/IZMIR/BOTTLING/LINE1/FILLER/Speed'
AND ts > now() - interval '1 hour'
ORDER BY ts;

Limits: read-only, 60 seconds per statement, 10 connections.

DATA-ACCESS.txt​

<data>/DATA-ACCESS.txt (/data/DATA-ACCESS.txt in Docker) holds the MQTT and PostgreSQL logins, URLs and example SQL. It is a restricted file. mii writes it only while at least one outside access is open and removes it when both are closed. With an external MI_LITE_PG_URL, PostgreSQL access is reported closed.

Network exposure

Opening 1883 and 5433 makes plant data readable from the network. Restrict them with your firewall to the hosts that need them.

Back up and upgrade​

docker exec mii /opt/makeintelligent/mii backup
docker stop mii && docker rm mii
docker run -d --name mii --restart unless-stopped --network host \
-v mii-data:/data makeintelligent/mii-lite:<new version>

Keep the mii-data volume when you recreate the container. Migrations run at start and a pre-upgrade backup is made automatically. Backups are written to /data/backups.

Troubleshooting​

SymptomCauseFix
Container is unhealthyConsole not up yet or crashedWait 60 seconds; read docker logs mii.
PLC not reachableBridge networkUse --network host on Linux.
Cannot connect on 1883 or 5433Setting off, or port not publishedSet the key on, publish the port, check DATA-ACCESS.txt exists.
Start fails with a port errorPublic port equals a Lite portPick another port.
Data gone after recreatingNo volumeAlways mount -v mii-data:/data.