Configuration reference
Every environment variable the Live Host reads, grouped by concern. Defaults in parentheses are the source defaults (apps/live-host/src/server.ts is the only place that reads env); the Docker image overrides two of them (PORT=8080, LIVE_DATA_DIR=/data). The annotated deployment template is deploy/.env.example.
See the install guide, github-app-setup.md for obtaining the GitHub App values and gitlab-setup.md for the GitLab ones.
Numbers and switches are read strictly. An unset or empty variable takes its default; any other value must read as what the variable is, or the Live Host does not start and names the variable and the value (LIVE_SHUTDOWN_MS must be a whole number from 1 to 2147483647 (got "25s")). Before, such a value switched the limit off without a word. A number is written in digits, without a unit; a time in milliseconds is at most 2147483647 (about 24.8 days), the longest delay a timer keeps. A switch is 1 or 0 (also true/false, yes/no, on/off, in any case).
Startup report
When the Live Host is up it prints one banner. mode is the operating mode your settings select, with the names of the operating modes: no auth (LIVE_AUTH=none) with a single repo, the GitHub App or a GitLab, OIDC + GitHub App, OIDC + GitLab, OIDC + GitHub App + GitLab, or cell. Below the OIDC modes, next mode lists the settings the one above still needs. With a GitLab, the gitlab line names its URL, the access token with the day it expires (as GitLab says at the start), and the groups it is narrowed to; it says access token REFUSED when GitLab does not take the token, and NOT reachable when the start could not list its projects. Every warning names a setting that is only half there and what stays off because of it. A secret shows up only as set or missing, never with its value. A setting the server cannot run with still stops it with an error, as before. When LIVE_AUTH=oidc refuses the start (no IdP, no GitHub App, or only one of LIVE_OIDC_ISSUER and LIVE_OIDC_JWKS_URL), the warnings print just before the error, since one of them is often the reason.
──────────────────────────────────────────────────
Live Host ready (single port)
mode : no auth (LIVE_AUTH=none), GitHub App
next mode : OIDC + GitHub App, missing LIVE_OIDC_ISSUER, LIVE_OIDC_JWKS_URL and LIVE_OIDC_CLIENT_ID; then set LIVE_AUTH=oidc
host repo : acme/processes (cloned)
data dir : /data
endpoint : https://design.example.com (HTTP + WebSocket, one port; listening on port 8080)
repos : acme/processes, acme/architecture
minting : local (app key)
auth : NONE (LIVE_AUTH=none): every request is @petra, every repository writable; local evaluation or a trusted network only
mcp : POST /mcp
egress : direct (no HTTPS_PROXY)
ws limit : 400 connections; 100 per address until sign-in, 40 per user after (LIVE_AUTH=none: per address throughout)
client ip : the socket address (LIVE_TRUSTED_PROXIES is not set)
room name = <owner>/<repo>/<path>, Y.Text field 'content'
warning : GITHUB_WEBHOOK_SECRET is missing: POST /webhook/github answers 503, so installation changes show up on Refresh or within 10 minutes (the safety-net sync)
──────────────────────────────────────────────────| Warned about | When | What stays off |
|---|---|---|
GITHUB_APP_ID and the app private key | one without the other | the GitHub App connection (single-repo mode) |
GITHUB_WEBHOOK_SECRET | the App is connected, the secret missing | webhooks (503): changes on Refresh or within 10 min |
GITHUB_APP_SLUG | the App is connected, the slug missing | the overview's "Add repository" button |
LIVE_OIDC_AUTHORIZE_URL and LIVE_OIDC_TOKEN_URL | one without the other | skipping discovery: the other endpoint still uses it |
LIVE_OIDC_AUDIENCE | an Entra ID v2 issuer without it (entra-id.md) | sign-ins: a v2 token's audience is the client id |
LIVE_MCP_SCOPES, LIVE_MCP_CLIENT_ID | an Entra ID issuer without them, or a scope of another resource (entra-id.md) | AI clients: Entra ID refuses their sign-in |
LIVE_OIDC_ALLOWED_CLIENTS | LIVE_MCP_CLIENT_ID not in it | AI clients given the dialog's command |
SESSION_ENC_KEY | LIVE_AUTH=oidc without it | logins in flight surviving a restart |
LIVE_OIDC_* | set under LIVE_AUTH=none | all of them: a host without auth has no login |
CELL_SECRET and TOKEN_MINT_URL | the secret without the URL | remote token minting |
TENANT_INSTALLATION_ID | no token mint and no App key | every repository |
GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET | either one set | retired by ADR 0007, not read: remove them |
HTTPS_PROXY, HTTP_PROXY, NO_PROXY, ALL_PROXY | only HTTP_PROXY or ALL_PROXY, no URL, both spellings differ, a range or *. in NO_PROXY | the same route for the Live Host and git |
NODE_EXTRA_CA_CERTS | unreadable, a certificate in it that cannot be read | the internal CA (or that certificate), for Node and git |
LIVE_TRUSTED_PROXIES | an entry that is no address, range or word | that entry |
GITLAB_TOKEN | GitLab refuses it (expired, revoked) | listing, releasing and todos on the GitLab |
GITLAB_TOKEN | it expires within 14 days | nothing yet: renew it before that day |
GITLAB_URL | the start could not list its projects (no answer, an untrusted certificate) | new projects, until a later sync lists them |
Core
| Variable | Default | Meaning |
|---|---|---|
PORT | 8301 (image: 8080) | The one port for everything: REST API + WebSocket sync + web app. |
LIVE_PUBLIC_URL | http://localhost:$PORT | Must be the public HTTPS URL in production. The OAuth callback and webhook URLs derive from it, and session cookies are only marked Secure when it starts with https. |
LIVE_DATA_DIR | <repo>/.live (image: /data) | Host-owned state: live.db (Yjs lineages, sessions by the hash of their id, repo registry; no working credential, see Data & backup) + workspaces/ (cloned repos). Mount a volume here. |
LIVE_AUTH | oidc | The authentication mode (ADR 0007). oidc: the identity provider is the one login. It requires the LIVE_OIDC_* block below and a git connection, a GitHub App or a GitLab (per-repo authorization runs on it); the server refuses to start without both. none: no authentication. Every request, WebSocket join and MCP call is the local principal and every registered repository is writable. Local evaluation or a trusted single-team network only. Never inferred from missing configuration. |
LIVE_LOCAL_USER | the OS user name | LIVE_AUTH=none only: the login of the local principal. Release commits and todos are attributed to it, so use your GitHub login. In a container the OS fallback is root/node: set it. |
GITHUB_REPO | Miragon/design-iq | Static repository (<owner>/<repo>) the host serves without an App: the single-repo mode. Registered when set, and with its default only on a host whose GitHub App cannot enumerate installations. With an App, leave it unset and the installations name the repositories. A static entry an earlier start registered under another name leaves the registry at the next start. |
BASE_BRANCH | main | Default branch recorded for the static fallback repo (release PRs target the repo's default branch). |
LIVE_HOST_CONTENT_DIR | <repo> (the checkout root) | Serve a local content checkout in place of cloning GITHUB_REPO. Takes effect only when the directory has a root designiq.yml (or legacy bpmiq.yml). Dev mode; not for production. |
GitHub App mode
App id + private key switch the server into multi-repo mode: installation enumeration drives the repo overview, per-(user,repo) authorization runs on installation tokens (ADR 0001), and webhooks keep the connected set current. Setup walkthrough: github-app-setup.md.
| Variable | Default | Meaning |
|---|---|---|
GITHUB_APP_ID | — | The app's numeric id. |
GITHUB_APP_SLUG | — | The app's URL slug; powers the "connect repository" install-picker link. Without it users can't add repos. |
GITHUB_WEBHOOK_SECRET | — | Verifies POST /webhook/github (HMAC SHA-256). The receiver fails closed: no secret configured = webhooks refused with 503. |
The app private key is resolved by the shared loader (packages/github-app/src/index.ts, loadPrivateKey). The first match wins:
GITHUB_APP_PRIVATE_KEY: the raw PEM (a double-quoted multi-line.envvalue; must containPRIVATE KEY)GITHUB_APP_PRIVATE_KEY_FILE: path to a.pemfile (mount the key as a file/secret)GITHUB_APP_PRIVATE_KEY_B64: base64 one-liner (env-only deploys; what the guided setup writes)- the first
*.pemfound inapps/live-host/: local-dev convenience for source checkouts, not relevant in the container
LIVE_WEBHOOK_URL is read only by the create-app tool (it sets the webhook URL in the app manifest, defaulting to $LIVE_PUBLIC_URL/webhook/github when the public URL isn't localhost). The running server always receives webhooks at /webhook/github.
OIDC: token auth (MCP & headless) + browser SSO
Connects the Live Host to your identity provider (Keycloak, Entra ID, WorkOS, Auth0, …, with your directory, GitHub or GitLab behind it), for two things on ONE identity contract. No IdP yet? idp-quickstart.md ships a Keycloak realm with these values filled in; Microsoft Entra ID: entra-id.md.
- Token auth: MCP clients and other headless callers authenticate with an audience-bound JWT. The Live Host only verifies tokens (a resource server); it never runs its own authorization server.
- Browser SSO (
LIVE_OIDC_CLIENT_ID): the web login runs the IdP's hosted flow (authorization code + PKCE). The flow's access token is validated by the same verifier as MCP bearers: same issuer, audience and login claim, fail-closed. It is the only browser login (ADR 0007): inoidcmode all three variables are required.
Identity is not authorization: per-repo write permission is still checked app-side against the git host's own permissions (the GitHub App's installation token, GitLab membership through GITLAB_TOKEN), which requires a git connection (OIDC sessions hold no user token). The login claim names the person at that git host. When configured, the server publishes RFC-9728 protected-resource metadata at /.well-known/oauth-protected-resource and 401 responses carry WWW-Authenticate: Bearer resource_metadata="…", so MCP clients discover your IdP automatically. A verified, click-by-click IdP setup (WorkOS AuthKit) lives in extending/mcp-idp-setup.md. Decision record: ADR 0005.
| Variable | Default | Meaning |
|---|---|---|
LIVE_OIDC_ISSUER | — | The IdP's issuer URL (expected iss claim). Must be set together with LIVE_OIDC_JWKS_URL; one without the other refuses startup. |
LIVE_OIDC_JWKS_URL | — | The IdP's JWKS endpoint, used to verify token signatures. |
LIVE_OIDC_AUDIENCE | LIVE_PUBLIC_URL | The audience (aud) tokens must be bound to: this instance. |
LIVE_OIDC_LOGIN_CLAIM | github_login | The claim with the login at the git host: the GitHub login, or the GitLab username on a GitLab-only host. IdP-populated, never user-editable. A token without it is refused, with no fallback. |
LIVE_OIDC_CLIENT_ID | — | Required in oidc mode: the web login runs the IdP's code+PKCE flow; the flow's access token is verified by the issuer/JWKS pair above. |
LIVE_OIDC_CLIENT_SECRET | — | Optional: set for a confidential client (Keycloak default); unset = public client, PKCE only. |
LIVE_OIDC_AUTHORIZE_URL | discovery | Explicit authorize endpoint. Default: resolved from <issuer>/.well-known/openid-configuration (lazily, cached). Set both URL overrides for air-gapped hosts. |
LIVE_OIDC_TOKEN_URL | discovery | Explicit token endpoint (see above). |
LIVE_OIDC_SCOPE | OIDC scopes | The browser sign-in's authorize scope, default openid profile email. Entra ID needs a scope of designIQ's own app registration in it (entra-id.md). |
LIVE_OIDC_ALLOWED_CLIENTS | none | Optional hardening: only tokens issued to these client applications are taken, comma-separated, compared with the token's azp, else appid (Entra ID's v1 tokens), else client_id (RFC 9068, WorkOS AuthKit): exactly, except that a GUID (Entra ID's) is compared in any case. An IdP that names the client in another claim only (Okta's cid) cannot use it yet: every token would be refused. List the browser sign-in's own client (LIVE_OIDC_CLIENT_ID; startup refuses a list without it) and each AI client's (LIVE_MCP_CLIENT_ID); any other is refused with 401 auth/client-not-allowed and a security: log line. It limits app registrations, not software: any program can use the id of a listed public client. Unset: every client the issuer and the audience admit. Entra ID: entra-id.md. |
LIVE_OIDC_LOGIN_LABEL | SSO | The web client's login-button label (e.g. "Acme SSO"). |
LIVE_OIDC_LOGOUT | local | idp: a browser's sign-out ends the IdP's session too (Sign-out); local: designIQ's only. Other values refuse startup. |
LIVE_OIDC_LOGOUT_URL | discovery | The end-session endpoint for LIVE_OIDC_LOGOUT=idp, as the browser reaches it. Default: end_session_endpoint from discovery. No absolute http(s) URL: startup refuses. |
LIVE_MCP_READONLY | 0 | 1 = the MCP endpoint registers no write tools (absent from tools/list, not erroring). |
LIVE_MCP_BPMN_EDIT | 0 | 1 = the MCP endpoint also registers the semantic BPMN tools get_process_outline, edit_process and layout_process (ADR 0009; opt-in until their benchmark gate has run). |
LIVE_MCP_SCOPES | none | The scopes the 401 challenge and the protected resource metadata tell AI clients to ask for, separated by spaces or commas. Unset: none, which suits an IdP that issues designIQ's audience without one. Entra ID needs designIQ's scope under the Application ID URI <LIVE_PUBLIC_URL>/mcp (entra-id.md); the startup report warns without it. |
LIVE_MCP_CLIENT_ID | none | The IdP's pre-registered client for AI clients (Keycloak: designiq-mcp, Entra ID: the AI clients' app registration): the Connect an AI client dialog puts it into its Claude Code command. Unset where the IdP registers clients. |
LIVE_MCP_CALLBACK_PORT | none | The callback port registered on that client (http://localhost:<port>/callback, Keycloak: 8765): the dialog's command passes it as --callback-port. |
The IdP-side requirement is identical for both entrances: access tokens must be JWTs carrying the audience and the login claim (Keycloak: an audience mapper + a user-attribute mapper on the client; Entra ID: a claim fed from a directory attribute, entra-id.md; WorkOS: a JWT template). What works for /mcp works for the browser login and vice versa. MCP clients and how to register them: Connect an AI client.
Sign-out, session end and revoked access
A designIQ session lasts 12 hours from its sign-in and is not extended. A sign-out (the web app's Logout, an editor's sign-out) ends it and every live connection it holds at once. What another tab of the same browser shows depends on what it holds: an editor with changes the host has not confirmed yet keeps them, says that the session ended, and sends them once the person signs in again (in that tab or another); a tab without such changes turns into the sign-in page. VS Code says the session ended and asks to sign in again. The tab that signed out leaves the page it was on. The end of a session, a person's sessions deleted (forget-user.ts) and a write right taken away at GitHub or GitLab end the live connections of those sessions as well: their next edit is refused, a connection that only reads ends within 30 seconds. A right taken away counts once the host learns it: at once on a webhook it receives (an installation's repositories, a GitLab membership), else when its cached answer expires after 5 minutes. A GitHub or GitLab that cannot answer ends no connection; only a definite no does. A GitLab that refuses GITLAB_TOKEN (it expired or was revoked) cannot answer either: it says nothing about any person. No restart is needed to end a stored session's connections, and a sign-out goes through while the host stops too, when it answers every other request with 503.
designIQ ends only what it stores. Two things outlive a sign-out and forget-user.ts:
- An MCP client's access token.
/mcpand the REST API check a bearer JWT at every request against the token alone (signature, issuer, audience, expiry), so it works until itsexp(while the Live Host can check it, below), and so does the live room of an MCP-App widget it opened. At that expiry the widget mints a new ticket with the client's next token; a client that gets none from the IdP ends there. - A sign-out or a disabled account at the IdP. It stops new sign-ins and new tokens. designIQ receives no back-channel logout: a stored session runs on until its 12 hours are up.
To cut someone off at once (offboarding, a lost device): disable the account at the IdP, run forget-user.ts for them (their stored sessions end, their live connections within 30 seconds), and give MCP clients short-lived access tokens: Keycloak's Access Token Lifespan (realm or client; the quickstart realm sets 60 minutes), Entra ID's 60 to 90 minutes or less with a token lifetime policy. A write right taken away at GitHub or GitLab stops the remaining writes, bearer tokens included, once the host learns it.
By default a sign-out leaves the identity provider's own session, as single sign-on does everywhere: signing in again in the same browser asks for no password. Where people share a device (a workshop room's computer), set LIVE_OIDC_LOGOUT=idp: the browser then goes on to the IdP's sign-out (its end_session_endpoint, with client_id and post_logout_redirect_uri=<LIVE_PUBLIC_URL>/) and comes back to the start page. Register <LIVE_PUBLIC_URL>/ at the IdP: one that does not know the return refuses the sign-out itself, shows its error page and keeps its session, so the next person at that device is signed in as the one before. Sign out once after setting it up, and sign in again: the IdP asks for the password.
- Keycloak: the client's Valid post logout redirect URIs (the quickstart realm has
http://localhost:8301/, for any otherLIVE_PUBLIC_URLreplace it); without it Keycloak answers Invalid redirect uri. Keycloak asks the person to confirm the sign-out: the host keeps no ID token to send asid_token_hint. - Entra ID: a redirect URI of the app registration. Entra asks which account to sign out, and signs it out of every Microsoft application in that browser, which is why the option is off by default.
When the identity provider is down
designIQ checks a sign-in and a bearer token at the identity provider's keys, not at every request at the IdP itself. While the IdP cannot be reached:
- Signed-in browsers and VS Code go on. A stored session needs no IdP until its 12 hours are up, also across a restart of the Live Host.
- A new sign-in waits for the IdP, and so does an MCP client that needs a new token.
- An MCP client's current token works while the Live Host holds the IdP's signing keys, which it fetches at the first token it checks and keeps in memory. A Live Host that restarted during the outage has none yet: every bearer token then gets
502auth/idp-unreachableuntil the IdP answers again (not401, so the client starts no new sign-in that would fail the same way). Avoid restarting the Live Host while the IdP is down.
The log names the cause (502 auth/idp-unreachable on POST /mcp: ... getaddrinfo EAI_AGAIN keycloak), and corporate-network.md has the usual ones (a proxy, an untrusted certificate).
GitHub Enterprise
| Variable | Default | Meaning |
|---|---|---|
GITHUB_BASE_URL | https://github.com | Web base: login, install picker, git clone URLs, and a document's links to its models on GitHub, which open in designIQ. |
GITHUB_API_URL | https://api.github.com | REST API base. |
Corporate network
Walkthrough: corporate-network.md.
| Variable | Default | Meaning |
|---|---|---|
HTTPS_PROXY | none | Egress proxy for https requests, http://[user:password@]host:port (reserved characters percent-encoded; no scheme counts as http://). The Live Host routes its own requests through it (GitHub or GitLab API, token minting, the identity provider); git reads it itself. Lower case https_proxy wins over it when both are set. |
HTTP_PROXY | none | Proxy for plain http:// targets. Set alone, the Live Host's own https requests use it too but git's do not: set HTTPS_PROXY. |
NO_PROXY | none | Hosts reached directly, comma-separated: names, domain suffixes (.acme.internal), single IP addresses. Ranges (10.0.0.0/8) work for git only, *. wildcards for the Live Host only. Put every internal host here, with the shipped compose file keycloak, localhost and 127.0.0.1. |
NODE_EXTRA_CA_CERTS | none | PEM file with the internal CA certificate(s), mounted into the container. Node adds them to the public roots; for git the Live Host writes the public roots plus these into /data/ca-bundle.pem (servers and an https:// proxy). Set in the container's environment. |
GIT_SSL_CAINFO | none | git's own CA bundle, used as it is. Set it only to give git a different bundle than the one built from NODE_EXTRA_CA_CERTS. |
GitLab (self-managed or gitlab.com)
The setup on the GitLab side, step by step (the token, the system hook, the commit email host name, the login claim): gitlab-setup.md.
| Variable | Default | Meaning |
|---|---|---|
GITLAB_URL | none | The GitLab's web address, e.g. https://gitlab.example. Set together with a token, it connects the GitLab: alone, or next to a GitHub App on the same host. |
GITLAB_TOKEN | none | The platform's credential: a group access token (scope api, role Developer or more) on the group that holds the content repositories, or a bot user's personal access token. Every connected project is cloned, released and filed todos on with it; merge requests and issues are authored by its bot user, the person is named in the text. GITLAB_TOKEN_FILE reads it from a file instead. Renew it before it expires (GitLab allows a year): see When the GitLab token expires. |
GITLAB_GROUPS | none (every project it sees) | Only projects below these group paths, comma-separated (acme/modeling). Name a group that holds the content repositories: a project counts only with a root designiq.yml on its default branch, so code projects next to them stay out, and so does a project GitLab keeps for its delayed deletion. |
GITLAB_WEBHOOK_SECRET | none (no webhooks) | The secret token of a webhook to https://<host>/webhook/gitlab with member and project events: a group webhook (GitLab Premium and Ultimate) or an instance system hook (an administrator, any edition). A project added or removed then shows up at once instead of within 10 minutes. Project webhooks do not carry these events. On a system hook, turn off the push, tag push, merge request and repository update triggers (GitLab ticks repository update by default): the Live Host ignores those events, and they come for every project of the GitLab. |
GITLAB_COMMIT_EMAIL_HOSTNAME | users.noreply.<GitLab host> | The host name of the GitLab's private commit emails. Set it whenever the GitLab's own (Admin area, Settings > Preferences > Email, custom hostname for private commit emails) is not users.noreply.<GitLab host>: after an administrator changed it, and after the GitLab moved to a new URL, since GitLab keeps the one it was installed with. Release commits name the person by that address, and GitLab attributes one with another host name to nobody. Unset, the log names the host name it derived at the first release. |
LIVE_OIDC_GITLAB_LOGIN_CLAIM | none (the login is GitLab's) | Where the IdP puts a person's GitLab username. Required on a host with a GitHub App and a GitLab (it does not start without it): name the same claim as LIVE_OIDC_LOGIN_CLAIM if the logins are the same on both. A person whose token lacks the claim has no GitLab identity and writes no GitLab repository. |
Which projects are connected, and when the Live Host learns of a change: the projects the token's user is a member of with Developer or more, below GITLAB_GROUPS, that have a root designiq.yml (or the older bpmiq.yml) on their default branch and are not waiting for GitLab's delayed deletion (GitLab 18 and later rename such a project to <name>-deletion_scheduled-<id> and keep it for days). The Live Host lists them at its start, after each webhook delivery about projects and members (one that comes within 10 seconds of a listing gets a listing right after it, so none is lost), when a person presses Refresh on the start page, and every 10 minutes. A push is no such event: a project whose designiq.yml is pushed after it was created and its members added shows up with the next of these. A project whose designiq.yml was removed leaves within an hour (a project's yes is kept that long) or at the next start. A listing that fails (GitLab unreachable, its certificate not trusted, the token refused) is an ERROR line when it starts failing, /healthz reports it to the holder of LIVE_HEALTH_SECRET (connectionsDegraded after 5 minutes, Health), the start page tells people that the connection is down, and it is tried again after 30 seconds, then at doubling intervals up to the 10 minutes. The repositories stay connected meanwhile. A delivery the Live Host refuses (no or a wrong X-Gitlab-Token) is a log line webhook refused on /webhook/gitlab: X-Gitlab-Token does not match GITLAB_WEBHOOK_SECRET (event ...), throttled like other refused requests.
Who may write a GitLab repository: a person whose effective membership in the project is Developer or more, inherited from a group included. The person is the GitLab user named by the login claim (or LIVE_OIDC_GITLAB_LOGIN_CLAIM): the IdP must issue the GitLab username, for example from the same user directory GitLab signs in with. Releases open merge requests from a release/… branch: Developer is enough for the token unless that branch name is protected or a push rule refuses it. Then the release says GitLab's reason (You are not allowed to create protected branches on this project) and that a maintainer has to let the token push release/*. A refusal of GitLab's that passes on its own (The repository is temporarily read-only, while GitLab moves the repository, or its internal API unreachable while it restarts) says GitLab's reason and to try again in a moment. Each release branch has a name of its own (the title, the time and six random characters), so people releasing at the same moment never meet on one (should a release in flight hold the name all the same, the other answers 409 release/busy and asks to release again in a moment); GitLab sees a branch pushed a moment ago only shortly after, and the merge request is opened on the next try. A release that ships every file of an earlier release still open closes that merge request with a note naming the new one, and the new description lists the open releases of the same files. The release commit is the person's: its author is their private commit email (<user id>-<username>@users.noreply.<GitLab host>), which GitLab shows with their avatar and profile link whatever commit email they chose, and which names no address of theirs. A merge request's description quotes what people wrote: test case names, model names and paths, validation findings. None of it acts on the GitLab: a line that starts with / gets an invisible word joiner before the /, so no quick action runs with the token's rights, and each name is a code span whose closing keywords have no-break spaces (fixes #12 closes nothing on merge) and in which no @mention notifies anyone. The release's title and commit subject keep to one line, with the same closing keywords inert, and a title that mentions someone is a code span. The releaser's name in the commit message keeps to one line with its closing keywords inert too. The merge request names the releaser by their GitLab username. The web app and the merge request speak GitLab's terms on a GitLab's repository (a merge request, !12), and the merge request's text claims no self-approval: the project's protected branch and approval rules decide who merges it (on GitLab Free a Developer cannot merge into a protected default branch, and code owners need Premium).
Todos on a GitLab project are its issues, filed by the token's bot user with the person named in the text. The project's issue templates (.gitlab/issue_templates/*.md, and any the instance or group offers) are the todo's types, each a description prefilled with its text. A template's quick actions that set the issue's fields (/label, /confidential, /milestone, /assign with a name, /due, /weight, /epic, /iteration, /health_status, /estimate) apply when the todo is filed, as in GitLab's own form: they open the issue's text, where nothing the person writes after them can hide them. The others, and any naming me (the bot here), do not. A quick action in a person's own text never runs: it would run with the bot's rights, so every line of it that starts with / (after any blanks) gets a word joiner (U+2060) before the /, which GitLab shows as nothing, in a code block too, and designIQ reads back as written. It stays when someone saves the issue from GitLab's rich text editor, and so does the todo's anchor, which that editor rewrites; so does the text, whose Markdown characters that editor escapes (\~, \*, a paragraph's leading \-\>, a backslash as \\) and whose 📍 links it writes as :round_pushpin:. designIQ undoes those escapes only in a description that editor saved (it writes the anchor's comment as <!--bpmiq:todo, or a link as :round_pushpin:), outside code blocks: in a todo nobody saved there, a backslash the person wrote stays. The note a closed todo gets is escaped the same way. A todo, and the note a close leaves, name the person by their GitLab username. Only an open issue labelled todo is closed as a todo (once, with one note); any other issue number is answered 404 with todo #<number> not found in <project>. Projects in subgroups (acme/modeling/flows) open like any other. A repository name that a GitHub App and the GitLab both list stays with the connection that had it first; the log names it, and one of the two should be renamed.
When the GitLab token expires
GitLab ends an access token at the start of its expiry day, and a revoked one at once; it then refuses every request with 401. The Live Host reads the token's expiry from GitLab (GET /personal_access_tokens/self) at its start and once a day: the startup report shows the day, and within 14 days of it each check writes a WARN line GITLAB_TOKEN expires on <day> (in <n> days): ... and /healthz carries it as gitlabTokenWarning (for the holder of LIVE_HEALTH_SECRET). A start while GitLab did not answer (it takes minutes to start after a site restart) asks again as soon as GitLab answers a request, and the log names the day then: GitLab takes GITLAB_TOKEN (<url>): it expires on <day>. Put the renewal in a calendar with the person who does it.
Once GitLab refuses the token, the Live Host writes one ERROR line that names GITLAB_TOKEN, /healthz shows connectionsDegraded: true with gitlabToken: { "state": "refused" } to the holder of LIVE_HEALTH_SECRET (its status stays ok: a restart does not mend it), and the start page tells everyone that the connection to GitLab is broken. Nobody counts as having lost their access: open live connections stay and people keep the access they last had, for up to a day (access answers). Listing projects, releases, todos and fetching from GitLab fail until a new token is set. Create one (scope api, role Developer), put it in GITLAB_TOKEN (or the file GITLAB_TOKEN_FILE names) and restart the Live Host.
Security & limits
| Variable | Default | Meaning |
|---|---|---|
SESSION_ENC_KEY | random per boot | HMAC key for the browser-bound login state, so a restart or redeploy mid-login keeps in-flight logins valid (the name predates ADR 0007; nothing is encrypted any more, because no credential is stored). Fallback: CELL_TOKEN_KEY. Set it explicitly in production. |
LIVE_HEALTH_SECRET | none | Secret for the detail of GET /healthz: set, a caller without Authorization: Bearer <secret> gets only status and the 200 or 503. Unset, the detail is public but for the git connections' state (connectionsDegraded, connections, gitlabToken, gitlabTokenWarning, githubAppKey) and the live connections' counts (websockets), which only the holder of a set secret reads (Health). A liveness probe needs no secret. |
LIVE_MAX_DOC_BYTES | 8000000 | Per-room document size cap (DoS guard), enforced at ingest and at persist. A model's history counts, not only its text: once an edit or a write is refused at the cap while the history fills 90 % of it, the history starts anew from the text at the model's next open (Health). |
LIVE_MAX_WS | 400 | Global WebSocket connection ceiling. Every LIVE_MAX_WS* value must be a positive whole number, or the Live Host does not start. A connection refused at any of these caps is a WARN line that names the setting, once per cap and address (or person) a minute. |
LIVE_MAX_WS_PER_IP | 100 | WebSocket connections from one network address that have not signed in yet. A signed-in connection counts against its user instead. The address is the socket's peer, or, from a proxy in LIVE_TRUSTED_PROXIES, the client the proxy names. Behind one NAT or proxy address, set it to that address's peak number of sockets: everyone reconnects at once after a restart (Connection limits behind a proxy). |
LIVE_MAX_WS_PER_USER | 40 | WebSocket connections of one signed-in user. A browser tab with a board open holds two. Above it, the editor asks the person to close other tabs. Not applied under LIVE_AUTH=none, where everyone is the one local user. |
LIVE_MAX_WS_PENDING | a quarter of LIVE_MAX_WS, at least LIVE_MAX_WS_PER_IP | WebSocket connections, host-wide, that have not signed in yet. A connection that has not signed in 15 seconds after it opened is closed. Neither applies under LIVE_AUTH=none. |
LIVE_TRUSTED_PROXIES | none (cell: all) | Peers whose forwarded client address counts: the proxies' own addresses, comma-separated. Ranges and the words loopback, private, all only where no client sits in them, or behind a proxy that replaces X-Forwarded-For. From anyone else, the socket address counts. |
LIVE_CLIENT_IP_HEADER | x-forwarded-for (cell: fly-client-ip) | The header a trusted proxy names the client in. For X-Forwarded-For, the rightmost address that is not a trusted proxy. |
LIVE_SHUTDOWN_MS | 25000 | Graceful-shutdown budget: on SIGTERM/SIGINT the server stops taking connections (a request or upgrade still arriving on an open connection is answered 503 with Retry-After), flushes debounced write-throughs and tries each document whose store failed once more (giving up on it by name if it still fails), then ends every WebSocket (1012 Service Restart, so open editors reconnect to the next host at once) and exits, usually within a second; it hard-exits after this many ms whatever still hangs. Keep it below the container runtime's kill timeout (compose sets stop_grace_period: 30s). The exit code is 0 when every document was stored, 1 when one was given up or the flush did not finish. |
LIVE_INSTANCE_WAIT_MS | 30000 | One Live Host per data directory: a second one on the same LIVE_DATA_DIR waits this long for the first to stop (a restart that overlaps), then refuses to start and names the holder. 0 refuses at once. See One Live Host per data directory. |
Every signed-in WebSocket gets a ping every 5 s; one that answered none of the last two (a laptop whose network dropped, a closed lid, a VPN that went down) is ended, so its people leave their colleagues' editors within 10 to 15 s, not after the half minute and more of the sync's own timeouts. A browser answers pings by itself, a busy or background tab included, and proxies pass them through; a client whose network comes back rejoins on its own. Every byte that arrives counts as an answer: a browser answers a ping only once the message it is sending is out, so a large edit on a slow uplink (a pasted model text of a few MB at 1 Mbit/s) is not ended halfway (one that takes more than half a minute to send can still meet the sync's own timeouts, as before). The editor itself says "No network" the moment the browser reports the network gone, and reconnects the moment it is back.
A connection that has not signed in may send at most 2 MiB; a newcomer pushes out the oldest waiting connection of the address that holds the most waiting ones (after a second) instead of being refused. A signed-in connection may send messages up to LIVE_MAX_DOC_BYTES + 1 MiB, which the host buffers whole: size the container's memory for LIVE_MAX_WS_PER_USER × that per person who might send large models at once, or lower LIVE_MAX_WS_PER_USER.
LIVE_MCP_GUIDE_URL (default: the guide of this release, https://github.com/Miragon/design-iq/blob/v<version>/docs/mcp-integration.md) is where the web app links the guide to connecting an AI client (Connect an AI client, the Analyse with AI menu). Point it at a copy your people can reach, or set off to show no link (a closed network): the dialog shows the MCP URL and the Claude Code command either way. Only a signed-in caller gets the link from GET /api/config: the default names this release, which nobody learns there before signing in. The header names the vendor's hosted service (design.miragon.ai) only on a cell; an installation of its own links no other site.
LIVE_EDITOR_SCHEMES (default: none) adds URI schemes an editor sign-in may return to, comma-separated, for a VS Code fork the host does not know. Built in: vscode, vscode-insiders, vscode-exploration, vscodium, vscodium-insiders, vscode-oss, code-oss, cursor, windsurf, windsurf-next, positron, trae, trae-cn, kiro, void, antigravity. A refused scheme is named in the answer and in the log. A web scheme (http, https, file, javascript …) is never accepted, named or not: the sign-in code would reach a web page.
What the browser may do is fixed, not configured:
- Cross-origin writes: a request that changes something and carries the sign-in cookie must come from the host's own pages (Fetch Metadata
Sec-Fetch-Site: same-origin, or a matchingOrigin). Otherwise the answer is 403auth/cross-origin. Clients with a bearer token (the VS Code extension, MCP clients, curl) are not affected. - Content Security Policy: the web app's page runs only its own scripts and cannot be framed. Images may come from any https address (avatars).
- The session stays out of the page: the sign-in cookie is HttpOnly, and no answer names the session to a page's script:
/api/megives the session id only to a bearer that sent it (the VS Code extension's), and the web app's live connection signs in to each model with a single-use ticket of a minute (POST /api/ws-ticket), which no REST route accepts. One session holds at most 256 open tickets. The editor sign-in's landing page, which holds the one-time code, sendsCross-Origin-Opener-Policy: same-origin: the page that opened it keeps no handle on it. LIVE_AUTH=none: every request, an MCP client's or the editor's too, must address a host name of this host:LIVE_PUBLIC_URL's,localhostor a*.localhostname, an IP address, or oneLIVE_ALLOWED_HOSTSnames (comma-separated: a compose service name such aslive-host,host.docker.internal, another DNS name, a proxy that rewritesHost). Any other counts as another site (DNS rebinding), answered 401, and the host logs the name once. A page of a sibling host of the same site is another site too.LIVE_AUTH=nonealso refuses to start as a cell.
Logs
| Variable | Default | Meaning |
|---|---|---|
LIVE_LOG_FORMAT | text | text: one line per entry, its time, its level and the message. json: one JSON object per line with time, level, msg and, for a line written for an HTTP request, requestId. See Logs. |
LIVE_LOG_LEVEL | info | The lowest level written: debug, info, warn or error. |
Dev/test only: never set in production
| Variable | Meaning |
|---|---|
LIVE_GIT_URL_OVERRIDE | Redirect clone/fetch URLs to a stub git server (test harness). |
LIVE_PUSH_URL_OVERRIDE | Redirect release pushes to a stub git server (test harness). |
Cell mode: leave unset on-prem
TENANT_INSTALLATION_ID, TOKEN_MINT_URL, CELL_SECRET, CELL_TOKEN_KEY are used by Miragon's hosted multi-tenant operation, where a control plane holds the GitHub App key and each tenant gets its own cell (ADR 0002, ADR 0004). Leave all of them unset: the server then runs standalone with its own app key, which is the on-prem model.
When TENANT_INSTALLATION_ID is set (cell mode) and LIVE_OIDC_* is configured, the OIDC verifier additionally requires every token to carry installation_id equal to this cell's tenant, refusing anything else with 401 auth/wrong-tenant. This is the tenant boundary in the SaaS, where the OIDC audience is a shared fleet value (the IdP's resource indicators are one per environment, not per tenant): the claim is IdP-injected from the user's organization membership, so a token minted for another tenant fails here. On-prem (single tenant, TENANT_INSTALLATION_ID unset) this check is inert.