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
| Service | Image | Listens on | Published | Role |
|---|---|---|---|---|
app | ghcr.io/mlab-sh/ir.mlab.sh | 8080 | ${APP_PORT:-8080}:8080 | Web console, REST API (/api/v1), alert ingestion, enrichment, outbound webhooks, licence guard, migrations. |
executor | ghcr.io/mlab-sh/ir.mlab.sh-executor | 8090 (EXECUTOR_PORT) | No | Runs playbooks. Exposes POST /execute and GET /health. |
mysql | mysql:8 | 3306 | No | Relational data: organisations, users, sessions, API keys, alerts, cases, incidents, observables, playbook definitions, settings, the kept signed licence. Database mlabir. |
clickhouse | clickhouse/clickhouse-server | 9000 (native, used by the app) | No | Append-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/andmigrations/clickhouse/inside the image and tracked in a_migrationstable in each database. Only pending ones run. - Default admin. If no user with the email
admin@localhostexists, the app creates a default organisation and that user with the passwordadminadmin. 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
| Where | Mounted at | Contains | Lost if deleted |
|---|---|---|---|
mysql_data volume | /var/lib/mysql | All relational data, the instance id and kept licence | Everything |
clickhouse_data volume | /var/lib/clickhouse | Activity log, playbook runs, CVE cache | Audit trail and automation history |
uploads volume | /app_mlab_sh/uploads | Evidence files, avatars | Evidence |
./log (bind mount) | /app_mlab_sh/log | Daily JSON request logs | Request history |
.env (host file) | via env_file | Licence key, INTERNAL_SECRET, database passwords | Ability 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
| From | To | When | Can be turned off |
|---|---|---|---|
app | https://mlab.sh/api/v1/ir/license/validate | At 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. |
app | https://mlab.sh/api/v1 | Observable enrichment and "Extract indicators" when the mlab.sh integration is configured | Yes, leave the integration unconfigured |
app | https://vuln.mlab.sh/api/v1/cve/<id> | CVE enrichment of an observable | Yes, don't use CVE enrichment |
app | VirusTotal, AbuseIPDB, GreyNoise, urlscan.io, AlienVault OTX, Shodan, MISP, Have I Been Pwned, custom sources | Enrichment, only for sources you enable under Settings > Integration catalog | Yes |
app | Your webhook destinations | Events you subscribed under Settings > Webhooks | Yes |
executor | Whatever URLs your playbooks target | http_request and webhook nodes | Yes, don't build such playbooks |
Nothing else is sent: no telemetry, no usage analytics.