sintoniadocs
Deployment and operations

Application deployment

Independent web, mobile and desktop builds.

On this pagePrerequisites and checksWebNative releasesImage architectureStable installation identitymacOS Keychain and buildHost the Android APK with the web applicationHistory and Android alerts update (V19)Validate before releasingClient librariesCompatible MLS update (V20–V23)Android build warnings with Java 25 and KotlinFlutter 3.50 and Dart 3.14

Run commands from the sintonia-app repository root, originally app/. No backend or branding checkout is needed.

Prerequisites and checks#

Use Flutter 3.50.1 stable with Dart 3.14.0 (^3.14.0), platform SDKs reported by flutter doctor, and the committed pubspec.lock. Pin the Flutter version validated by your team; dependency upgrades require separate testing.

sh
flutter doctor
flutter pub get
bash tool/build-worker.sh
flutter analyze
flutter test

The worker script compiles the E2EE worker from the exact LiveKit package resolved in .dart_tool/package_config.json, without downloading its development branch or calling scripts in a sibling repository.

Web#

sh
bash tool/build-worker.sh
flutter build web --release
docker build -t registry.example.com/sintonia/web:0.1.0 .
docker run --rm --network sintonia_default -p 127.0.0.1:5173:8080 registry.example.com/sintonia/web:0.1.0

