Files
Heimdall/skills/optional-server-services/SKILL.md
T
arnaud.dartois c347d70ec9
Heimdall Gitea / Detect CI scope (pull_request) Successful in 9s
Heimdall Gitea / Build and tests (pull_request) Successful in 21m42s
Heimdall Gitea / Build and scan server image (pull_request) Skipped
Heimdall Gitea / Build and scan agent image (pull_request) Skipped
Heimdall Gitea / Build and scan NVIDIA Agent image (pull_request) Skipped
Heimdall Gitea / Publish versioned installer release (pull_request) Skipped
Heimdall Gitea / CI policy (pull_request) Successful in 3s
fix(install): lire les secrets des services optionnels (#319)
2026-11-12 06:06:24 +01:00

3.4 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 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/<name>, not ./secrets/<name> or paths relative to optional/.

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 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.
  • 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 using that root. 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.