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
- Host network (PLCs on the LAN)
- Published ports
docker run -d --name mii --restart unless-stopped --network host \
-v mii-data:/data localhost/makeintelligent/mii-lite:4.0.1
docker run -d --name mii --restart unless-stopped \
-p 8080:8080 -p 1883:1883 -p 5433:5433 -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) | |
|---|---|---|
| Setting | MI_LITE_MQTT_PUBLIC_LISTEN | MI_LITE_PG_PUBLIC |
| Docker image default | 0.0.0.0:1883 | on |
| Linux and Windows default | off | off |
| Port | 1883 | MI_LITE_PG_PORT (5433) |
| Login | user mii-reader | role mii_reader, database makeitintelligent |
| Content | topics 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, usermii-reader, password fromDATA-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
| View | Columns |
|---|---|
mii_data.samples | ts, path, tag_id, value, value_text, quality |
mii_data.latest | Last value of every path |
mii_data.tags | tag_id, path, enterprise, site, area, work_center, work_unit, equipment, tag |
mii_data.alarms | ts, 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.
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
| Symptom | Cause | Fix |
|---|---|---|
Container is unhealthy | Console not up yet or crashed | Wait 60 seconds; read docker logs mii. |
| PLC not reachable | Bridge network | Use --network host on Linux. |
| Cannot connect on 1883 or 5433 | Setting off, or port not published | Set the key on, publish the port, check DATA-ACCESS.txt exists. |
| Start fails with a port error | Public port equals a Lite port | Pick another port. |
| Data gone after recreating | No volume | Always mount -v mii-data:/data. |