Web sign-in uses the current page origin, with no server selector. Proxy /api/*, /events (WebSocket) and authentication callbacks to the backend on that origin. Mobile and desktop require a server address, remembered after validation. No cloud address is compiled into the client.

Serve only build/web/ over HTTPS, or push the static Nginx image to your registry and configure SINTONIA_WEB_IMAGE in deployment. The Dockerfile consumes a pre-built web artifact. Nginx proxies API/events to backend:8080; join the backend Docker network or adapt that upstream. The provided Nginx configuration handles the app fallback and prevents permanent caching of entry/worker scripts.

For a subpath, rebuild with --base-href=/sintonia/ and adapt the web server prefix. The deployment example serves the domain root. Do not clear browser storage during updates: it may contain the only device identity able to decrypt history.

Native releases#

sh
flutter build appbundle --release
flutter build ipa --release
flutter build macos --release
flutter build windows --release
flutter build linux --release

Run each build on its supported host with platform SDKs. Android needs a release signing key; iOS needs macOS, Xcode, signing certificates and provisioning profiles. macOS output is build/macos/Build/Products/Release/Sintonia.app; external distribution requires signing and, depending on the channel, notarization. Windows/Linux need their own packaging and installers. Product namespace: one.sintonia. Keep signing materials outside Git.

Before publishing, validate session refresh, QR approval, recovery, attachments, system notifications and calls with two real devices. Test Chrome/Firefox, restrictive-network TURN and OS permissions. Keep canonical origins stable; changing the backend origin requires identity/account migration planning.

Image architecture#

Build for the destination server architecture, such as linux/amd64 or linux/arm64, using native CI or a validated multi-platform builder. A build on an ARM Mac does not automatically produce an AMD64 image. Pin base-image tags/digests in your release as well.

Android uses AGP 9.1.1 and Gradle 9.3.1 for SDK 37.0 compatibility required by dependencies, following the official AGP compatibility table. Android screen capture starts its mediaProjection foreground service only after capture consent. This iOS build captures the open Sintonia app only; sharing across apps requires a separately provisioned Broadcast Upload extension/App Group. Validate screen/camera/microphone permissions on actual devices before distribution.

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.

macOS Keychain and build#

All native secure-storage users now share the login-Keychain configuration (usesDataProtectionKeychain: false), including server/appearance settings, sessions and device keys. This supports local ad-hoc desktop builds without a provisioned Data Protection access group and fixes -34018 during server persistence/login. Existing service/account names and stored keys are preserved; never erase Keychain or application storage to troubleshoot.

Pinned media_kit_video/media_kit_libs_macos_video still use CocoaPods. Flutter currently uses CocoaPods fallback for these plugins alongside SwiftPM for compatible dependencies. The upstream warning may remain; it does not cause the Keychain login error. Revisit plugin migration before upgrading to a Flutter release that requires SwiftPM. Distribution to other Macs still requires the appropriate Developer ID signing/notarization; the local ad-hoc build is not a signed distributable installer. Run flutter pub get then flutter build macos --release.

The iOS application requires iOS 14 or later, matching file-picker-darwin. Keep the Podfile and Xcode target minimum versions aligned.

Host the Android APK with the web application#

The same web image/domain serves /downloads/android/. Administration → Installation → Applications and downloads → Allow APK download controls availability. Flyway V18 creates the initially disabled policy. Only an installation administrator can change it with password confirmation and MFA where applicable.

When enabled and a package is prepared, the web login and About dialog show Baixar aplicativo Android (APK) without requiring login. Missing/disabled packages are not advertised. The supplied Nginx checks policy for every request, including direct URLs; disabling blocks new downloads, not copies already downloaded or transfers already underway. Refresh an open page to refresh its button.

Release signing#

Keep your organization's release keystore outside the repository. Create it in your terminal:

sh
mkdir -p "$HOME/.sintonia"
keytool -genkeypair -v -keystore "$HOME/.sintonia/android-release.jks" \
  -alias sintonia -keyalg RSA -keysize 3072 -validity 10000 -storetype JKS

Create the Git-ignored android/key.properties locally with storeFile (absolute path), storePassword, keyAlias and keyPassword. Keep the keystore/passwords backed up securely, use the same signing identity for updates and always increase the build number. They are never sent to the server. Without that file, Flutter retains debug signing for local tests; the distribution script rejects the standard debug certificate. Do not replace an existing distributed application's signer.

Local preparation#

From the app repository:

sh
bash tool/build-web-with-android.sh --build-name=1.0.0 --build-number=23

This builds web and Android release, verifies signing, package one.sintonia and non-debuggable metadata, then prepares build/web/downloads/android/. It requires Android SDK apksigner and aapt2; set ANDROID_SDK_ROOT and JAVA_HOME on CI. The helper also recognizes ANDROID_HOME and the local project SDK.

For an APK already built by your CI:

sh
python3 tool/prepare-android-download.py \
  --apk /ABSOLUTE/PATH/app-release.apk --web-dir build/web

The filename includes build/hash. A manifest records actual version, build, byte size and SHA-256 and is replaced atomically after the APK. The script never uploads, stores private keys or enables policy. Build web before preparing the package; rebuilding can remove download files. Build the web image afterwards using the supplied Nginx configuration, which enforces policy. Other public file directories do not inherit this authorization.

DigitalOcean release#

From the deployment repository, pass a signed APK explicitly for each release that should include it:

sh
SINTONIA_ANDROID_APK=/ABSOLUTE/PATH/app-release.apk \
  bash scripts/release.sh .env.deploy 1.0.0-do.23 \
  /caminho/sintonia-backend /caminho/sintonia-app /caminho/sintonia-documentation /caminho/sintonia-recorder

push-images.sh prepares it in the temporary web build before building the linux/amd64 image. Without this variable the release has no APK. Do not copy signing secrets into .env.deploy. Update backend (V18) and web, then enable the portal option. Adjust independent checkout paths as needed. No remote release is performed by documentation preparation.

Android still asks for the installation's server address at login. This flow does not implement automatic updates or Play Store distribution.

History and Android alerts update (V19)#

Update the backend before the APK/web. Flyway V19 adds device/session-bound notification grants without deleting data. The updated Android APK offers a foreground notification connection with a persistent system notification, subject to Doze/battery/force-stop restrictions; Firebase is not required. Terminated iOS apps still need APNs. Validate delivery on real hardware. Conversation history uses pages of at most 100 and a day filter in the conversation menu.

Validate before releasing#

In addition to flutter analyze and flutter test, run the browser suite documented in the app repository's e2e/README.md. It builds separate entry points and starts an isolated Java/H2 backend, never a production installation. In e2e, run npm ci, npx playwright install chromium firefox webkit and npm test. Set SINTONIA_E2E_BACKEND_JAR for separate checkouts. LiveKit media and native devices require additional validation.

Client libraries#

The 2026-11-23 update uses LiveKit 2.14.0, File Picker 13.4.1, Flutter SVG 2.5.0, Image 4.13.1, local notifications 23.0.4 and Cupertino Icons 2.0.0. That validation used Flutter 3.44.5/Dart 3.12.2. The current project and CI SDK is Flutter 3.50.1/Dart 3.14.0. Commit both pubspec.yaml and pubspec.lock. After upgrading LiveKit, run bash tool/build-worker.sh before building web, keeping the E2EE worker aligned with the resolved SDK. Validate native builds too: this version introduces livekit_ffi. Do not force SDK-incompatible versions through dependency overrides. Real media and physical permission flows still require validation.

Compatible MLS update (V20–V23)#

Update the backend and distribute the new client. Migrations preserve existing messages and legacy keys. Do not clear storage or recreate accounts to activate MLS. Preparation runs automatically when devices and recoverable backups are compatible; the initial cut waits for old/offline devices. Existing V1 backups remain readable and the app offers a confirmed upgrade.

Keep security/forward_secrecy/ inside the app checkout: it is a local Dart package, not a separately deployed service. The openmls build hook provisions native libraries and web/pkg/. Build JavaScript Flutter web with its Rust WASM module; do not pass --wasm to Flutter. Android requires API 24 or later. Validate signed distributions on your organization's real devices before a broad rollout. See MLS protection for retained-history/custody limits.

Android build warnings with Java 25 and Kotlin#

Both wrapper scripts and the Gradle daemon enable --enable-native-access=ALL-UNNAMED for build-time native libraries. Keep the setting scoped to Gradle; do not set global JAVA_TOOL_OPTIONS or modify backend runtime flags to fix this build warning. Preserve the option if regenerating wrapper scripts.

The project now uses Flutter 3.50.1/Dart 3.14.0. Previous Android validation used Flutter 3.44.5 and does not certify the new SDK. Preserve android.builtInKotlin=false until plugin migration and Android validation are complete. The flutter_webrtc KGP warning does not prevent this APK build; the project already uses published version 1.6.3. Do not patch the Pub cache or hide warnings to present the migration as finished.

The official built-in Kotlin migration requires Flutter 3.47 or later. SDK 3.50.1 already meets the version requirement; verify all plugins before enabling android.builtInKotlin=true; then validate builds and Android calls. The android.newDsl flag controls a separate migration.

Flutter 3.50 and Dart 3.14#

The target SDK is Flutter 3.50.1 stable with Dart 3.14.0 in development and CI. Application, test and auxiliary-entry imports use the official material_ui and cupertino_ui packages. Entry points retain the official compatibility bridge for theme and localization in plugins that still use SDK Material, including media_kit_video. Remove this bridge only after those plugins migrate. See the official Material/Cupertino migration. Do not suppress warnings globally or edit package caches. Keep pubspec.lock and the web worker aligned with the update. Kotlin/AGP migration is separate and still requires Android validation.

Search channels, QR codes, uploads, security…

↑ ↓ navigate ↵ open result