# Plembfin environment variables (all optional - copy to .env and uncomment what you need). # Values saved in Settings take precedence over these; see docs/architecture.md for details. # --- Server --- # PORT=5055 # DATA_DIR=./data # --- Admin login & secrets (auto-generated on first boot if unset) --- # ADMIN_USERNAME=admin # ADMIN_PASSWORD= # API_KEY= # WEBHOOK_SECRET= # SESSION_SECRET= # Optional external AES-256 credential-vault key (64 hex characters or base64url). # Keep this outside DATA_DIR and retain it with encrypted media-connection backups. # PLEMBFIN_CREDENTIAL_KEY= # Optional fixed public origin used for provider return links; never inferred from request headers. # PLEMBFIN_PUBLIC_URL=https://plembfin.example.com # Account connection is the default setup path. Set false only to hide those routes # and use manual server credentials exclusively. # PLEMBFIN_MEDIA_AUTH_ENABLED=true # COOKIE_SECURE=true # --- Optional website analytics (Traks) --- # The website browser code always uses first-party /t and /api/event routes. # Set this public build-time site key to the current key from the Traks # Installation panel. The collector origin is a Cloudflare Pages runtime variable. # PUBLIC_TRAKS_SITE_KEY= # TRAKS_COLLECTOR_ORIGIN=https://analytics-collect.example.workers.dev # PUBLIC_TRAKS_SCRIPT_URL is accepted only as a legacy collector-origin fallback. # --- Optional public-demo analytics (Traks) --- # These values are public by design. The browser uses first-party /t and # /api/event routes; the collector origin stays server-side. # PLEMBFIN_TRAKS_COLLECTOR_ORIGIN=https://analytics-collect.example.workers.dev # PLEMBFIN_TRAKS_SITE_KEY= # PLEMBFIN_TRAKS_SCRIPT_URL is accepted as a legacy collector-origin fallback. # --- Trakt live sync --- # Plembfin ships its official Trakt device application like the Jellyfin plugin. # Optional overrides make it possible to rotate or replace that bundled application. # TRAKT_CLIENT_ID= # TRAKT_CLIENT_SECRET= # --- Sync behaviour --- # WATCHED_PLAYED_SYNC_ENABLED=true # CATCHUP_SYNC_INTERVAL_MS=900000 # Cadence of each platform's unwatched-reconciliation fallback poll (backstops a missed webhook). # PLEX_UNWATCHED_POLL_INTERVAL_MS=60000 # Emby's fallback processes a small batch sequentially (not concurrently) every few # minutes. Set to false to opt out. # EMBY_JELLYFIN_UNWATCHED_POLL_ENABLED=true # EMBY_UNWATCHED_POLL_INTERVAL_MS=300000 # Jellyfin's native webhook is authoritative. Its ambiguous Played=false fallback is # disabled by default; enable only if Jellyfin webhooks cannot be used. A false state # must be observed twice before it is propagated. # JELLYFIN_UNWATCHED_POLL_ENABLED=false # JELLYFIN_UNWATCHED_POLL_INTERVAL_MS=300000 # JELLYFIN_UNWATCHED_CONFIRMATION_WINDOW_MS=1200000 # --- Sync tuning (defaults; Settings → Sync → Sync Tuning overrides these) --- # Percentage of playback progress at which a play counts as watched. Range 50-100. # WATCHED_THRESHOLD_PERCENT=90 # Minimum playback position, in seconds, before a stopped play is saved as a resume point. Range 0-3600. # MIN_RESUME_POSITION_SEC=60 # How long, in minutes, a "now playing" session is kept without an update before it's stale. Range 1-120. # ACTIVE_SESSION_TTL_MIN=5 # How long, in seconds, Plembfin waits for a response from Plex/Emby/Jellyfin before giving up. Range 2-120. # OUTBOUND_TIMEOUT_SEC=10 # Default policy for app-marked watched flags: review, now, release_day, or episode_timing. # WATCH_IMPORT_MODE=review # Shared outbound request pacing profile: gentle, standard, or fast. # OUTBOUND_PACING_PROFILE=standard # --- Media servers (defaults; Settings → Apps overrides these) --- # PLEX_SERVER_URL= # PLEX_TOKEN= # PLEX_USERNAME= # PLEX_ENABLED=true # EMBY_SERVER_URL= # EMBY_API_KEY= # EMBY_USER_ID= # EMBY_ENABLED=true # JELLYFIN_SERVER_URL= # JELLYFIN_API_KEY= # JELLYFIN_USER_ID= # JELLYFIN_ENABLED=true # --- Metadata API keys (defaults; Settings → API Keys overrides these) --- # TMDB_API_KEY= # YOUTUBE_API_KEY= # OMDB_API_KEY= # TVDB_API_KEY= # FANART_API_KEY= # TVDB_PROJECT_KEY= # FANART_PROJECT_KEY= # --- Debugging --- # Log a per-host outbound HTTP request count once a minute (Settings → Logs). # PLEMBFIN_DEBUG_OUTBOUND=1