As of .
Everything you need is on this page: how to get the image and check it, a complete
compose.yaml and .env to start from, and what the reverse proxy and
the firewall need. Nothing else has to be downloaded or checked out.
The compose.yaml below runs four containers: the app (one image serving the
client, the API and the room socket), Postgres, LiveKit for voice, and coturn as a relay. The
reverse proxy and the OpenID Connect provider are yours, outside the stack.
Postgres sits on an internal network that only the app reaches. Voice media goes straight to LiveKit or coturn, never through the proxy.
A Linux host with Docker and Docker Compose, curl and
ssh-keygen (OpenSSH 8.1 or later).
A public IP address, and a host name for the app (for example
storm.example.com) with a TLS certificate.
A reverse proxy that terminates HTTPS, either on the host or on the Docker network
docker_lbnet.
An OpenID Connect provider, with this app registered as a confidential client:
redirect URI <PUBLIC_ORIGIN>/auth/callback
post-logout redirect URI <PUBLIC_ORIGIN>/
Firewall access to open the media ports (see Start, verify and operate).
The app image is served by 3des.craftingcrew.at, through the Docker Registry HTTP
API (the OCI Distribution API). It is one repository, eventstorming, holding the
current release for linux/amd64 and linux/arm64. Pulling needs no
account and no login, and nothing can be pushed.
Every change that passes our quality gate is a release, so there is a new one most days. The
jump page at https://3des.craftingcrew.at/ shows the current version and these
commands with it, and curl https://3des.craftingcrew.at/api/release answers its
version, image and digest. Each release ships the quality reports it was let through on: the
crap score, the dependency diagram and the call graph, linked from the jump page.
Each release comes with a release.json that names its version, the image's
digest, and the SHA-256 of the release's compose.yaml and
.env.example. It is signed with our release key. Check the key's fingerprint
against the one printed here, then the signature, then the files:
REGISTRY=3des.craftingcrew.at
curl -fsSO "https://$REGISTRY/support-craftingcrew-at-ed25519.pub"
ssh-keygen -lf support-craftingcrew-at-ed25519.pub
# must print SHA256:bKQhMLbTjgFa6DmLkoLCc5bvrqySR5sYCsGLv+sYoss support@craftingcrew.at (ED25519)
for f in release.json release.json.sig compose.yaml .env.example; do
curl -fsSO "https://$REGISTRY/release/$f"
done
echo "support@craftingcrew.at namespaces=\"eventstorming-release\" $(cat support-craftingcrew-at-ed25519.pub)" > signers
ssh-keygen -Y verify -f signers -I support@craftingcrew.at -n eventstorming-release \
-s release.json.sig < release.json
# must print: Good "eventstorming-release" signature for support@craftingcrew.at
cat release.json # the version and the image digest
sha256sum compose.yaml .env.example # must match the hashes in release.json
The release key's fingerprint is
SHA256:bKQhMLbTjgFa6DmLkoLCc5bvrqySR5sYCsGLv+sYoss. The signature proves that
release.json is ours; the digest it names proves that the image is the one we
released. Only pull by that digest.
docker pull "$REGISTRY/eventstorming@sha256:<digest from release.json>"
# or by the release's version, then check that it is the digest release.json names
docker pull "$REGISTRY/eventstorming:<version>"
docker image inspect "$REGISTRY/eventstorming:<version>" --format '{{index .RepoDigests 0}}'
docker compose up pulls the image by itself: the release's
compose.yaml names it by the digest release.json vouches for, so
this step is optional.
What docker pull does, as plain HTTPS requests, for a host without Docker, a
mirror of your own, or a look before pulling:
| Request | Answers |
|---|---|
GET /v2/ |
200 with Docker-Distribution-API-Version: registry/2.0, no authentication
|
GET,
HEAD /v2/eventstorming/manifests/<version or digest>
|
the image index, or a platform's manifest, with its media type and
Docker-Content-Digest
|
GET, HEAD /v2/eventstorming/blobs/sha256:<hex> |
a configuration or layer blob |
# The registry is there
curl -fsSI "https://$REGISTRY/v2/" | grep -i docker-distribution-api-version
# The digest a version points at, without downloading anything
curl -fsSI \
-H 'Accept: application/vnd.oci.image.index.v1+json' \
"https://$REGISTRY/v2/eventstorming/manifests/<version>" | grep -i docker-content-digest
# The index: one manifest per platform
curl -fsS \
-H 'Accept: application/vnd.oci.image.index.v1+json' \
"https://$REGISTRY/v2/eventstorming/manifests/sha256:<digest>" -o index.json
sha256sum index.json # is the digest you asked for
# One platform's manifest: its config and layers
curl -fsS \
-H 'Accept: application/vnd.oci.image.manifest.v1+json' \
"https://$REGISTRY/v2/eventstorming/manifests/sha256:<manifest digest from index.json>" \
-o manifest.json
# Each blob the manifest names
curl -fsSL "https://$REGISTRY/v2/eventstorming/blobs/sha256:<blob hex>" -o blob
sha256sum blob # is the hex you asked for
Every answer is addressed by its own SHA-256, so each step checks itself: the index by the
digest in release.json, each manifest by the digest in the index, each blob by
the digest in its manifest. Errors come back in the registry's own shape
(MANIFEST_UNKNOWN, BLOB_UNKNOWN, NAME_UNKNOWN) with
404.
| Container | Image | Pinned to |
|---|---|---|
| LiveKit | livekit/livekit-server:v1.13.7 |
sha256:6fd3b7088874c4d119160dd688798dfec852bc014786d392caad15f6f63912a3
|
| coturn | coturn/coturn:4.18.0-alpine |
sha256:c29135c08565810d37053f384584392b7c24b69570fc81a721b878d6fe63e04e
|
| Postgres | postgres:18-alpine |
the tag only, so pin it yourself (see Sample compose file) |
All three come from Docker Hub.
Put compose.yaml and .env side by side in one directory.
docker compose reads .env from there by itself, and
docker compose up stops with a message if a required value is missing. Generate
each secret with openssl rand -base64 48.
| Concern | Required values | Notes |
|---|---|---|
| App | PUBLIC_ORIGIN, SESSION_SECRET |
PUBLIC_ORIGIN is the origin exactly as the proxy serves it: scheme and
host, no trailing slash. Leave APP_IMAGE unset: the release's
compose.yaml already names the image by its digest.
|
| Sign-in |
OIDC_ISSUER, OIDC_CLIENT_ID, OIDC_CLIENT_SECRET
|
The issuer exactly as it appears in tokens' iss. |
| Database | POSTGRES_PASSWORD |
The app applies schema migrations itself at start. |
| Voice |
LIVEKIT_URL, LIVEKIT_API_SECRET, LIVEKIT_NODE_IP
|
LIVEKIT_URL is PUBLIC_ORIGIN with wss: in place
of https:.
|
| Relay | TURN_HOST, TURN_EXTERNAL_IP, TURN_SECRET |
Both IPs are the host's public address, or the router's behind a NAT. |
.env
For storm.example.com on the public address 203.0.113.10, with the
proxy on docker_lbnet. Replace each <secret> with the output
of openssl rand -base64 48, and keep the file readable by its owner only (chmod 600 .env).
COMPOSE_PROJECT_NAME=eventstorming
# --- The app ---------------------------------------------------------------
# Unset: compose.yaml names the image by the digest release.json vouches for.
# APP_IMAGE=
# Where the proxy forwards to: http://eventstorming-app:8787 on docker_lbnet,
# or APP_BIND when the proxy runs on the host itself.
APP_ALIAS=eventstorming-app
APP_BIND=127.0.0.1:8787
# Required. Scheme and host, no path, no trailing slash.
PUBLIC_ORIGIN=https://storm.example.com
# Required. At least 32 characters; signs session cookies.
SESSION_SECRET=<secret>
# How long a sign-in lasts, in seconds. A workshop day.
SESSION_TTL_SECONDS=28800
# --- Signing in ------------------------------------------------------------
# Required. The issuer exactly as in tokens' `iss`, no trailing slash.
OIDC_ISSUER=https://id.example.com/realms/eventstorming
OIDC_CLIENT_ID=event-storming
OIDC_CLIENT_SECRET=<from the provider>
# Only when this host reaches the issuer by another name than browsers do.
# OIDC_DISCOVERY_URL=
# --- Database --------------------------------------------------------------
POSTGRES_DB=eventstorming
POSTGRES_USER=eventstorming
# Required.
POSTGRES_PASSWORD=<secret>
# --- Voice -----------------------------------------------------------------
# Required. The app's own origin as wss:, with the proxy sending /rtc to LiveKit.
LIVEKIT_URL=wss://storm.example.com
LIVEKIT_ALIAS=eventstorming-livekit
LIVEKIT_BIND=127.0.0.1:7880
LIVEKIT_API_KEY=eventstorming
# Required. At least 32 characters; signs the voice tokens the app mints.
LIVEKIT_API_SECRET=<secret>
# Required. The host's public IP address: where browsers send media.
LIVEKIT_NODE_IP=203.0.113.10
LIVEKIT_TCP_PORT=7881
LIVEKIT_UDP_PORT=7882
# --- Relay -----------------------------------------------------------------
# Required. The name browsers reach coturn on, and the host's public address.
TURN_HOST=storm.example.com
TURN_EXTERNAL_IP=203.0.113.10
TURN_SECRET=<secret>
TURN_PORT=3478
TURN_MIN_PORT=49160
TURN_MAX_PORT=49200
The whole stack, as compose.yaml beside .env, with its comments
shortened. Run the release's own file rather than a copy of this one: it has the digest filled
in, and sha256sum against release.json tells you whether it is
unchanged.
x-logging: &logging
driver: json-file
options:
max-size: 10m
max-file: '5'
services:
app:
image: ${APP_IMAGE:-3des.craftingcrew.at/eventstorming@sha256:<digest>}
environment:
PORT: 8787
HOST: 0.0.0.0
CLIENT_DIR: /app/dist/client
# The origin people type into their browser, exactly as the proxy answers on it.
PUBLIC_ORIGIN: ${PUBLIC_ORIGIN:?PUBLIC_ORIGIN must be set, e.g. https://storm.example.com}
OIDC_ISSUER: ${OIDC_ISSUER:?OIDC_ISSUER must be set}
OIDC_DISCOVERY_URL: ${OIDC_DISCOVERY_URL:-${OIDC_ISSUER}/.well-known/openid-configuration}
OIDC_CLIENT_ID: ${OIDC_CLIENT_ID:?OIDC_CLIENT_ID must be set}
OIDC_CLIENT_SECRET: ${OIDC_CLIENT_SECRET:?OIDC_CLIENT_SECRET must be set}
SESSION_SECRET: ${SESSION_SECRET:?SESSION_SECRET must be set, at least 32 characters}
SESSION_TTL_SECONDS: ${SESSION_TTL_SECONDS:-28800}
# Credentials stay out of the URL, where they would be copied into logs.
DATABASE_URL: postgres://db:5432/${POSTGRES_DB:-eventstorming}
PGUSER: ${POSTGRES_USER:-eventstorming}
PGPASSWORD: ${POSTGRES_PASSWORD:?POSTGRES_PASSWORD must be set}
# The SFU as browsers reach it, through the proxy: always wss://.
LIVEKIT_URL: ${LIVEKIT_URL:?LIVEKIT_URL must be set, e.g. wss://storm.example.com}
LIVEKIT_API_KEY: ${LIVEKIT_API_KEY:-eventstorming}
LIVEKIT_API_SECRET: ${LIVEKIT_API_SECRET:?LIVEKIT_API_SECRET must be set, at least 32 characters}
networks:
lbnet:
aliases:
- ${APP_ALIAS:-eventstorming-app}
backend: {}
# For a proxy on the host. Loopback only: nothing reaches the app but the proxy.
ports:
- '${APP_BIND:-127.0.0.1:8787}:8787'
depends_on:
db:
condition: service_healthy
livekit:
condition: service_healthy
cap_drop: [ALL]
security_opt: ['no-new-privileges:true']
logging: *logging
restart: unless-stopped
db:
image: postgres:18-alpine
environment:
POSTGRES_DB: ${POSTGRES_DB:-eventstorming}
POSTGRES_USER: ${POSTGRES_USER:-eventstorming}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?POSTGRES_PASSWORD must be set}
volumes:
- db:/var/lib/postgresql
# Not published, on a network with no route out: only the app talks to it.
networks:
- backend
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB"']
interval: 5s
timeout: 3s
retries: 20
logging: *logging
restart: unless-stopped
livekit:
image: livekit/livekit-server:v1.13.7@sha256:6fd3b7088874c4d119160dd688798dfec852bc014786d392caad15f6f63912a3
environment:
LIVEKIT_KEYS: '${LIVEKIT_API_KEY:-eventstorming}: ${LIVEKIT_API_SECRET:?LIVEKIT_API_SECRET must be set}'
LIVEKIT_CONFIG: |
port: 7880
rtc:
tcp_port: ${LIVEKIT_TCP_PORT:-7881}
udp_port: ${LIVEKIT_UDP_PORT:-7882}
use_external_ip: false
node_ip: ${LIVEKIT_NODE_IP:?LIVEKIT_NODE_IP must be set to the host's public address}
turn_servers:
- host: ${TURN_HOST:?TURN_HOST must be set}
port: ${TURN_PORT:-3478}
protocol: udp
secret: ${TURN_SECRET:?TURN_SECRET must be set}
- host: ${TURN_HOST}
port: ${TURN_PORT:-3478}
protocol: tcp
secret: ${TURN_SECRET}
ports:
- '${LIVEKIT_BIND:-127.0.0.1:7880}:7880'
- '${LIVEKIT_TCP_PORT:-7881}:${LIVEKIT_TCP_PORT:-7881}/tcp'
- '${LIVEKIT_UDP_PORT:-7882}:${LIVEKIT_UDP_PORT:-7882}/udp'
networks:
lbnet:
aliases:
- ${LIVEKIT_ALIAS:-eventstorming-livekit}
healthcheck:
test: ['CMD-SHELL', 'wget -q -O /dev/null http://127.0.0.1:7880/']
interval: 5s
timeout: 3s
retries: 20
logging: *logging
restart: unless-stopped
coturn:
image: coturn/coturn:4.18.0-alpine@sha256:c29135c08565810d37053f384584392b7c24b69570fc81a721b878d6fe63e04e
command:
- -n
- --log-file=stdout
- --listening-port=${TURN_PORT:-3478}
- --min-port=${TURN_MIN_PORT:-49160}
- --max-port=${TURN_MAX_PORT:-49200}
- --realm=eventstorming
- --external-ip=${TURN_EXTERNAL_IP:?TURN_EXTERNAL_IP must be set to the host's public address}
- --fingerprint
- --use-auth-secret
- --static-auth-secret=${TURN_SECRET:?TURN_SECRET must be set}
- --no-tls
- --no-multicast-peers
# Never relay into the host's own private networks...
- --denied-peer-ip=10.0.0.0-10.255.255.255
- --denied-peer-ip=172.16.0.0-172.31.255.255
- --denied-peer-ip=192.168.0.0-192.168.255.255
# ...except to LiveKit, which may have a private address behind a NAT.
- --allowed-peer-ip=${LIVEKIT_NODE_IP}
ports:
- '${TURN_PORT:-3478}:${TURN_PORT:-3478}/udp'
- '${TURN_PORT:-3478}:${TURN_PORT:-3478}/tcp'
- '${TURN_MIN_PORT:-49160}-${TURN_MAX_PORT:-49200}:${TURN_MIN_PORT:-49160}-${TURN_MAX_PORT:-49200}/udp'
networks:
- media
logging: *logging
restart: unless-stopped
networks:
# The proxy's network, created outside this stack.
lbnet:
name: docker_lbnet
driver: bridge
external: true
# The app and the database, with no route out.
backend:
internal: true
# coturn, alone, with the ports it publishes.
media: {}
volumes:
db:
Leave compose.yaml as it is, so that an upgrade can replace it whole. Put local
changes in compose.override.yaml beside it, which docker compose
merges in automatically. For example, to pin Postgres to the digest you checked:
services:
db:
# docker image inspect postgres:18-alpine --format '{{index .RepoDigests 0}}'
image: postgres:18-alpine@sha256:<digest>
docker compose config prints the merged result, with every variable filled in,
before anything starts.
One host name, two backends. Pass WebSocket upgrades through, leave Host and
Origin as the browser sent them (the server compares Origin against
PUBLIC_ORIGIN), and set the tunnel timeout to a workshop's length (8 h).
| Path | From the host | On docker_lbnet |
|---|---|---|
/rtc… |
127.0.0.1:7880 |
http://eventstorming-livekit:7880 |
| everything else | 127.0.0.1:8787 |
http://eventstorming-app:8787 |
Match the host name before any path rule. Otherwise a rule meant for another site (such as
/auth to an identity provider) catches this app's sign-in. With HAProxy on
the host:
frontend https
# ... bind, certificates ...
acl eventstorming hdr(host),field(1,:) -i storm.example.com
acl livekit_path path_beg /rtc
# First, so that no path rule meant for another site catches /auth here.
use_backend eventstorming_rtc if eventstorming livekit_path
use_backend eventstorming if eventstorming
# ... other sites' rules after these ...
backend eventstorming
# The visitor's address, for the app's logs and its limit per address.
option forwardfor
option httpchk GET /healthz
http-check expect status 200
# The room socket and voice stay open for a whole workshop.
timeout tunnel 8h
server app 127.0.0.1:8787 check
backend eventstorming_rtc
timeout tunnel 8h
server livekit 127.0.0.1:7880 check
Have the proxy send the visitor's address in X-Forwarded-For, and set
TRUSTED_PROXY to the address it reaches the app from, or its network's range.
Without it every visitor is the proxy's address: in the logs, and to the jump page's
limit of five forms per address. deploy/README.md says how to find the address.
The app sends its own Content Security Policy, so the proxy does not need to add one:
default-src 'self'; script-src 'self' 'wasm-unsafe-eval'; style-src 'self';
script-src-attr 'none'; img-src 'self' data:; font-src 'self';
connect-src 'self' <LIVEKIT_URL, as wss: and https:>; form-action 'self' <OIDC_ISSUER's origin>;
frame-ancestors 'none'; object-src 'none'; base-uri 'self'
It also sends Strict-Transport-Security (when PUBLIC_ORIGIN is
https:), Referrer-Policy: same-origin,
Permissions-Policy (microphone and camera for the page itself only) and
helmet's other defaults. When you set up the proxy:
Do not add a second CSP. A browser enforces every policy it receives. A
proxy policy without 'wasm-unsafe-eval' breaks the physics engine, and one
without the LiveKit origin in connect-src breaks voice. If the proxy adds
security headers to every site, exclude this one or strip the CSP for it. Do not duplicate
HSTS or Referrer-Policy either: same-origin is what signing out
needs, and no-referrer breaks it.
Do not let the proxy or a CDN inject scripts. Analytics, cookie banners, e-mail obfuscation and script optimisers are blocked by the policy, which is what it is for. Turn those features off for this host rather than loosening the policy.
connect-src and form-action come from
.env.
If voice does not connect, or signing out stops at a blank page, the browser console names
the blocked origin. Check LIVEKIT_URL and OIDC_ISSUER, not the
policy.
The app cannot be framed (frame-ancestors 'none'). Link to
it rather than embedding it.
Check what arrives:
curl -sI https://storm.example.com/ | grep -i -e content-security -e
strict-transport. Exactly one of each should come back.
Subresource Integrity (SRI) protects scripts and stylesheets loaded from another origin. The
client loads nothing from another origin: every script, stylesheet and font comes from the
app's own origin, under content-hashed file names, out of the image. The image's
digest already covers those files, so the page carries no integrity attributes.
This changes if you serve /assets/ from a CDN or another host. Then the page
would trust that host with its code, and you would need integrity attributes and
that host in script-src. Serve the assets from the app instead.
Create the proxy network once per host, if the proxy has not already:
docker network create docker_lbnet.
Start the stack from the directory with compose.yaml and .env:
docker compose up -d.
Check health: curl https://storm.example.com/healthz answers
{"status":"ok","version":"…"}, with
the version release.json names.
Sign in, create a room, and join it from a second browser with the microphone on.
Media bypasses the proxy, so the firewall must open these ports to wherever participants are:
| Port (default) | Protocol | For |
|---|---|---|
7882 (LIVEKIT_UDP_PORT) |
UDP | voice, directly to LiveKit |
7881 (LIVEKIT_TCP_PORT) |
TCP | voice, where UDP is blocked |
3478 (TURN_PORT) |
UDP + TCP | the relay, where both are blocked |
49160–49200 (TURN_MIN_PORT–TURN_MAX_PORT) |
UDP | relayed media |
Out of the host, the app connects only to the OpenID Connect provider, over
docker_lbnet.
Logs: docker compose logs -f app. Each container keeps 5
files of 10 MB.
Upgrade: fetch and check the newest release as in Get the image, replace
compose.yaml with the one it ships, then docker compose up -d.
Migrations run at start. Compare .env.example with your .env
for settings a release added.
Backup: boards live in the db volume.
docker compose exec db pg_dump -U eventstorming eventstorming > board.sql
takes a copy.
A network that allows only HTTPS on 443 gets no voice: TURN over TLS on 443 is not offered yet.