Skip to main content

Install a Site Runtime

A Site Runtime polls your devices and sends the data to the Console's historian. The built-in runtime of mii Lite and the mi-siterun of the plant stack need no enrollment. A remote runtime on another host enrolls with a one-time token, gets its own certificate and sends data over HTTPS. It needs no inbound port and holds no database password.

Add runtime wizard
Add runtime wizard

Two transports​

TransportPathUsed by
DirectCollector writes the plant historian and talks to the Console with a runtime tokenPlant stack mi-siterun, Lite built-in runtime
IngestCollector sends batches over HTTPS to mi-ingest, which writes the historianRemote runtimes

Console prerequisites for remote runtimes​

  • MI_INGEST_PUBLIC_URL is set on the Console, for example https://ingest.<your domain>. Otherwise the token request fails with 409 "set MI_INGEST_PUBLIC_URL on the Console".
  • MI_MASTER_KEY is set (it seals the runtime certificate authority key).
  • A mi-ingest gateway is running and reachable from the runtime. See mi-ingest.
  • The Console can serve the packages: set MI_RUNTIME_PACKAGES_DIR (served at /downloads/runtime/*) or MI_RUNTIME_DOWNLOAD_URL. Otherwise the wizard shows no download links.
  • The Console needs an ISA-95 Site first. The wizard says "This Console has no ISA-95 Site yet. Create the Site in the Model first." if it is missing.

A second runtime needs the Enterprise feature edge.multi_runtime (error MI-5003, HTTP 402, without it). Lite has one built-in runtime and shows "mii Lite has one built-in runtime inside the mii service. Use the Enterprise stack for more runtimes."

Add a runtime (wizard)​

  1. Open Runtimes and click Add runtime. The wizard has three steps: Details, Install, Connect.

  2. Details. Fill in:

    FieldMeaning
    NameDisplay name
    Runtime idLetter first, then letters, digits, _ or - (up to 64). Fixed after creation. Example: line1-rt.
    ISA-95 SiteThe one Site of this Console
    Where will it run?Windows (service, Windows 10 or Server 2016 or newer), Linux (systemd, .deb or .tar.gz, amd64) or Docker (Docker or Podman)
    Enrollment token valid for1 hour, 24 hours (default), 3 days or 7 days
  3. Click Create runtime.

  4. Install. The one-time token is "Shown only now" and works once. Copy the commands for your platform.

  5. Connect. The wizard waits for the runtime ("Waiting for first contact…") and polls every 3 seconds. It ends with "First report received — the runtime is online". Click Open runtime or Done.

The token has the form mi_enroll_<base64url>. It is stored as a hash, never logged, and works once.

Install and enroll​

Run in PowerShell as Administrator. Download mii-runtime.exe from the link in the wizard first.

.\mii-runtime.exe enroll --url '<console url>' --token '<token>'
.\mii-runtime.exe install
.\mii-runtime.exe start
.\mii-runtime.exe status
Value
ServiceMakeIntelligentRuntime, display name "MakeIntelligent Site Runtime", account NT SERVICE\MakeIntelligentRuntime
Install folderC:\Program Files\MakeIntelligent Runtime
Data folderC:\ProgramData\MakeIntelligentRuntime
Configconfig\runtime.env
RecoveryRestart after 5 s, 10 s, then every 30 s; the count resets after a day
FirewallNo inbound rule

mii-runtime enroll takes --url, --token and --force. --force replaces an existing enrollment and the Console revokes the old certificates as "superseded". install --url <console> --token <token> enrolls first.

Commands: install, enroll, uninstall [--purge [--yes]], start, stop, status, run, health, version. There is no backup, restore or rollback because the runtime has no database: reinstall or re-enroll instead.

status shows the identity, the certificate serial and validity, and the ingest health: state, samples per second, acknowledged per second, lag, outbox batches and size, dropped, rejected and the last error.

Direct runtime

A direct runtime (plant stack, or a Linux container beside the Console) needs only MI_CONSOLE_URL, MI_RUNTIME_ID, MI_RUNTIME_TOKEN and MI_RUNTIME_ADVERTISE_URL (the address the Console uses to reach it, port 8081). A direct runtime that is online cannot be enrolled (409). Create a new runtime for the remote host. The built-in lite runtime cannot be enrolled.

Certificates​

The enrollment gives the runtime an identity in <data>/certs.

FileContent
identity.jsonRuntime id, site id, Console URL, ingest URL, serial, notAfter, enrolledAt
key.pemECDSA P-256 private key. It never leaves the host.
cert.pemCertificate, CN = runtime id
ca.pemPlant runtime CA
server-ca.pemOptional trust root of the gateway
runtime.tokenRuntime token
  • Lifetime: 90 days (MI_RUNTIME_CERT_DAYS on the Console).
  • Renewal: automatic at two thirds of the lifetime (about day 60), with a new key.
  • Revoke: in Runtimes → (runtime) → Certificates, click Revoke. The gateway drops the certificate within 5 seconds (MI_INGEST_REVOCATION_POLL). The runtime keeps buffering. Deleting a runtime revokes its certificates.
  • New certificate: use Rotate certificate or New enrollment token ("New certificate for the runtime name").
  • If the gateway certificate is not from a public CA, set MI_INGEST_SERVER_CA_FILE on the Console, or MI_INGEST_SERVER_CA on the runtime.

Enrolling rotates the runtime token and sets the transport to ingest.

Store-and-forward outbox​

A remote runtime keeps a disk outbox when the gateway is unreachable. It sends live batches first, then the backlog.

SettingDefault
MI_INGEST_OUTBOX_MAX_BYTES10GiB
MI_INGEST_OUTBOX_MIN_FREEthe larger of 5 % of the disk and 2GiB
MI_INGEST_LIVE_WINDOW10s
MI_INGEST_BATCH_ROWS20000
MI_INGEST_LINGER500ms
MI_INGEST_INFLIGHT16
MI_INGEST_BACKLOG_ROWS_PER_SEC100000
MI_INGEST_BACKLOG_INFLIGHT8

At the cap the oldest data is dropped and counted (droppedRows); the state becomes outbox_full.

States​

StatusMeaning
OnlineHeartbeat or ingest status seen within 15 seconds
OfflineNothing for more than 15 seconds
DegradedOnline, but the ingest status is stale, the ingest state is not ok or catching_up, or lag is above 60 seconds
Waiting for first contactCreated, not yet seen

Ingest states in the UI: Sending, "Catching up backlog", "Gateway is slowing it down", "Gateway unreachable, buffering", "Certificate revoked", "Buffer full, dropping oldest".

The Runtimes list shows Runtime, Status, Version, Transport, Buffer, Lag, Samples/s, Errors, Unknown tags and Devices. The detail view has Health, Devices, Certificates, Enrollment tokens, Recent errors and a Delete danger zone (type the runtime id to confirm; blocked while devices still use it).

The mi-ingest gateway​

Port 8443TLS with a required client certificate (MI_INGEST_LISTEN)
Port 9464Admin HTTP: /healthz, /readyz, /metrics. Cluster-internal only (MI_INGEST_ADMIN_LISTEN).
CertificateMI_INGEST_TLS_CERT_FILE and MI_INGEST_TLS_KEY_FILE
AcknowledgementSent only after the historian write. 409 is a duplicate; 422 a reject; 429 and 503 carry Retry-After.

The runtime id comes from the certificate, never from a header. The gateway is stateless; run several replicas if needed.

Troubleshooting​

SymptomCauseFix
Token request returns 409 "set MI_INGEST_PUBLIC_URL"Console not configured for ingestSet MI_INGEST_PUBLIC_URL and restart the Console.
Enroll fails with an expired or used tokenTokens are single-use, 1 to 168 hoursClick New enrollment token.
Status Degraded, "Gateway unreachable, buffering"Network or DNS to the ingest addressCheck outbound 443; the runtime keeps buffering.
State "Certificate revoked"You or the Console revoked itEnroll again with a new token (--force).
State "Buffer full, dropping oldest"Long outage, outbox at capRestore the link; raise MI_INGEST_OUTBOX_MAX_BYTES if disk allows.
Cannot delete a runtimeDevices still use itMove or delete its devices first.
Deleting a runtime

Deleting a runtime in the Console does not uninstall it at the site. Run mii-runtime uninstall --purge on the host.