All runtime configuration is via environment variables in .env. See .env.example for the full template.
Every setting is named OTAVI_<COMPONENT>_<SETTING> (components: HUB, DB, REDIS, S3, MQTT, AUTH, SMTP, EBIRD, BACKUP, MOBILE, WORKER; the deployment identity and the three hostnames are OTAVI_APP_*, OTAVI_MQTT_FQDN, OTAVI_DOCS_FQDN). The only unprefixed names are the host's PUID, PGID, TZ and Compose's own COMPOSE_*.
docker-compose.yml hands each service exactly the variables it reads, so a variable that is not listed there has no effect inside a container.
Hub process mode: full (single process), api (HTTP + WebSocket only, scalable), dispatcher (background workers only, single instance)
OTAVI_HUB_PORT
3000
HTTP listen port (internal)
OTAVI_AUTH_JWT_SECRET
required
Secret for signing JWT session tokens
OTAVI_AUTH_PLATFORM_ADMIN_EMAILS
—
Comma-separated emails for hub admin access
OTAVI_HUB_ALLOW_WEAK_SECRETS
—
1 lets a development hub start with placeholder or short secrets (the hub refuses otherwise and names them)
OTAVI_HUB_METRICS_TOKEN
—
Bearer token for the Prometheus endpoint GET /api/metrics; empty = endpoint off. See metrics
OTAVI_HUB_INTERNAL_API_KEY
—
Machine access key for trusted internal callers and the APK upload
OTAVI_AUTH_MFA_ENCRYPTION_KEY
—
32-byte hex key (openssl rand -hex 32) used to AES-256-GCM-encrypt stored TOTP secrets. Required once MFA is enrolled — rotating it invalidates every existing TOTP and forces re-enrollment. Without it, MFA features fail-closed at boot.
OTAVI_AUTH_WEBAUTHN_RP_ID
derived
WebAuthn Relying Party ID (must match the eTLD+1 the user logs in on). Defaults to OTAVI_APP_FQDN.
OTAVI_AUTH_WEBAUTHN_RP_NAME
Otavi
Friendly display name shown by browser passkey prompts.
OTAVI_AUTH_WEBAUTHN_ORIGIN
derived
Full origin URL passed to WebAuthn verification. Defaults to https://${OTAVI_APP_FQDN}.
eBird API key. When set, enables "expected species near here" filtering, rare-detection effort-aware confidence (Johnston 2021), and the Expected species card on satellite detail. Free to obtain from ebird.org
Configured on the Hub settings page, stored in platform_settings table.
Setting
Default
Description
allow_self_registration
true
Users can register without invite
allow_tenant_creation
false
Logged-in users can create tenants
image_download_delay_seconds
0 (auto)
Delay between Wikipedia image downloads. 0 derives from authenticated/unauthenticated rate tier
wikimedia_access_token
—
OAuth 2.0 token for Wikimedia API (raises rate limit from 500 to 10 000 req/hr)
wikimedia_contact_email
—
Contact email for Wikimedia User-Agent header
inaturalist_enabled
false
Opt-in fallback for gallery extras when Wikipedia is exhausted, and the species pages' observation maps (fetched in the background, at most 6,000 requests a day)
image_license_filter
["cc0","cc-by","cc-by-sa"]
License codes accepted by iNaturalist fetches; admin can widen to cc-by-nc / cc-by-nc-sa / cc-by-nc-nd. Photos with no license_code (= all rights reserved) are always rejected
species_extra_images_count
5
Gallery extras per species beyond the primary. No upper bound; 0 disables extras
audio_storage_cap_gb
50
Soft cap (GB). When total usage crosses, next sweep purges oldest unprotected audio
audio_storage_hard_cap_gb
60 (= soft × 1.2)
Hard cap (GB). Same eviction policy as soft pass — protected (keep-best + pinned) audio is never auto-deleted
audio_retention_days
30
Delete non-keep-best audio older than this
keep_best_per_species
10
Top-N detections by confidence per species, never auto-deleted
silent_chunk_retention_hours
6
Purge chunks with 0 detections after this many hours
apk_keep_last_n
5
Keep the N most recent APK builds in mobile_releases; older ones drop on next sweep
retention_enabled
false
Run scheduled retention sweeps every 6h
inference_mode
single
single = default model only / compare = also run enabled non-default models on sampled chunks (writes to shadow_detections)
inference_compare_sample_rate
10
Percentage of chunks routed through compare mode (1–100)
dismissed_catalog_ids
[]
Catalog template IDs admin has hidden via the × button
Configured in Tenant Settings page, stored in tenant_settings table. The settings satellites receive, with their hub, team and satellite levels and how they combine, are listed in Settings and permissions.
Setting
Default
Description
confidence_high
0.7
High confidence threshold
confidence_low
0.4
Low/uncertain confidence threshold
min_confidence
0.1
Minimum display threshold
offline_timeout_minutes
5
Satellite offline detection timeout
verification_consensus
3
Agreeing votes that confirm or reject a detection, from 1 to 20
RMS silence-gate floor, 0 = off (real microphones sit far under any fixed floor, and YAMNet scores silence near zero). Set only to detect a dead input at a known site