From f8fe077c1afc4fda193ccd30766e8729e3673e00 Mon Sep 17 00:00:00 2001 From: Arnaud Dartois Date: Tue, 10 Nov 2026 15:29:05 +0100 Subject: [PATCH 1/2] fix(install): repair optional RustFS and coturn services --- docker/docker-compose.coturn.yml | 12 +++++++++-- docker/docker-compose.rustfs.yml | 4 ++-- docs/docker-compose.md | 11 +++++++--- skills/optional-server-services/SKILL.md | 26 ++++++++++++++++++++++++ 4 files changed, 46 insertions(+), 7 deletions(-) create mode 100644 skills/optional-server-services/SKILL.md diff --git a/docker/docker-compose.coturn.yml b/docker/docker-compose.coturn.yml index d5bb00b..ee2ccca 100644 --- a/docker/docker-compose.coturn.yml +++ b/docker/docker-compose.coturn.yml @@ -3,16 +3,24 @@ services: coturn: image: coturn/coturn:4.6 pull_policy: always + ports: + - "${COTURN_PORT:-3478}:3478/tcp" + - "${COTURN_PORT:-3478}:3478/udp" + - "${COTURN_RELAY_PORT_MIN:-49160}-${COTURN_RELAY_PORT_MAX:-49200}:${COTURN_RELAY_PORT_MIN:-49160}-${COTURN_RELAY_PORT_MAX:-49200}/udp" + entrypoint: ["turnserver"] command: > -n --use-auth-secret --static-auth-secret-file=/run/secrets/coturn_secret --realm=${COTURN_REALM:-heimdall.local} --fingerprint --no-tlsv1 --no-tlsv1_1 --log-file=stdout - network_mode: host + --no-cli + --listening-port=3478 + --min-port=${COTURN_RELAY_PORT_MIN:-49160} + --max-port=${COTURN_RELAY_PORT_MAX:-49200} secrets: - coturn_secret restart: unless-stopped secrets: coturn_secret: - file: ./secrets/coturn_secret + file: ./optional/secrets/coturn_secret diff --git a/docker/docker-compose.rustfs.yml b/docker/docker-compose.rustfs.yml index cb10a36..20a860d 100644 --- a/docker/docker-compose.rustfs.yml +++ b/docker/docker-compose.rustfs.yml @@ -30,9 +30,9 @@ volumes: secrets: rustfs_access_key: - file: ./secrets/rustfs_access_key + file: ./optional/secrets/rustfs_access_key rustfs_secret_key: - file: ./secrets/rustfs_secret_key + file: ./optional/secrets/rustfs_secret_key networks: heimdall-net: diff --git a/docs/docker-compose.md b/docs/docker-compose.md index 294b5eb..8bd6250 100644 --- a/docs/docker-compose.md +++ b/docs/docker-compose.md @@ -201,9 +201,14 @@ RTSPS/WHEP TCP ports and WebRTC ICE UDP port in the firewall. Add STUN URLs unde `LiveMedia:IceServers`; for TURN REST credentials set `LiveMedia:Turn:Urls` and `LiveMedia:Turn:SharedSecret`. Central returns five-minute HMAC credentials to the browser; the shared secret is never sent. -When using `docker-compose.coturn.yml`, configure the Central secret from the same -protected secret source as `docker/secrets/coturn_secret`; protect the Central -`.env` with owner-only permissions. +When using `docker-compose.coturn.yml`, the installer stores its shared secret +at `optional/secrets/coturn_secret`. Configure the matching TURN shared secret +in Central from that protected file and protect Central's `.env` with owner-only +permissions. Coturn publishes TCP/UDP 3478 and UDP relay ports 49160–49200 by +default; forward those ports through the host firewall/NAT. Set +`COTURN_RELAY_PORT_MIN` and `COTURN_RELAY_PORT_MAX` together if you need a +different relay range, and `COTURN_EXTERNAL_IP` when coturn must advertise an +address other than the container's detected address. Use Docker's default bridge network; coturn must not use `network_mode: host` when relying on published ports. Start the core project first so its external `heimdall-net` network exists, then start MediaMTX with a separate project name: diff --git a/skills/optional-server-services/SKILL.md b/skills/optional-server-services/SKILL.md new file mode 100644 index 0000000..1306a45 --- /dev/null +++ b/skills/optional-server-services/SKILL.md @@ -0,0 +1,26 @@ +--- +name: optional-server-services +description: Keep installer-managed RustFS and coturn Compose services aligned with the server installer's paths and networking. +--- + +# Installer-managed optional services + +The Linux and Windows server installers run optional Compose files with the installation root as the current directory. They save service secrets in `optional/secrets/` and pass the root `.env` for interpolation. Therefore, Compose secret `file:` entries must use `./optional/secrets/`, not `./secrets/` or paths relative to `optional/`. + +## RustFS + +- Keep `rustfs_access_key` and `rustfs_secret_key` file paths aligned with the generated files from both installers. +- Verify Compose config from the install-root working directory and ensure Docker secrets are sourced from those files. +- Keep the named data volume and shared `heimdall-net` behavior intact. + +## coturn + +- Keep `coturn_secret` sourced from `./optional/secrets/coturn_secret`. +- Use `turnserver` as the explicit image entrypoint, bridge networking, and explicit TCP/UDP listener and UDP relay port publications; the upstream image has a `turnadmin` entrypoint, and host networking cannot be combined with useful Compose port mappings. +- Keep the published relay range identical to coturn's `--min-port`/`--max-port` options. Make listener and relay settings configurable with documented defaults. +- Set `COTURN_EXTERNAL_IP` only when NAT requires coturn to advertise an explicit public address. The operator must forward the listener and relay range through firewalls/NAT. +- Do not claim public TURN reachability from a local container startup. It requires an external ICE/TURN client on a real network. + +## Acceptance + +Run both services in one uniquely named disposable Compose project using generated secrets and unique loopback listener ports. Use `docker compose --project-directory --env-file -f -p config` to prove the installer root resolves `optional/secrets/` correctly. Start RustFS and coturn; verify RustFS `/health` and S3 authentication and coturn startup plus a TURN REST authenticated allocation from a test client if available. State separately whether the real TURN allocation succeeded. Tear down only that project, verify its containers/volumes/networks are absent, and keep upstream images. No local images should be built by this recipe. -- 2.54.1 From 739a6d2f743ce333af8bb3156228cbcf09a29ab6 Mon Sep 17 00:00:00 2001 From: Arnaud Dartois Date: Tue, 10 Nov 2026 15:35:35 +0100 Subject: [PATCH 2/2] update skill --- skills/site-agent-installer-ui/SKILL.md | 1 + 1 file changed, 1 insertion(+) diff --git a/skills/site-agent-installer-ui/SKILL.md b/skills/site-agent-installer-ui/SKILL.md index 0fed695..a3ed622 100644 --- a/skills/site-agent-installer-ui/SKILL.md +++ b/skills/site-agent-installer-ui/SKILL.md @@ -13,6 +13,7 @@ Keep the site Agent installer in `src/Heimdall.Web/Components/SiteInstallPanel.r - Keep generated command content in the existing builders and `Commands` projection. Platform selection controls the builders; do not duplicate generated commands in markup. - Native install commands require a latest signed release with update key, signed manifest, signature, and Agent archive assets. Docker commands additionally require a digest-pinned image reference and update key. Preserve these gates so the panel never offers a nonfunctional installer. - Treat site tokens and generated configuration as secrets: show them only in the authenticated site's installer view and copy only after a deliberate click. Do not log generated content. +- For live installer verification, use the authenticated Orca browser session. Check for the dedicated Heimdall login only in the user secret store at `~/.config/heimdall/credentials.json`; never put account passwords in this skill, repository config, shell arguments, or Orca `fill` commands. The file fallback is owner-only (`0700` directory, `0600` file) and base64-encoded, not encrypted. If it is absent, provide the user-run masked helper `~/.local/bin/store-heimdall-credentials`; do not report the credentials as persisted until that helper succeeds. If Orca has no safe autofill path, ask the user to enter the password in the visible browser. - Keep all visible strings in `SharedResources.resx`, `SharedResources.en.resx`, and `SharedResources.fr.resx`. - Match Pangolin's control hierarchy and compact copy affordance while using Heimdall's MudBlazor theme and supported installation choices. Keep selection and copy feedback accessible with selected styling, tooltips/aria labels, and a check icon after copying. -- 2.54.1