Skip to main content

mii Lite on Linux

mii Lite on Linux runs as the systemd service makeintelligent. It uses your distribution's PostgreSQL 16 server binaries but a private cluster on 127.0.0.1:5433. It never touches a distribution cluster.

Before you start​

  • Linux amd64 with glibc 2.36 or newer (Debian 12 baseline).
  • 4 cores, 8 GB RAM, 40 GB free disk.
  • PostgreSQL 16 server binaries in /usr/lib/postgresql/16/bin, /usr/lib/postgresql/17/bin or /usr/pgsql-16/bin. The .deb pulls them in. The offline package bundles them.
  • root access.

Install​

sudo apt install ./mii-lite_<version>_amd64.deb

The package name is mii-lite. It depends on postgresql-16, libssl3 (or libssl3t64), libxml2 and ca-certificates. Its post-install step runs /opt/makeintelligent/mii install. Its pre-remove step runs mii uninstall.

On Ubuntu 22.04 or Debian 12, add the PostgreSQL PGDG apt repository first, or use the offline package.

Then read the login:

sudo cat /var/lib/makeintelligent/FIRST-LOGIN.txt

Open http://<server>:8080.

What install does​

ActionDetail
System userCreates mii (no login, home is the data folder)
Folders/opt/makeintelligent and /var/lib/makeintelligent, mode 0750, owner mii
Service unit/etc/systemd/system/makeintelligent.service with Restart=on-failure, RestartSec=60, LimitNOFILE=65536, KillMode=mixed, TimeoutStopSec=90, NoNewPrivileges=true, ExecStart=/opt/makeintelligent/mii service-run
Startsystemctl enable --now makeintelligent
FirewallOpens 8080/tcp through ufw or firewalld if active; otherwise prints a hint. Ports 1883 and 5433 are not opened.

mii uninstall does not remove firewall rules. --purge deletes the data folder.

Folders​

PathContent
/opt/makeintelligent/Program and versioned payload
/var/lib/makeintelligent/config/mii.envSettings
/var/lib/makeintelligent/secrets/Generated secrets (0700 and 0600)
/var/lib/makeintelligent/data/pg, buffer, ot, stream
/var/lib/makeintelligent/logs/mii.log, per-component logs, health.jsonl
/var/lib/makeintelligent/backups/Backups

Commands​

CommandWhat it does
sudo /opt/makeintelligent/mii statusService state and health
sudo /opt/makeintelligent/mii healthCounters per component
sudo /opt/makeintelligent/mii backup [--out file]Full backup
sudo /opt/makeintelligent/mii restore <file>Restore (service stopped)
sudo /opt/makeintelligent/mii rollbackReturn to the previous version
sudo /opt/makeintelligent/mii uninstall [--purge]Remove the service
mii runForeground mode. It refuses root unless MI_LITE_ALLOW_ROOT=1.

Logs: journalctl -u makeintelligent and the files in logs/.

Open read-only data access​

Edit /var/lib/makeintelligent/config/mii.env:

MI_LITE_MQTT_PUBLIC_LISTEN=0.0.0.0:1883
MI_LITE_PG_PUBLIC=on

Restart with sudo systemctl restart makeintelligent, open the ports in your firewall, and read the logins in /var/lib/makeintelligent/DATA-ACCESS.txt. See Lite on Docker.

Upgrade​

Install the new package over the old one (sudo apt install ./mii-lite_<new>_amd64.deb or sudo ./mii install from the new tarball). Data is kept, migrations run at start, and mii makes an automatic pre-upgrade backup. Run mii rollback if the upgrade fails.

Troubleshooting​

SymptomCauseFix
Install says PostgreSQL not foundServer binaries missingInstall postgresql-16, or use the offline package.
GLIBC_2.36 not foundDistribution too oldUse Debian 12 or newer, or the offline package.
Console not reachable from another PCFirewallOpen 8080/tcp.
Service restarts every minutePort collision or an invalid mii.env valueRead logs/mii.log and journalctl -u makeintelligent.