Skip to Content
mlab docs

Architecture

The four containers of an ir.mlab.sh deployment, what each one does, how data flows between them, and every call that leaves your network.

An ir.mlab.sh deployment is four containers on one Docker network, defined in the compose file: two built by mlab (app, executor) and two stock databases (mysql, clickhouse). Only app publishes a port.

Containers

ServiceImageListens onPublishedRole
appghcr.io/mlab-sh/ir.mlab.sh8080${APP_PORT:-8080}:8080Web console, REST API (/api/v1), alert ingestion, enrichment, outbound webhooks, licence guard, migrations.
executorghcr.io/mlab-sh/ir.mlab.sh-executor8090 (EXECUTOR_PORT)NoRuns playbooks. Exposes POST /execute and GET /health.
mysqlmysql:83306NoRelational data: organisations, users, sessions, API keys, alerts, cases, incidents, observables, playbook definitions, settings, the kept signed licence. Database mlabir.
clickhouseclickhouse/clickhouse-server9000 (native, used by the app)NoAppend-heavy data: the platform activity log (with its integrity hash chain), playbook run history, CVE cache. Database mlabir.

Both mlab images are built on debian:bookworm-slim and run as the unprivileged user mlab, with /app_mlab_sh as working directory. Neither image ships curl, wget or a shell utility set beyond the Debian base, so health probes run from outside the container (see Monitoring and logs).

ClickHouse version. The ir.mlab.sh repository pins clickhouse/clickhouse-server:26.8 because 26.9 closes this client's connection after every query. If your compose file says latest, pin it to 26.8. See Update.

Boot sequence

app does not accept HTTP connections until its boot sequence has finished. That makes "port 8080 answers" a meaningful readiness signal.

  • Migrations are read from migrations/mysql/ and migrations/clickhouse/ inside the image and tracked in a _migrations table in each database. Only pending ones run.
  • Default admin. If no user with the email admin@localhost exists, the app creates a default organisation and that user with the password adminadmin. If it exists, it is re-granted full admin rights. See Hardening.
  • Licence. The boot check runs before the port opens; if mlab.sh is unreachable the instance starts on the licence it kept in MySQL. See Licensing.

The executor only waits for ClickHouse, then listens on EXECUTOR_PORT (default 8090).

Data flows

Alert ingestion and triage

Alerts arrive through POST /api/v1/ingest/alert (or /ingest/alerts, up to 200 per call) with an organisation API key, or are created in the console. The app writes them to MySQL, appends an entry to the ClickHouse activity log, fires matching outbound webhooks and starts any active playbook with an alert trigger. Ingestion is rate limited to 1,000 alerts per minute per organisation, in memory.

Playbooks

The app reaches the executor at EXECUTOR_URL (compose: http://executor:8090); the executor calls back at APP_CALLBACK_URL (compose: http://app:8080). Callbacks authenticate with Authorization: Internal <INTERNAL_SECRET>, so both containers must carry the same INTERNAL_SECRET. The executor's own /execute endpoint has no authentication: it relies on not being published.

Files

Evidence (up to 50 MB per file, under uploads/evidence/) and avatars (up to 5 MB, under uploads/avatars/) are written to /app_mlab_sh/uploads, the uploads volume. They are served back at /uploads/... to signed-in users only.

Logs

Operational messages go to the container's stdout. Every HTTP request is also appended as one JSON line to /app_mlab_sh/log/<YYYY-MM-DD>.log, bind-mounted to ./log on the host. Details in Monitoring and logs.

Persistent state

WhereMounted atContainsLost if deleted
mysql_data volume/var/lib/mysqlAll relational data, the instance id and kept licenceEverything
clickhouse_data volume/var/lib/clickhouseActivity log, playbook runs, CVE cacheAudit trail and automation history
uploads volume/app_mlab_sh/uploadsEvidence files, avatarsEvidence
./log (bind mount)/app_mlab_sh/logDaily JSON request logsRequest history
.env (host file)via env_fileLicence key, INTERNAL_SECRET, database passwordsAbility to start the stack against existing data

app and executor keep nothing else on disk. What to copy, and how, is in Backup and restore.

ClickHouse applies its own TTLs: activity and playbook run rows are dropped after 2 years. Enrichment cache rows past their expiry are swept hourly by the app.

Calls that leave your network

FromToWhenCan be turned off
apphttps://mlab.sh/api/v1/ir/license/validateAt boot, then hourly (15 s timeout). Sends licence key, instance id, IR version, hostname.No. Without it the console locks once the kept licence expires (7 days). MLAB_LICENSE_URL changes the base URL, for example to go through a forward proxy you operate.
apphttps://mlab.sh/api/v1Observable enrichment and "Extract indicators" when the mlab.sh integration is configuredYes, leave the integration unconfigured
apphttps://vuln.mlab.sh/api/v1/cve/<id>CVE enrichment of an observableYes, don't use CVE enrichment
appVirusTotal, AbuseIPDB, GreyNoise, urlscan.io, AlienVault OTX, Shodan, MISP, Have I Been Pwned, custom sourcesEnrichment, only for sources you enable under Settings > Integration catalogYes
appYour webhook destinationsEvents you subscribed under Settings > WebhooksYes
executorWhatever URLs your playbooks targethttp_request and webhook nodesYes, don't build such playbooks

Nothing else is sent: no telemetry, no usage analytics.

On this page