Skip to content

On-premise installation ​

Self-host designIQ, collaborative modeling and architecture with AI, with Docker. One container runs the Live Host: Hocuspocus document sync (WebSocket), the REST API, the collaborative web app, and the MCP endpoint for AI clients, all on one port. The content repositories stay on your git host, GitHub or GitLab or both: releases become pull requests in your GitHub organization or merge requests in your GitLab, and review and merge stay where they are today. The platform never executes code from a content repository.

The auth model in one line: login authenticates, repositories authorize. Users sign in at your identity provider (OIDC), and per-(user,repo) write permission is checked at the git host with the platform's own credential: your GitHub App's installation token, or the access token of your GitLab. The server stores zero user tokens (ADR 0001, ADR 0007).

Companion documents:

Prerequisites ​

  • Your content repositories, each a root designiq.yml naming the folder its models live in, on a GitHub organization (or GitHub Enterprise), on a GitLab (self-managed, any edition, or gitlab.com), or on both.
  • An OIDC identity provider, the one login (ADR 0007), that can put each person's login at the git host into the access token: the GitHub login, the GitLab username, or both. None yet? The compose file ships a Keycloak with a ready realm for an evaluation on one computer (idp-quickstart.md); evaluating without any login is LIVE_AUTH=none.
  • Docker with the compose plugin, on a machine sized as in Sizing (one vCPU and 1 GB of memory carry 30 people).
  • An HTTPS URL for the instance that your people's browsers reach: the sign-in callback derives from LIVE_PUBLIC_URL, and the git host's webhooks are sent to it. A localhost evaluation works without one (webhooks simply can't reach you; the install-redirect fallback and the 10-minute sync cover repo connection).
  • Outbound HTTPS (443) to your git host for its API and for git clone, fetch and push: github.com and api.github.com (or your GHE hosts), or your GitLab. No SSH access is needed; all git traffic is HTTPS. Inbound, the git host sends its webhooks to the instance. Behind an egress proxy or with an internal CA, see corporate-network.md: one setting each covers the Live Host and git.

The image ​

ghcr.io/miragon/designiq-live-host, multi-arch (linux/amd64 + linux/arm64), built from apps/live-host/Dockerfile by the release workflow (see ADR 0004 for the artifact flow: the same image serves on-prem installs and Miragon's hosted cells).

TagMeaning
latestlatest release; evaluation only, it moves
vX.Y.Za specific release
sha-<full-sha>a release's commit (full sha, for pin-mapping)

Every push to main is built into a package of its own, ghcr.io/miragon/designiq-live-host-edge (edge for the newest, sha-<full-sha> for each commit): what pushes it cannot write a release.

The compose file takes the tag from DESIGNIQ_VERSION in .env and does not start without it: an upgrade is a change of that line, never a pull that brings whatever is newest. .env.example names the release it came with.

Container facts: listens on PORT=8080, state under LIVE_DATA_DIR=/data (mount a volume there), ships git + CA certificates for cloning connected repos. Besides the base image it holds the Live Host's sources, their production dependencies (about 100 MB) and the built web app: no build tool, package manager, test or dev dependency for a scanner to report. Its Debian packages carry the fixes published since the base image was built. It runs as the unprivileged user 1000:1000 (uid:gid, the base image's node), set by number so Kubernetes' runAsNonRoot accepts it. /data must belong to that user:

  • A named volume (-v designiq-data:/data) takes its owner from the image the first time it is mounted. Nothing to do.
  • A bind mount on Linux (./data:/data in the compose file) belongs to whoever created the directory, and to root when Docker creates it. Create it and hand it over before the first start: mkdir -p data && sudo chown 1000:1000 data && sudo chmod 700 data. Docker Desktop on macOS maps the owner of a bind mount itself. Nothing to do.
  • In Kubernetes, securityContext.fsGroup: 1000 makes the volume writable, a fresh one and one an older image wrote, on volume types that support fsGroup.

When the Live Host cannot write /data, it does not start: it names the path, the uid:gid it runs as and the command that fixes it. On Linux, a content checkout you bind-mount (LIVE_HOST_CONTENT_DIR) must be writable for 1000:1000 as well; Docker Desktop on macOS needs nothing. git works in the clones and the checkout whoever owns them.

One Live Host per data directory ​

The open documents, the queue of each checkout's git operations and the model histories it writes back live in the Live Host's process. Two processes on one data directory would keep two copies of each open model: people in one model on the two hosts would not see each other, and each host would write its copy over the other's. The Live Host therefore holds a lock on /data (instance.lock) while it runs. A second one waits LIVE_INSTANCE_WAIT_MS (30 s) for the first to stop, then refuses to start and names the holder (its process and host name, from instance.json). The lock goes with the process however it ends, a kill -9 included: nothing is left behind to clear.

  • Docker Compose: do not scale the live-host service. docker compose up -d stops the old container before it starts the new one.
  • Kubernetes: replicas: 1 and strategy: type: Recreate (or a StatefulSet), with a ReadWriteOnce volume. The default rolling update starts the new pod before the old one stops: the new one waits, is never ready, and the update does not finish.
  • No network file system (NFS, SMB) for /data: SQLite's write-ahead log and its locks need a local file system.

Sizing ​

The Live Host is light. A load test ran 30 people against one Live Host for 35 minutes: a workshop of 10 in one model (3 of them typing in its text the whole time), 10 in pairs in 5 other models, 10 on repository pages, 3 browsers dragging on the canvas, a release while people typed, and a proxy restart that reconnected everyone. What the container used:

Measure30 people
CPU4 % of one core typically, 17 % at the 95th percentile, 47 % at the peak
Memory (container)393 MiB typically, 442 MiB at the peak (the Node process 249 to 329 MB)
Open files30 idle, 93 at the peak (60 sockets), back to 32 afterwards
Edit to colleague (the host)3 ms median, 11 ms at the 99th percentile
Reconnect after a proxy restartabout 1.5 s for everyone, nothing lost
Data directorygrew from 5.6 to 5.9 MB; live.db stays small, the checkouts are the repositories' size

Give it one vCPU and 1 GB of memory for up to 30 people, two vCPUs and 2 GB with room to spare, and more memory where people paste models of several MB at once (a message is buffered whole, up to LIVE_MAX_DOC_BYTES + 1 MiB, Security & limits). The disk holds a checkout per connected repository, live.db and at most 50 MB of log. Keycloak, if you run the shipped one, wants about another 750 MB.

Each browser tab with a model open holds one WebSocket connection, one with a board two. The caps (LIVE_MAX_WS 400 in all, 40 per person) carry well over a hundred people. To watch them, set LIVE_HEALTH_SECRET: /healthz then shows the open connections, the peaks and the refusals per cap to its holder (Health), and a refusal is a WARN line that names the setting to raise (Connection limits behind a proxy).

Quickstart (compose) ​

  1. Connect your git host, one or both: register your GitHub App (github-app-setup.md; you come back with an app id, slug, private key and webhook secret), or prepare your GitLab (gitlab-setup.md; you come back with a group access token, a webhook secret and the login claim).

  2. Decide on the identity provider (idp-quickstart.md): the shipped Keycloak for an evaluation (a compose profile in dev mode with demo users, its LIVE_OIDC_* values and KEYCLOAK_ADMIN_PASSWORD are in .env.example) or your own, via the LIVE_OIDC_* block in configuration.md. Evaluating without an IdP: LIVE_AUTH=none, see the operating modes below.

  3. Configure, then start (the Live Host refuses to boot without its login configured, so write .env before the first up; --profile keycloak adds the shipped Keycloak):

    bash
    cd deploy
    cp .env.example .env        # fill in LIVE_PUBLIC_URL + the GitHub App or GitLab values; it names the release (DESIGNIQ_VERSION)
    mkdir -p data && sudo chown 1000:1000 data && sudo chmod 700 data   # Linux only: ./data is the Live Host user's alone
    docker compose up -d

    The compose file is deploy/docker-compose.yml; the annotated env template is deploy/.env.example. It sets stop_grace_period: 30s so the graceful-shutdown flush (LIVE_SHUTDOWN_MS, 25 s) can persist debounced write-throughs before the container is killed. Keep that headroom if you write your own unit files. A stop with open editors takes about a second; its exit code is 1 when a document could not be stored (see Health). The log rotates (json-file, 5 files of 10 MB): it shares the disk with ./data.

  4. Put your reverse proxy in front (below), open https://<your-host>, sign in at your identity provider. GitHub: connect repositories with the install picker (Add repository). GitLab: the content projects below GITLAB_GROUPS are there already, each for the people with Developer or more on it. Done.

Plain docker run works too:

bash
docker run -d --name designiq -p 8080:8080 -v designiq-data:/data \
  --env-file .env --stop-timeout 30 --log-opt max-size=10m --log-opt max-file=5 \
  ghcr.io/miragon/designiq-live-host:vX.Y.Z

Operating modes ​

The server wires itself from the credentials it finds (configuration.md has every variable):

ModeCredentialsWhat you get
No auth (LIVE_AUTH=none)noneServes a locally mounted content checkout (LIVE_HOST_CONTENT_DIR), or with App credentials the App's repositories, to everyone as the local principal (LIVE_LOCAL_USER). Local evaluation / trusted single-team network only: no login, no authorization (ADR 0007).
OIDC + GitHub AppLIVE_OIDC_* + App id + private keyInstallation enumeration = multi-repo overview, per-(user,repo) authorization via installation tokens, bot-authored release PRs (ADR 0001), direct webhooks (github-app-setup.md).
OIDC + GitLabLIVE_OIDC_* + GITLAB_URL + tokenThe content projects below GITLAB_GROUPS = multi-repo overview, per-(user,project) authorization on GitLab membership (Developer or more), merge requests and todos by the token's bot, the system hook (gitlab-setup.md).
OIDC + GitHub App + GitLaball of the aboveBoth hosts' repositories on one host; the IdP issues each person's GitHub login and GitLab username (LIVE_OIDC_GITLAB_LOGIN_CLAIM, a host with both).

Run on-prem in one of the OIDC modes: LIVE_AUTH=oidc (the default) refuses to start without the identity provider and at least one git connection, a GitHub App or a GitLab. There is also a cell mode (extra TENANT_*/CELL_* variables) used by Miragon's hosted multi-tenant operation (ADR 0002). Leave all of those unset; the server then runs standalone.

AI clients (MCP) ​

The same container serves an MCP endpoint at POST /mcp: agents read and edit the live models under the same per-(user,repo) authorization as the web app. An MCP client signs in at your identity provider itself (OAuth with PKCE, discovered from the endpoint's 401), with a client registered at the IdP for it, such as the shipped realm's designiq-mcp:

bash
claude mcp add --transport http designiq https://<your-host>/mcp \
  --client-id designiq-mcp --callback-port 8765

Each person runs this once on their computer, then /mcp in Claude Code signs them in in the browser. With LIVE_MCP_CLIENT_ID and LIVE_MCP_CALLBACK_PORT set to that client (configuration.md), the start page's Connect an AI client dialog hands people this command for your host. How to register the client at Keycloak and others, how AI clients sign in at Entra ID directly (an Application ID URI and an app registration for them, entra-id.md), and other MCP clients: Connect an AI client. A LIVE_AUTH=none host needs no sign-in at all. A computer that does not trust your internal CA cannot connect: client machines. Set LIVE_MCP_READONLY=1 to serve the read tools only, LIVE_MCP_BPMN_EDIT=1 to add the semantic BPMN tools (ADR 0009). Tool list and semantics: docs/mcp-integration.md. The read-only MCP server for a checkout, without the Live Host, is below.

VS Code (Developer Preview) ​

The VS Code extension opens the live models in the editor (apps/vscode). It is a Developer Preview: it is in no extension marketplace, and each release carries it as design-iq-<version>.vsix among the assets of its GitHub release, with the version of the image. Install it on each computer and point it at the host's https:// address:

bash
code --install-extension design-iq-<version>.vsix

Then set designiq.serverUrl in the editor's settings to https://<your-host>. designIQ: Sign in signs in through your IdP in the browser and comes back into the editor through its own URI scheme (vscode://, a fork's own: LIVE_EDITOR_SCHEMES in configuration.md). A designiq.serverUrl with plain http:// to another machine makes the extension warn and ask before it signs in: the session would travel unencrypted. With a certificate of an internal CA, see client machines.

Reverse proxy / TLS ​

One port carries plain HTTP and the WebSocket upgrade (Hocuspocus rides the same server). A proxy that doesn't pass the upgrade through is the #1 misconfiguration: the app loads, but documents never sync.

Caddy, where upgrade pass-through is automatic:

design.example.com {
    reverse_proxy localhost:8080
}

nginx, which needs HTTP/1.1 and the Upgrade/Connection headers explicitly:

nginx
map $http_upgrade $connection_upgrade {
    default upgrade;
    ''      close;
}

server {
    listen 443 ssl;
    server_name design.example.com;
    # ssl_certificate ...; ssl_certificate_key ...;

    location / {
        proxy_pass http://localhost:8080;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_read_timeout 1h;   # long-lived WebSocket connections
    }
}

LIVE_PUBLIC_URL must be the public HTTPS URL: session cookies are only marked Secure when it starts with https, and OAuth callback + webhook URLs derive from it.

The web app needs no compression or caching rules at the proxy. The Live Host sends its files Brotli- or gzip-compressed, as the browser accepts (compressed once, at build time), with Vary: Accept-Encoding; the content-hashed files under /assets/ may be cached for a year, the page itself is revalidated on every load. Both examples pass Content-Encoding and Vary through unchanged; leave nginx's gunzip off for this host.

Connection limits behind a proxy ​

The Live Host caps WebSocket connections: 400 in all (LIVE_MAX_WS), and per network address until a connection signs in (LIVE_MAX_WS_PER_IP, 100). Once signed in, a connection counts against its user instead (LIVE_MAX_WS_PER_USER, 40). A whole office behind one proxy, NAT or VDI address therefore works in daily use: only connections that have not signed in yet share the address's cap, and a connection signs in within milliseconds of opening.

The moment that counts is a reconnect of everyone at once: a proxy, VPN gateway or the Live Host restarts, and every open tab behind the address opens its connections again within a second or two, each counting against the address until it has signed in. A browser tab with a model open holds one connection, one with a board two. A test measured it with 60 connections behind one address and the old cap of 40: 4 of them were refused for about two seconds and came back on their own, the editor saying "Too many connections, retrying…" meanwhile. Set LIVE_MAX_WS_PER_IP to the address's peak: the people behind it times their tabs (two each is typical, a board counts double). The default of 100 carries 50 people with two tabs each; LIVE_MAX_WS_PENDING (connections waiting to sign in, host-wide) follows it unless you set it, and LIVE_MAX_WS must stay above the sum of everyone. The holder of LIVE_HEALTH_SECRET reads the address's peak in /healthz (websockets.peakWaitingFromOneAddress, Health). Under LIVE_AUTH=none every connection counts per address throughout: behind a proxy, set LIVE_TRUSTED_PROXIES below or raise LIVE_MAX_WS_PER_IP.

To count those per client rather than per proxy, tell the Live Host which peers are your proxies. From them it reads the client from X-Forwarded-For, and it ignores the header from anyone else:

bash
# .env: the proxy's own address, as the Live Host sees it
LIVE_TRUSTED_PROXIES=172.18.0.2
  • Name only the proxies' own addresses. Every address in X-Forwarded-For that falls in the trusted list is read as a proxy, so a range that also holds clients (your office network, private) lets a client in it put any address in front of its own. A range or private is safe only behind a proxy that replaces the header instead of appending to it.
  • Caddy replaces X-Forwarded-For with the address it saw. With the compose file's Caddy service, the Live Host sees it on the Docker network: LIVE_TRUSTED_PROXIES=private works. Drop the live-host port then, so nothing but Caddy reaches it: ports: !reset [] in docker-compose.override.yml (Upgrades, step 3). A port still published lets a client reach the Live Host past Caddy over plain HTTP, from the Docker bridge gateway, which private trusts to name any client address.
  • nginx replaces it with the X-Forwarded-For $remote_addr line in the location block above. When nginx runs on the Docker host and reaches a published port, the Live Host sees the Docker bridge gateway (172.17.0.1 for docker run, the compose network's .1) and not 127.0.0.1. Trust that address, and publish the port on the loopback only, so no other machine reaches it past nginx: ports: !override ["127.0.0.1:8301:8080"] in docker-compose.override.yml (Upgrades, step 3). Without !override the entry comes on top of the compose file's 8301:8080 and the container does not start.
  • Behind several proxies (a load balancer in front of nginx), list each of their addresses.
  • LIVE_TRUSTED_PROXIES takes addresses, ranges (10.0.0.0/8) and the words loopback, private and all. The log's first ws client address: line shows the address the Live Host counted and the peer it came from, so you can check the setting.
  • Coming from the advice to set Fly-Client-IP at the proxy: name the proxy in LIVE_TRUSTED_PROXIES and either replace X-Forwarded-For as above or keep your Fly-Client-IP line and set LIVE_CLIENT_IP_HEADER=fly-client-ip.

A connection refused at a cap is told so: the editor shows "Too many connections, retrying…" and keeps trying. The log has a WARN line that names the setting, its value and the address (or the person, at LIVE_MAX_WS_PER_USER), once per cap and address a minute, the next one counting what came meanwhile, so an alert on WARN sees people turned away:

text
2026-11-30T11:19:42.185Z WARN  connection refused at LIVE_MAX_WS_PER_IP=100: address 172.18.0.1 is at its cap (its connections that have not signed in, every one under LIVE_AUTH=none). The client retries; behind one NAT or proxy address, set it to the peak number of sockets of everyone behind it (docs/on-prem/README.md, Connection limits behind a proxy). Not warned again for this address within a minute

Each refused connection also has an info line with the peer it came from (ws upgrade refused: ...), throttled like everything a stranger can cause (Logs).

Data & backup ​

Everything lives under /data:

PathWhatBackup?
/data/live.db (with -wal, -shm)SQLite: live document lineages (unreleased edits, the crown jewels), sessions, repo registry, the last access answersYes
/data/workspaces/<owner>/<repo>git checkouts of connected repos: models created, moved, duplicated or deleted since the last release, and the conflict, release and rename lists in each .gitYes, together with live.db
/data/instance.lock, instance.jsonthe lock of one Live Host per data directory, and who holds it (and whether the one before stopped cleanly, Restarts)No
/data/ca-bundle.pemthe public roots plus NODE_EXTRA_CA_CERTS, for git, written at each start with NODE_EXTRA_CA_CERTS (corporate-network.md)No

A copy of live.db holds no credential that works: a session is stored as the SHA-256 of its id, so the value in the table signs nobody in, and the GitHub App's installation tokens stay in the Live Host's memory (a restart mints a fresh one). Only a hosted cell keeps its last token there, encrypted with CELL_TOKEN_KEY or CELL_SECRET, which live in its environment. Earlier versions kept session ids and tokens as they were: the first start after the upgrade takes them out of the tables and rewrites the file (one VACUUM, a few seconds for a large live.db), so no copy taken after that rewrite holds their bytes either. The rewrite needs free space at least the size of live.db beside it. A start stopped before its rewrite finished, one whose rewrite failed or one without that room (a warn line says so, with the bytes the rewrite needs) leaves a note in live.db, and every start after it rewrites the file until one succeeds; a copy taken in between can still hold a session id that signs in. An earlier version started on it again stores them as they are until a newer one starts again (Rolling back). The secrets of an installation are in .env and the files it names (the App's private key, the webhook secret, SESSION_ENC_KEY): keep them readable for their owner only (chmod 600 .env). A backup still holds everything not yet released and who works on what, so keep it as safe as the repositories.

What the Live Host writes under /data (live.db, the workspaces, what its git runs write, the copy backup.ts makes) is readable for its own user only: it runs with umask 077. The image's /data, and so a fresh named volume, is 700; a bind mount gets that with sudo chmod 700 data (the setup above). Files an earlier release wrote keep their mode: sudo chmod -R go= data once takes the rights of other accounts on the machine away. The backup below lands in ./backups with the same restriction (its first host-side line).

No read or write of the Live Host follows a link a content repository holds out of its checkout or into its .git: a models folder that is such a link lists no models (the validator fails on it, content/models-folder-link), a linked folder below it is not entered and a linked file is no model, and a model's files are checked before every read, write, move and delete. A link inside the checkout, to another folder or image of the same repository, works as before.

Each checkout's .git also holds the host's lists of that repository: its conflicts (bpmiq-conflicts.json), what its open releases shipped and the requests they opened (bpmiq-released.json, designiq-release-requests.json), renames not yet released, files waiting for main's newer version, and the like. The workspaces archive below carries them.

What a backup holds. The Live Host stores an open document a moment after its last edit: 2 seconds after people stop, at most 10 seconds while someone keeps typing (the store's debounce). Until then the change is in the host's memory and in the editors of the people in it. A copy taken while people edit holds what was stored up to then, so the edits of the last few seconds before it are not in it (a test measured a copy that lacked the last 4 seconds of two people typing). For a copy with nothing in flight, stop the Live Host first: docker compose stop live-host stores every open document before it exits (about a second), then copy ./data as it is (sudo tar -C . -cpf data-<date>.tar data) and start it again; such a copy goes back as a whole, with the Live Host stopped (as in Coming from 5.17 or older).

live.db runs in write-ahead-log mode: a copy of live.db alone, without live.db-wal, misses the latest changes. Two ways to back up while the Live Host runs:

  • A snapshot of the whole volume (LVM, ZFS, a cloud disk snapshot) catches live.db, its -wal and -shm files and the workspaces at one moment.

  • A copy from inside the container (the image has no sqlite3):

    bash
    docker compose exec live-host mkdir -p -m 700 /data/backups /data/workspaces
    docker compose exec live-host tar -C /data --exclude='.git/*.lock' -cf /data/backups/workspaces.tar workspaces
    docker compose exec live-host node apps/live-host/src/tools/backup.ts /data/backups/live.db
    docker compose exec live-host sh -c 'cd /data/backups && sha256sum live.db workspaces.tar > SHA256SUMS'
    mkdir -p backups && chmod 700 backups
    docker compose cp live-host:/data/backups/. ./backups/
    docker compose exec live-host rm -r /data/backups

    The archive comes first and the copy of live.db second, so no lineage in the copy is older than its file in the archive: an edit stored between the two is in the copy, and after a restore it goes on from there. The other way round, the copy's older lineage would be written over the archive's newer file. backup.ts writes a consistent copy with one VACUUM INTO that blocks no edit. The copy is self-contained: it has no -wal file of its own. Without an argument it writes /data/backups/live-<timestamp>.db; it never writes over a file that is already there, so the last two lines take the files off the volume (to ./backups next to the compose file) and clear the folder for the next run. SHA256SUMS holds the checksums of both files as the container wrote them; the restore checks them before it removes anything, since a file cut short on its way (an interrupted copy, a full disk) still unpacks or copies without an error. The first line also creates the workspaces folder, which a fresh installation has before its first repository is cloned. The archive leaves out the lock files git holds in a checkout's .git while it writes (index.lock and the like): restored, such a lock would stop every git command in the checkout. A lock a killed Live Host left behind goes when the next one first uses the repository.

Restore the way you backed up. The two ways differ in the -wal file, and mixing them loses edits.

From a volume snapshot: stop the container (docker compose stop live-host), roll the volume back to the snapshot or restore its files exactly as they were taken: live.db, live.db-wal, live.db-shm and workspaces together. Delete none of them. The -wal file holds every edit stored since SQLite last folded it into live.db, which can be hours of work; SQLite replays it when the Live Host opens live.db. Without it the older lineages come back and are written over the newer files the snapshot holds. Then start the container (docker compose up -d live-host).

From a copy made with backup.ts: with the Live Host stopped, put the copy in the place of the current live.db and replace the workspaces with the archive taken with it. The -wal and -shm files of the current live.db go just before the copy takes its place: left next to it, the old -wal file would be replayed into it. All steps run in the image, in a one-off container that sees the backup folder (run it next to the compose file, where ./backups is):

bash
docker compose stop live-host
docker compose run --rm --no-deps -v "$PWD/backups:/restore:ro" live-host sh -euc '
  test -f /restore/live.db
  (cd /restore && sha256sum --check --ignore-missing --quiet SHA256SUMS)
  rm -rf /data/restoring
  mkdir -p /data/restoring/workspaces
  tar -C /data/restoring -xf /restore/workspaces.tar
  cp /restore/live.db /data/restoring/live.db
  rm -f /data/live.db-wal /data/live.db-shm
  mv /data/restoring/live.db /data/live.db
  rm -rf /data/workspaces
  mv /data/restoring/workspaces /data/workspaces
  rmdir /data/restoring
'
docker compose up -d live-host

Everything that reads the backup (the checks, the unpacking, the copy) runs before anything of the current state is removed: a backup that is not there, cannot be read or differs from its checksums stops the script with the current live.db, its -wal file and the workspaces untouched. The checksums matter because GNU tar unpacks an archive cut off between two files without an error, and a live.db cut short copies like a whole one. Without the archive of the same run, leave out the tar line: the workspaces are then replaced by an empty folder, since a live.db copy next to newer workspaces resumes its older lineages and writes them over the newer files. Either way, lineages, sessions and the registry come back.

A repository without a checkout (restored without the archive as above, or a checkout someone deleted) is cloned afresh at its next use, and what live.db holds of it meets the new checkout:

  • A text the default branch already has at that path, while it still has the file (a model that was only opened or read, or one released and merged), is no unreleased edit: the file stays as the default branch has it, and the next open takes that version in. An unreleased change back to an older version reads the same and is taken in too; that version stays in the file's history.
  • Every other edit goes back into its file, and the file lands on the conflict list first: the release refuses it until someone keeps main's version or the workspace's. This includes a model the default branch deleted or renamed since: it comes back flagged, since it may have been re-created on purpose, and keeping main's version removes it again.
  • A model the default branch never had at that path goes back as a new file, unflagged: no change of the default branch can be lost there.
  • A model the new checkout keeps out (no usable designiq.yml, outside its models folder, behind a symbolic link) is not written: the log names it, its lineage stays in live.db, and it is tried again after every fetch, so the commit that lets it in brings it back as above, never unflagged over a newer file.

Nothing is overwritten in silence in either direction. A restore the Live Host could not finish (it stopped in the middle, or a file could not be written) runs again at its next use of the repository, and the log names what it could not restore yet.

Released state is safe in GitHub regardless; only unreleased live edits depend on live.db and the workspaces. Frequent, small releases keep that exposure short.

Discarded edits are kept. "Load latest" on a repository page resets its checkout onto the default branch and discards every unreleased change; the dialog lists the files first, and the host refuses when more would go than the person was shown. Before the reset it commits what the checkout held, new files included, to a ref of its own in that checkout's .git, which no fetch, release or push touches:

bash
docker compose exec live-host git -C /data/workspaces/<owner>/<repo> for-each-ref refs/designiq/discarded
docker compose exec live-host git -C /data/workspaces/<owner>/<repo> show <ref>:processes/order.bpmn

The commit names who discarded it. To bring a file back, open it in the editor and paste the old text into its source view, or restore it on a branch and release that. The refs stay until someone deletes them (git update-ref -d <ref>); a fresh clone of the repository (a lost checkout) starts without them.

Per-user rows. Besides the session, live.db keeps two non-credential tables per person (ADR 0001 as amended): favorites (the repositories someone marked as favorites) and repo_visits (the repositories they opened last, at most 20, none older than 90 days). Both are keyed <provider>:<login> in lower case, such as oidc:petra for an IdP login. Deleting one person's rows (e.g. on a data-subject request):

bash
docker compose exec live-host node apps/live-host/src/tools/forget-user.ts oidc:petra

It deletes the person's favorites, recently opened repositories, stored access answers and sessions (they are signed out). Their edits stay: they are part of the models, attributed in git. A session lasts a working day (12 hours); the Live Host deletes the expired ones at its start and every hour, so no login and name stays in live.db longer than that after the last sign-in.

access_answers keeps, per person and repository, the provider's last answer to "may write" with its time. It is read only when the provider cannot answer (an outage, a rate limit) and no fresher answer is in memory, and only if it is at most a day old: a restart during a GitHub outage then does not lock everyone out.

Repositories no longer connected. When a repository leaves the host (the GitHub App uninstalled or the repository taken off the installation, a project out of GITLAB_GROUPS, one whose designiq.yml was removed, or one deleted in GitLab: GitLab 18 and later keep a deleted project for days as <name>-deletion_scheduled-<id>, and the Live Host lets it go at once), the Live Host forgets it, but keeps its checkout under /data/workspaces and its model histories in live.db: they may hold edits nobody released, which are nowhere else, and a repository connected again (an App installed anew after a mistake) goes on with them. It never deletes them by itself. Every start names each such repository and what it holds:

text
acme/old-models is no longer connected, its data stays: 3 model history(ies) in live.db with edits that may not be released, a checkout in /data/workspaces/acme/old-models. ...

To remove it (an offboarding, a data-subject request), release or save what you need first, then run the tool, first without --yes to see what would go:

bash
docker compose exec live-host node apps/live-host/src/tools/forget-repo.ts acme/old-models
docker compose exec live-host node apps/live-host/src/tools/forget-repo.ts acme/old-models --yes

It deletes the repository's model histories, its rows in the other tables (favorites, recently opened, last activity, access answers, todo jobs) and its checkout, and refuses a repository that is still connected. It removes one repository and nothing of another: it refuses a name that holds a connected repository or another repository's checkout (a GitLab group such as grp/sub of grp/sub/project) and a path inside a repository. Where no checkout is left to tell which part of a model's name is its repository (a restore without the workspaces archive), the start names the model histories themselves (... belong to no connected repository and no checkout tells which: grp/sub/gone/processes/b.bpmn); run the tool with the repository's full name.

repo_activity holds when each repository last changed (a live edit, its default branch), the same for everyone, no personal data. With LIVE_AUTH=none every request is the one local principal, so favorites and recently opened repositories are shared host-wide (local:<login>).

Changes made outside designIQ ​

A merge request or pull request merged at the git host, a commit from GitLab's web IDE or GitHub's editor, a push: designIQ needs no push webhook for these. The Live Host fetches a repository when someone uses it (opens its page or a model, saves, lists its changes; at most once a minute) and right after each release from it, then catches its checkout up with the default branch, file by file:

  • A file nobody edited in designIQ takes main's version. A model open nowhere shows it at its next open.
  • A file open in an editor waits until nobody has it open, so nobody's canvas changes under their hands. The editor says that main has a newer version and offers to take it in now, merged line by line with what was edited since; the release refuses the file while it waits.
  • A file changed in designIQ (not released yet) and at the git host as well lands on the conflict list: the release refuses it, the release dialog shows both versions, and someone keeps main's or the workspace's.

Which repositories exist and who may write them reaches the Live Host by webhook (the GitHub App's installation events, GitLab's system hook) at once, else within 10 minutes or when someone presses Refresh on the start page. A right taken away ends that person's live connections (Sign-out, session end and revoked access). Details of the catch-up: multi-repo-architecture.md.

Upgrades ​

An upgrade is a change of DESIGNIQ_VERSION in .env, never a pull of whatever is newest:

  1. Read the release notes of every release between yours and the new one, and the "Coming from" notes below. A release can ask for a step of yours (5.14.0 needed a chown of the data directory before its first start).

  2. Back up live.db and the workspaces (Data & backup), and keep the backup until the new release has run for a while: it is the way back. Coming from 5.17 or older, whose image has neither backup.ts nor sqlite3: back up as in Coming from 5.17 or older.

  3. Take the new release's compose file and environment template. The compose file changes with releases (the log rotation, the guard that refuses to start without DESIGNIQ_VERSION and Keycloak on 127.0.0.1 came after 5.17), and compose reads only the file in your directory. Keep your own changes (an internal CA, another port, Caddy) in docker-compose.override.yml beside it, which compose reads on top and no upgrade touches. Compose merges it into the file: a value replaces the file's and environment merges by name, but a list such as ports or volumes adds its entries to the file's (a volume at the same container path replaces the file's). To replace the file's ports, or to drop them, tag your list !override or !reset (Compose 2.24.4 or newer):

    yaml
    # docker-compose.override.yml: nginx on this host, the port on the loopback only
    services:
      live-host:
        ports: !override
          - "127.0.0.1:8301:8080"
        volumes:
          - ./certs/company-root.pem:/certs/company-root.pem:ro # added to the file's ./data
    yaml
    # docker-compose.override.yml: the compose file's Caddy service, the only way in
    services:
      live-host:
        ports: !reset []
      caddy:
        image: caddy:2
        ports:
          - "80:80"
          - "443:443"
        volumes:
          - ./Caddyfile:/etc/caddy/Caddyfile:ro
          - ./caddy-data:/data
        restart: unless-stopped

    Without the tag, a ports: entry of yours comes on top of the file's 8301:8080: the loopback entry then takes the same port a second time and the container does not start (address already in use), and ports: [] leaves the port published on every interface, past the proxy. docker compose config shows what compose makes of both files. Then take the release's files:

    bash
    V=vX.Y.Z
    cp docker-compose.yml docker-compose.yml.before && cp .env.example .env.example.before
    curl -fsSLO "https://raw.githubusercontent.com/Miragon/design-iq/$V/deploy/docker-compose.yml"
    curl -fsSLO "https://raw.githubusercontent.com/Miragon/design-iq/$V/deploy/.env.example"
    diff docker-compose.yml.before docker-compose.yml   # a change of yours here: move it to docker-compose.override.yml
    diff .env.example.before .env.example               # new variables and defaults: carry what you need into .env

    With the shipped Keycloak (--profile keycloak), take its files of the release as well: the compose file mounts both, and Docker makes a missing one an empty directory, which Keycloak cannot import. A realm Keycloak imported already stays as it is (idp-quickstart.md); one of 5.17 or older kept no state and is imported afresh, and needs KEYCLOAK_ADMIN_PASSWORD in .env first (Coming from 5.17 or older).

    bash
    for f in realm-designiq.json designiq-users-0.json; do
      curl -fsSL -o "keycloak/$f" "https://raw.githubusercontent.com/Miragon/design-iq/$V/deploy/keycloak/$f"
    done
  4. Set the new release and recreate:

    bash
    sed -i "s/^DESIGNIQ_VERSION=.*/DESIGNIQ_VERSION=$V/" .env
    docker compose pull && docker compose up -d

    Compose stops the old container before it starts the new one. SIGTERM triggers the graceful flush, which takes about a second with editors open (5.17 and older: 25 seconds, below), and /data carries the state across.

  5. Watch the start: docker compose logs -f live-host until Live Host ready, then /healthz. A boot that is refused names why and what to do. docker compose ps shows the container healthy after its first health check.

A browser tab that stays open across the upgrade still runs the release before. It reconnects and edits on, and it notices the new release within minutes, as soon as it comes back into view or when it needs a part of the app it has not loaded yet: it then offers Reload, which waits until the tab is connected again and its changes reached the Live Host, including what was typed while the host restarted. Changes that cannot get there within 20 seconds are the person's call: the tab asks before it reloads without them. A part of the release before that is gone (another notation's editor, a panel) answers 404, and the tab offers the reload in its place instead of a broken editor.

A tab of 5.17 or older is different: on a host with a sign-in over https it does not reconnect to the new release, see Coming from 5.17 or older.

Releases are semver-tagged. Coming from 4.x: upgrading-to-5.md. The image name changed with the rename to designIQ, so pull alone does not reach 5.0.

Rolling back ​

live.db records its schema (PRAGMA user_version) and the oldest schema a Live Host must know to run on it. Most migrations only add tables or columns, which the release before still runs on: then rolling back is setting the previous DESIGNIQ_VERSION and docker compose up -d, and the edits made under the newer release stay. A release whose migration the older one cannot run on (a column dropped, a table rebuilt) says so in its notes; the older image then refuses to start on that live.db and names both schema numbers, before it writes anything:

text
live.db is at schema 3 and needs a Live Host that knows schema 2 or newer; this one (5.17.1) knows schema 1. ...

Roll back over such a release with the backup of step 2: stop the Live Host, restore live.db and the workspaces as in Data & backup (edits made since the backup are lost), set the previous DESIGNIQ_VERSION, start. Releases older than the schema version (5.17 and older) read neither number: on a migration they cannot run on they fail at their first write instead of refusing to start, so roll back to them over such a release only with the backup taken before the upgrade. Schema 2, which keeps no credential at rest (below), is no such migration: the release before it and 5.17 or older start on it, without the backup. Neither is schema 3, which adds the hash of the text each model last wrote to its file (a file changed outside designIQ is taken into the model at its next load instead of written over). Rolling back to 5.13.3 or older runs as root again: the files it writes belong to root, and the next upgrade needs the chown below once more.

Coming from 5.13.3 or older: those images ran as root, so the volume or Linux bind mount they wrote belongs to root, and the Live Host, which now runs as 1000:1000, refuses to start on it. Hand the data directory over once, with the Live Host stopped:

bash
docker compose pull
docker compose stop live-host
docker compose run --rm --user root live-host chown -R 1000:1000 /data
docker compose up -d

With plain Docker, run the same chown against your volume: docker run --rm --user root -v designiq-data:/data ghcr.io/miragon/designiq-live-host:<tag> chown -R 1000:1000 /data. In Kubernetes, fsGroup: 1000 hands the volume over on volume types that support it; on any other, run the same chown once as root, in a one-off Job or an init container. A bind mount under Docker Desktop on macOS needs nothing. A LIVE_AUTH=none host without LIVE_LOCAL_USER now acts as node instead of root; set LIVE_LOCAL_USER=root to keep the favorites and recently opened repositories it saved as local:root.

Coming from 5.17 or older ​

Back up without backup.ts. The 5.17 image has neither tools/backup.ts nor sqlite3, so step 2 above cannot run in it. Two ways that can:

  • Stopped (simplest). Stop the Live Host and copy the data directory as it is: a stopped live.db is consistent, with or without its -wal file. The upgrade stops it anyway.

    bash
    docker compose stop live-host                       # 5.17 takes 25 s with editors open
    sudo tar -C . -cpf data-before-upgrade.tar data      # everything, owners and modes kept
    sudo chmod 600 data-before-upgrade.tar               # it holds what live.db holds

    To go back, with the Live Host stopped (docker compose stop live-host):

    bash
    sudo mv data data-after-upgrade && sudo tar -xpf data-before-upgrade.tar
    cp docker-compose.yml.before docker-compose.yml     # and the previous DESIGNIQ_VERSION in .env
    docker compose up -d
  • While it runs. The backup of Data & backup, with Node's own SQLite in place of backup.ts (the third line); the restore described there takes it as it is:

    bash
    docker compose exec live-host mkdir -p /data/backups /data/workspaces
    docker compose exec live-host tar -C /data --exclude='.git/*.lock' -cf /data/backups/workspaces.tar workspaces
    docker compose exec live-host node -e "new (require('node:sqlite').DatabaseSync)('/data/live.db').exec(\"VACUUM INTO '/data/backups/live.db'\")"
    docker compose exec live-host sh -c 'cd /data/backups && sha256sum live.db workspaces.tar > SHA256SUMS'
    mkdir -p backups && chmod 700 backups
    docker compose cp live-host:/data/backups/. ./backups/
    docker compose exec live-host rm -r /data/backups

About 25 seconds without service, and every open tab reloaded. A 5.17 Live Host holds its editors' connections until its 25-second hard exit, so docker compose up -d (or the stop above) takes that long with editors open; an editor of the new release that is open sends what was typed meanwhile once the new release is up. A tab of 5.17 still runs 5.17's app: on a host served over https with a sign-in it does not reconnect, says that the server closed the live document and asks to reload the page, and after the reload everyone signs in once more (the session cookie's new name, below); what was typed into it after the stop began may not reach the host. Tell people before, or upgrade outside working hours, and have them stop editing for that minute and reload their tabs afterwards.

Compose and settings. DESIGNIQ_VERSION is required: without it in .env, compose refuses to start instead of pulling latest (copy the line from .env.example); this guard, the log rotation and Keycloak's loopback binding come with the new compose file (step 3). With the shipped Keycloak (--profile keycloak), set KEYCLOAK_ADMIN_PASSWORD in .env before the up: the compose file of 5.17 opened the admin console with admin when .env named no password, the new one has no default, and Keycloak refuses to start without it, restarting with Set KEYCLOAK_ADMIN_PASSWORD in deploy/.env in its log until you do, so nobody can sign in. A number or switch the Live Host cannot read (LIVE_SHUTDOWN_MS=25s, LIVE_MCP_READONLY=yes please) now stops the boot by name instead of switching its limit off. A second Live Host on the same data directory refuses to start (One Live Host per data directory). Each log line now starts with its time and level (Logs); a log parser that read the bare message needs the new format or LIVE_LOG_FORMAT=json. A stop that could not store a document exits with 1.

Also coming from 5.17 or older: the first start migrates live.db to schema 2, which keeps no credential at rest. A session is stored by the SHA-256 of its id (the hash itself signs nobody out), and an installation token only by a hosted cell, encrypted; the file is rewritten once (one VACUUM, a few seconds for a large live.db), so no copy taken after that rewrite holds what was taken out; a first start stopped before its rewrite leaves it to the next start (Data & backup). The rewrite needs free space at least the size of live.db on its volume (stat -c %s /data/live.db against df -k /data); with less, the start skips it with a warn line that names the bytes it needs, and every start tries it again: grow the volume or free the space before the upgrade. A host served over https signs every browser in once more all the same: its session cookie is now __Host-designiq_sid, which a page on a sibling subdomain can neither set nor overwrite, and the cookie of 5.17 or older is no longer read. A bearer session (VS Code, the session-token route) is kept, and plain http keeps the cookie's name. Schema 2 is readable from schema 1: a rollback to the release before, or to 5.17 or older, starts on this live.db without the backup, but finds none of the sessions, so everyone signs in again, and it keeps the session ids it hands out and the installation tokens it mints in live.db as they are until a newer release starts again and takes them out.

Also coming from 5.17 or older: proxy variables in the container's environment (HTTPS_PROXY, HTTP_PROXY, also those Docker adds from its own proxy configuration) now route the Live Host's own requests too, not only git's. Put the identity provider (keycloak with the shipped compose file), localhost and 127.0.0.1 on NO_PROXY first (corporate-network.md). A host with a GitHub App and no GITHUB_REPO no longer lists Miragon/design-iq. The connection limits no longer read a Fly-Client-IP header your proxy sets: name the proxy in LIVE_TRUSTED_PROXIES instead (Connection limits behind a proxy).

Health ​

GET /healthz: liveness plus a deep check: SQLite writability and disk headroom (<5 % free = degraded). 200 with status: "ok", or 503 with status: "degraded":

json
{ "status": "ok", "tenant": null, "liveDocs": 3, "sqlite": "ok", "diskFreeMb": 51234, "diskUsedPct": 37 }

sqlite is ok when a test write to live.db went through, else SQLite's error, such as attempt to write a readonly database.

The detail is public unless LIVE_HEALTH_SECRET is set: then a caller without Authorization: Bearer <LIVE_HEALTH_SECRET> gets only status (and the 200 or 503), as a liveness probe needs. Point a liveness probe at the status code; set the secret for your monitoring, which then reads the rest:

The git connections' state appears only to a caller who presents that secret, never in a public detail: it names when the GitLab token stops working and carries internal addresses in its reasons. connectionsDegraded is true while a connection could not be listed for 5 minutes, GitLab refuses its token or GitHub refuses the GitHub App's key. connections lists each connection the last sync could not list (its source, the reason, since when). gitlabToken says whether the GitLab takes GITLAB_TOKEN (ok with expiresAt, refused, or unknown while GitLab could not be asked), and gitlabTokenWarning appears within 14 days of its expiry. githubAppKey says whether GitHub takes the app's key (ok, refused with the reason and since when, or unchecked before the first request signed with it). None of this changes status: the host still serves and stores what people edit, and neither a restart nor a new image mends a broken connection, so a liveness probe must not restart it. Alert on connectionsDegraded, or on the ERROR and WARN lines the log writes for the same events. 503 stays for a host that cannot store.

websockets, also for the holder of the secret only, counts the live connections against their caps since the start (since): how many are open, signed in and waiting to sign in, the most that were open at once (peakOpen), the most one address had waiting at once (peakWaitingFromOneAddress: near LIVE_MAX_WS_PER_IP, an office behind one NAT meets the cap when everyone reconnects at once), each cap's value (limits) and the refusals per cap (refused, by setting). A refusal is also a WARN line (Connection limits behind a proxy).

sh
curl -H "Authorization: Bearer $LIVE_HEALTH_SECRET" https://design.example.com/healthz
json
{
  "status": "ok",
  "tenant": null,
  "liveDocs": 6,
  "sqlite": "ok",
  "diskFreeMb": 7797,
  "diskUsedPct": 38,
  "connectionsDegraded": false,
  "gitlabToken": { "state": "ok", "expiresAt": "2027-01-29" },
  "websockets": {
    "open": 23,
    "signedIn": 23,
    "waitingToSignIn": 0,
    "peakOpen": 60,
    "peakWaitingFromOneAddress": 41,
    "limits": { "LIVE_MAX_WS": 400, "LIVE_MAX_WS_PER_IP": 100, "LIVE_MAX_WS_PENDING": 100, "LIVE_MAX_WS_PER_USER": 40 },
    "refused": { "LIVE_MAX_WS": 0, "LIVE_MAX_WS_PER_IP": 0, "LIVE_MAX_WS_PENDING": 0, "LIVE_MAX_WS_PER_USER": 0 },
    "since": "2026-11-30T09:41:02.118Z"
  }
}

stores appears, with degraded, while a document could not be stored: live.db refused its history, its file could not be written (a permission, a full disk), or it grew past LIVE_MAX_DOC_BYTES. Each entry names the document, the reason, since when, and whether live.db has the change (inLiveDb). A REST or MCP save into such a document answers 503 instead of claiming success.

While its store fails, the Live Host keeps the document loaded, also after everyone has left it, and stores it again after 2 s, then at growing intervals up to every 30 s, until a store works; then the entry goes. What is kept until then:

  • inLiveDb: true (only the file refused it): live.db has the change and a restart keeps it, but the file, and so a release, lacks it until a store works (after a restart: with the document's next edit).
  • inLiveDb: false (live.db refused it, or the size limit): the change is only in the host's memory. A crash or a kill loses it.

On a stop (SIGTERM, SIGINT, SIGHUP) the host stores each such document once more and gives up on those that still fail, each named in the log (shutdown: gave up on <document>) and again in the closing line (flush complete ..., except N document(s) given up), and exits with code 1. A change that was only in memory is then lost. Free the disk or fix the permission before you restart, and watch for the entry to clear.

A stop otherwise takes about a second with editors open: the host refuses what still arrives on an open connection (503 with Retry-After: 5, /healthz included, and every WebSocket upgrade; only a sign-out still goes through), stores every open document, ends the editors' sockets (they reconnect to the next host on their own), closes live.db and exits with 0 and the line shutdown complete in <n>ms. Only what still hangs after LIVE_SHUTDOWN_MS (25 s) meets the hard exit, whose line says whether the documents were stored by then (... before the flush finished: documents may not be stored, exit code 1) or only a request was still running (... the flush had finished).

json
{
  "status": "degraded",
  "stores": [
    {
      "room": "acme/processes/processes/order.bpmn",
      "reason": "the file refused it: EACCES",
      "since": "2026-11-28T09:12:44.000Z",
      "inLiveDb": true
    }
  ]
}

A document nobody changed since it was opened or last stored is no failure: a read of a model over LIVE_MAX_DOC_BYTES, or one while live.db is briefly locked, keeps nothing loaded, since live.db or the file already holds what it says.

The log has one line when a document's store starts failing (not stored: <document>: <reason>), one when the reason changes, one an hour while it goes on (still not stored) and one when a store works again (stored again). The editors in the document see "Not saved" (or "Not written to file" when only the file refused it) instead of "Live". While the change is in the host's memory only, the browser asks before such a tab is closed: the tab holds the change too, and brings it back after a restart that lost it. VS Code shows a warning.

A document kept loaded with nobody in it does not block "Load latest": the reset discards its change with the other unreleased changes, and the repository page lists it among them before it asks. A conflict's "use main's version" retires such a document the same way. What such a document holds goes into live.db before its file is touched: a reset that fails (the remote does not answer, a git lock) loses none of it, and the document's next open writes it through. Only a change live.db itself refuses is gone then, and the log names it in an error line (load latest <repository> failed after it closed <document>). "Load latest" stores what the documents took in the last seconds before it lists what it discards, so an edit still on its way to the file is listed too. A reset whose cleanup fails after the files were reset (git clean or the host's own state in .git: permissions, a full disk) answers 500 sync/incomplete and says so: the files are main's, the documents take main's version at their next open, and a second "Load latest" finishes the cleanup.

A rename, a move or a delete waits for a store of the document that is still on its way, and a document that was loading meanwhile does not open at the old path: neither writes the old file back beside the moved one, or brings the deleted one back. A move or a delete of several models checks all of them before the first file moves or goes. A REST or MCP write that reaches the document while it closes is not applied and answers 409 content/moved with the new path (409 content/closed for a delete or a reset): read the model again and write there.

A document's file is written only when its text changed, and in one step (a temp file beside it, .designiq-<uuid>.tmp, renamed over it), so git, a release or the validator never read it half written. A temp file a killed host left behind is removed when the restarted host first uses that repository, and is never listed as a change.

In cell mode the secret is CELL_SECRET, which the control plane's fleet poll presents.

Restarts ​

A stop that runs (docker compose stop, up -d of a new release, SIGTERM) stores every open document first and loses nothing (above). What the host had not stored yet when it ends without a stop is lost: a kill -9, an out-of-memory kill, a crash, a power cut, a container runtime that kills before LIVE_SHUTDOWN_MS (keep stop_grace_period above it). The host stores an open document 2 seconds after its last edit, at most 10 seconds while someone keeps typing, so it is the edits of those last seconds. An editor that was open then and stays open sends them again when it reconnects, so nothing is lost for it; the edits of someone who closed their tab in the meantime are gone (in a test, a kill -9 while two people typed: about 6 seconds of their edits were not stored, and the tabs that stayed open sent them again).

The next start says that the one before did not finish a shutdown with every document stored, so the loss does not go unnoticed. It says so after a stop that ended without the shutdown, and also after a shutdown that met the hard exit before its flush finished or gave up a document whose store kept failing (Health, exit code 1 for both):

text
2026-11-30T12:01:07.350Z WARN  the Live Host before this one (process 1 on 4f2c9e1a7b3d, since 2026-11-30T08:12:44.003Z) did not finish a shutdown with every document stored: it was killed or crashed (kill -9, out of memory, a power loss), its shutdown met the hard exit after LIVE_SHUTDOWN_MS before the flush finished, or the flush gave up a document. Edits of its last seconds (up to 10 s, the store's debounce) are lost unless an editor that was open then sends them again; its last log lines say more (docs/on-prem/README.md, Restarts)

Look at the end of the previous container's log (docker compose logs live-host keeps it across a restart, not across a recreate) for the reason. A start after a boot that was refused (a setting it could not read) is no such case and says nothing, and neither is one after a crash whose shutdown stored every document: its log names the crash, and it exited with 1.

Model history and the size limit ​

Every change leaves a trace in a model's history, about 50 bytes for a move on the canvas, also once the text is back where it was; LIVE_MAX_DOC_BYTES (8 MB) counts the history. When an edit is refused at the limit and the model's own history fills 90 % of it or more, the host closes the model for everyone, and its next open starts a new history from the model's text: the text is the same, the history a fraction of its size, and the log says lineage renewed: <document> (its history was ..., now ...). A write over REST or MCP refused there (413 content/too-large, nothing applied) marks it the same way: the write goes in once the model was opened again while nobody had it open. A history that passes the limit while the model is open is stored renewed at once (lineage renewed in place) and its editors reload. A tab or VS Code window that still holds the old history (it was asleep or offline meanwhile) is told the history was renewed and reloads; what it changed while away is not applied. Below the limit a history is never renewed, so such a tab merges what it changed. With 8 MB this takes something like 150 000 edits of one model. A model whose text alone is that large is not renewed (the log says so); it needs a higher LIVE_MAX_DOC_BYTES.

Logs ​

The Live Host writes its log to the container's stdout and stderr (docker compose logs), one line per entry: time, level, message.

text
2026-11-29T09:12:44.123Z INFO  content saved: acme/processes/processes/order.bpmn by @petra [req 7f3c1a2e-...]
2026-11-29T09:12:45.002Z WARN  security: 401 auth/wrong-tenant on GET /api/repos: ...
2026-11-29T09:12:46.310Z ERROR 500 on POST /api/repos/acme/processes/release/order: ... [req 1b2c...]
  • Levels. error is the host's own failure (a 5xx answer, an error nothing caught, a git connection that cannot be listed, a GITLAB_TOKEN GitLab refuses), warn needs a look (a probe at the tenant boundary, a model written while it is no well-formed XML, the startup report's warnings, a connection refused at a cap, a start after a Live Host that did not finish its shutdown, a GITLAB_TOKEN that expires within 14 days), info is everything else, a request refused with a 4xx included (401 auth/token-expired on POST /mcp: ...): an expired token is no server error. So is a live connection closed because its session ended, its token expired or its right was taken away (closing connection ... because of exception ConnectionEnded: ...), or because its client brought the history of a document it no longer has (history before its renewal, history of another document). A line that reports a change not stored is an error line (not stored:, still not stored, shutdown: gave up on, flush complete ..., except, a flush that failed or did not finish, a stop that exits with 1), so LIVE_LOG_LEVEL=warn keeps it. LIVE_LOG_LEVEL drops what is below it. Alert on error lines and on a stop's exit code 1; look at warn lines daily.
  • Requests. Every HTTP request has an id: the proxy's or client's X-Request-Id when it sends a plain one, else a new one. The response carries it back (X-Request-Id), and every line logged for the request ends with [req <id>], so a proxy's access log and a user's error report lead to the same lines. An error the host did not expect (a git command that failed, a file it could not write) answers 500 with {"error": "internal error (request <id>)", "requestId": "<id>"} and nothing more, signed in or not: its detail (command lines, paths under /data and /tmp, a git host's answer) is only in the error line under that id. A clone of a repository its git host no longer has answers 404 repo/not-connected and reads the connected repositories again; an issue tracker that fails or cannot be reached answers 502 todos/provider-unreachable.
  • A refusal to start (a LIVE_* value that cannot be read, another Live Host on the data directory) is one error line with its time, one JSON object under LIVE_LOG_FORMAT=json: the Live Host did not start: <reason>. The exit code is 1.
  • JSON. LIVE_LOG_FORMAT=json writes one object per line (time, level, msg, requestId) for a log collector.
  • What a client sends cannot forge a line. A newline or a terminal escape in a room name, a path or a header is written as \n or \u001b, and a line is at most 8192 characters. What anyone who reaches the port can cause is logged 20 times a minute at most per kind, then counted in one line: a refused WebSocket sign-in or upgrade, what a connection that has not signed in sends and the host cannot read (a frame or a message, its first line only, never a stack), and a request refused before any sign-in (a bearer token the IdP did not issue; its path cut at 300 characters). A room name is logged only once its connection signed in.
  • Rotation. The compose file keeps at most 5 files of 10 MB (json-file driver). With plain Docker, pass --log-opt max-size=10m --log-opt max-file=5; in Kubernetes, the kubelet rotates.

Read-only MCP server ​

Besides the Live Host's /mcp, this repository has a small MCP server of its own (packages/mcp): it serves the models of one content checkout, read-only, with the derived process and decision views, without a login, live sessions or a git host. It suits an AI client that should read a repository's released state, on a machine that has no Live Host. For people who edit, use the Live Host's /mcp (AI clients).

There is no published image: build it from the release you run, at the repository's root (the root Dockerfile):

bash
git clone --depth 1 --branch vX.Y.Z https://github.com/Miragon/design-iq.git
docker build -t designiq-mcp:vX.Y.Z design-iq

Run it against a checkout of your content repository, mounted read-only. In a container it listens on every interface, so it starts only with a token, which clients send as Authorization: Bearer <token>. Make the token first, into a file only you can read, and hand the container that file:

bash
git clone https://gitlab.example.com/acme/modeling/models.git /srv/designiq-content
(umask 077 && echo "MCP_TOKEN=$(openssl rand -hex 24)" > mcp.env)   # the token, readable by you alone
docker run -d --name designiq-mcp --restart unless-stopped \
  -p 127.0.0.1:8302:8080 --env-file mcp.env \
  -e DESIGNIQ_CONTENT_ROOT=/content -v /srv/designiq-content:/content:ro \
  designiq-mcp:vX.Y.Z
cut -d= -f2 mcp.env   # the token for the people who may read the repository

Each of them adds the server to their AI client with that token:

bash
claude mcp add --transport http designiq-content https://mcp.example.com/mcp --header "Authorization: Bearer <the token from mcp.env>"
  • Content. DESIGNIQ_CONTENT_ROOT names the checkout (a root designiq.yml). Always set it: without it the server has only the example content baked into the image to serve, and behind MCP_TOKEN it refuses to start rather than serve that. Outside the image, node packages/mcp/http.ts --root <path> names the checkout as well. Clone a private repository with a read-only credential (a GitLab deploy token or a GitHub fine-grained token with contents: read). The server reads the files at every request, so a git -C /srv/designiq-content pull (a cron job, every few minutes) is all a refresh takes, without a restart.
  • Access. One token for everyone who may read the repository. Run the server behind a TLS proxy as the Live Host (127.0.0.1:8302 above). To rotate the token, write a new one into mcp.env as above and create the container anew (docker rm -f designiq-mcp, then the docker run): a restart keeps the token it was created with. MCP_PUBLIC=1 instead of a token serves content meant to be public. GET /healthz answers without the token.
  • Compose. The commented mcp service in deploy/docker-compose.yml has the same shape; set its image: to the one you built.