sintoniadocs
Deployment and operations

Complete self-hosted deployment

Image-based stack, proxy, media and backups.

On this pageTopologyMedia hostBuild images independentlyDeployUpdates and backupsStable installation identityRustFS storage update

Topology#

The sintonia-deploy repository consumes versioned images. compose.selfhost.yaml provides PostgreSQL, backend, web, documentation and Caddy. LiveKit/TURN are provisioned separately. compose.local.yaml is only for same-machine development with loopback media and Mailpit.

Choose canonical app, API, docs and media domains; configure DNS; prepare persistent storage/backups; deploy media; build the three application images; configure the deployment environment; activate administration; and validate with two users/devices before release. Example domains/images must be replaced. No external deployment is performed automatically by these files.

Media host#

Use a dedicated Linux VM or an appropriate media platform. Follow LiveKit deployment and its VM generator for real DNS/IP, TLS and TURN. The media endpoint must be reachable by clients with a trusted certificate. Docker-internal addresses and --dev are not a production configuration.

Set matching credentials in LIVEKIT_API_KEY/LIVEKIT_API_SECRET and public WSS in LIVEKIT_URL. Leave backend TURN fields empty when using LiveKit-provided authenticated TURN. Redis may be part of distributed LiveKit; it does not supply the missing Sintonia backend event/session backplane.

PortMedia purposeExposure
443/TCPHTTPS/WSS and TURN/TLS where configuredClient-facing; TURN may need another IP or L4 proxy
7880/TCPLiveKit signalingBehind TLS proxy
7881/TCPICE/TCPDirect if enabled
7882/UDPUDP muxDirect when selected
50000–60000/UDPDefault ICE rangeAlternative to mux; use actual configured range
3478/UDPTURN/UDPOnly when enabled
5349/TCPTURN/TLS behind a load balancerTopology-dependent; direct deployments use 443 in the guide

See the official port reference. The application's HTTP Caddy proxy does not configure UDP forwarding or TURN multiplexing. Web/API and media may require distinct hosts/IPs.

Build images independently#

In the backend repository:

sh
mvn test
docker build -t registry.example.com/sintonia/backend:0.1.0 .

In the app repository:

sh
bash tool/build-worker.sh
flutter build web --release
docker build -t registry.example.com/sintonia/web:0.1.0 .

In the site repository:

sh
python3 write-content.py
python3 build.py
python3 check.py
docker build --build-arg DOCS_SITE_URL=https://docs.example.com -t registry.example.com/sintonia/docs:0.1.0 .

Authenticate and push each image yourself, or transport it with docker save/docker load on a closed network. Record immutable tags/digests and compatible releases.

Deploy#

From the deployment repository:

sh
cp selfhost.env.example .env
chmod 600 .env
# Edit real domains, image tags, database, SMTP and LiveKit secrets.
docker compose --env-file .env -f compose.selfhost.yaml config --quiet
docker compose --env-file .env -f compose.selfhost.yaml pull
docker compose --env-file .env -f compose.selfhost.yaml up -d

Generate your own secrets, for example with openssl rand -hex 32, and store them securely. Mandatory empty values are rejected. Use config --quiet; full expanded Compose output can expose secrets.

Caddy exposes 80/443, obtains certificates and proxies the three domains. Other application services do not publish host ports in this example. DNS/connectivity must support certificate issuance. If an existing proxy owns those ports, adapt the topology instead of starting a competing listener.

Temporarily enable registration to create the first account. Sign in, activate installation administration with ADMIN_SETUP_TOKEN, then remove that token and disable registration if using invitations. Recreate only the backend. Setup tokens are not user passwords; do not use demo identities for production.

Updates and backups#

sh
docker compose -f compose.selfhost.yaml ps
docker compose -f compose.selfhost.yaml logs --tail 100 backend
# After backup/staging and changing the image in .env:
docker compose -f compose.selfhost.yaml pull backend
docker compose -f compose.selfhost.yaml up -d --no-deps backend

Update web or documentation independently in the same way. Preserve volumes and origins; never use down -v for maintenance. One backend replica remains the current operational limit.

Back up PostgreSQL and instance-data consistently, pausing writes where needed. Include secrets and the persistent webhook key. A database dump can be created without printing the password:

sh
docker compose -f compose.selfhost.yaml exec -T postgres pg_dump -U sintonia -d sintonia -Fc > sintonia.dump

Protect the dump and encrypted uploads. Named volumes have the Compose project prefix. Include RustFS objects and legacy recordings; use host/volume backup tooling for uploads and preserve UID 10001; a database-only dump is insufficient. Test full restoration in an isolated host/project with matching secrets and files. Do not expose a restored duplicate installation with the original federation identities. Message/custody retention and backup retention are separate policies.

For local development, build sintonia-backend:local in its repository, create .env from local.env.example only for a new installation, preserving any existing environment, and run bash scripts/start-local.sh. Use the tools checkout with explicit APP_SOURCE_DIR and SINTONIA_DEPLOYMENT_DIR to run the web proxy on 5173; serve the static docs on 5180 from their own checkout. The local Compose retains project name sintonia; see MIGRATION.md in deployment. Mailpit is at localhost:18025. Use separate directories/projects/environments for development and production.

Stable installation identity#

Set INSTANCE_IDENTITY_ORIGIN to the exact origin used by previous clients, and preserve it across updates. /api/health returns identityOrigin; clients keep using the page/entered address for network requests and this identifier for device keys, QR, recovery backups and saved sessions. Existing DigitalOcean installs default to https://API_DOMAIN, local installs to http://localhost:8080. Do not clear storage or rotate identities to change the login UI. Keep an existing IdP backendOrigin/redirect URI reachable.

For aliases, clients fetch canonical health without credentials and require the accessed origin in its clientOrigins list (from ALLOWED_ORIGINS). Explicitly list web/client aliases; do not use a wildcard. An unrelated server cannot obtain a saved session or device identity by claiming another identityOrigin.

RustFS storage update#

Supplied Compose files include private RustFS and persistent volumes. Generate missing local credentials with scripts/ensure-local-turn.py; DigitalOcean installation prepares them automatically. Preserve legacy uploads/recordings and follow configuration, migration and scaling. Console is loopback-only; never make the bucket public.

Search channels, QR codes, uploads, security…

↑ ↓ navigate ↵ open result