Files
Heimdall/skills/optional-server-services/SKILL.md
T
arnaud.dartois b78c3deea2
Heimdall Gitea / Detect CI scope (push) Successful in 6s
Heimdall Gitea / Build and tests (push) Successful in 16m26s
Heimdall Gitea / Build and scan server image (push) Skipped
Heimdall Gitea / Build and scan agent image (push) Skipped
Heimdall Gitea / CI policy (push) Successful in 2s
Heimdall Gitea / Build and scan NVIDIA Agent image (push) Skipped
Heimdall Gitea / Publish versioned installer release (push) Skipped
docs: clarify optional Coturn live-view integration (#392)
Co-authored-by: Arnaud Dartois <admin@tordais.cc>
2026-11-13 11:50:21 +01:00

4.5 KiB

name, description
name description
optional-server-services 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 save service secrets in <install-root>/optional/secrets/, backup scripts in <install-root>/optional/scripts/, and pass the root .env for interpolation. Compose resolves relative paths from its project directory, which otherwise defaults to the directory containing the first -f file. RustFS and coturn Compose files reference ./optional/secrets/<name>, so start them with --project-directory <install-root>. The backup Compose references ./scripts and ./secrets/db_password, so start it with --project-directory <install-root>/optional. Preserve these service-specific bases; applying the installation root to every optional Compose breaks the backup mounts.

RustFS

  • Keep rustfs_access_key and rustfs_secret_key file paths aligned with the generated files from both installers.
  • Installers create these bind-mounted secret files as owner-only (0600), which the official RustFS process (10001:10001) cannot read directly. Keep a short root initializer, copy the files into the service's private tmpfs, chown the copies to UID/GID 10001, then drop to the rustfs account before executing the upstream entrypoint. Keep the root filesystem read-only and provide tmpfs only for runtime paths that RustFS writes (/logs, /tmp, and its secret copies).
  • Verify actual optional-service invocations use the right project directory: <install-root> for RustFS/coturn and <install-root>/optional for backup. Confirm normalized secret and script bind sources point to exact generated files/directories. A successful config without checking normalized source paths is insufficient because Compose can accept an unintended path that happens to exist.
  • Keep the named data volume and shared heimdall-net behavior intact.

coturn

  • Coturn is an optional live-view relay consumed by Central through LiveMedia:Turn:Urls and LiveMedia:Turn:SharedSecret. Central returns short-lived TURN REST credentials to the browser; the shared secret stays server-side. Keep this service optional and do not describe its integration as future or external-only.
  • Keep coturn_secret sourced from ./optional/secrets/coturn_secret.
  • coturn 4.6 does not support --static-auth-secret-file; read the mounted Docker secret in a short root initializer and write its configuration into private tmpfs. Do not print the value or pass it in the server process arguments.
  • Local Compose secrets are owner-only bind mounts too. Start the initializer as root, make the temporary config readable by the image's nobody account, then exec turnserver as nobody with no-new-privileges enabled. Keep the root init transient; do not run the TURN daemon as root.
  • Use a shell entrypoint that executes turnserver, 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.
  • Keep COTURN_EXTERNAL_IP optional; when set in the installer root .env, add Coturn's external-ip directive so it advertises the public address across NAT. The operator must forward the listener and relay range through firewalls/NAT. Do not set a guessed public address.
  • Do not claim public TURN reachability from a local container startup. It requires an external ICE/TURN client on a real network.

Acceptance

Run skills/optional-server-services/acceptance.sh. It creates a uniquely named disposable Compose project, generated owner-only secrets, an isolated install root, unique listener and relay ports, then validates Compose with each installer's explicit project directory. It asserts the normalized RustFS/coturn secret paths and backup secret/script bind sources exactly match the generated files before starting containers. It verifies RustFS /health, signs a real S3 bucket-creation request with the generated keys, and runs turnutils_uclient inside the Compose network with TURN REST credentials. This proves local container-network allocation only; it does not prove external firewall/NAT reachability. The trap tears down only that project and verifies its containers, volumes, and networks are absent. The recipe builds no local images and retains upstream images.