Skip to content

Configuration Reference

Adam edited this page Aug 21, 2026 · 1 revision

Configuration Reference

All of these are environment variables — set them in .env (Docker or bare Python, both read it via python-dotenv) or as real env vars. See .env.example.

Variable Default What it does
PORTAL_SECRET_KEY (generated into instance/secret_key) Flask session key. Optional — a persistent one is generated on first start if unset
PORTAL_PORT 5000 Port the app listens on (under Docker: the port inside the container, published as HOST_PORT)
HOST_PORT 5000 Host port mapped to the container (Docker only)
PORTAL_CHECK_INTERVAL_SECONDS 120 Backend health-check frequency
PORTAL_PUBLIC_REFRESH_SECONDS 60 Public page auto-refresh frequency
PORTAL_RESOURCE_REFRESH_SECONDS 10 Auto-refresh frequency of the resources page (admin, and public if enabled)
PORTAL_WAITRESS_THREADS 12 Request-handling threads for the production server (serve_waitress.py). Waitress's own default of 4 is easy to exhaust when several tabs auto-refresh at once
PORTAL_BEHIND_PROXY false Set true only if a reverse proxy sits in front (trusts its X-Forwarded-* headers)
PORTAL_FORCE_HTTPS_COOKIES false Set true once served over HTTPS, to mark the session cookie Secure
PORTAL_DISCORD_WEBHOOK_URL (blank = disabled) Discord webhook URL — get pinged on incident/maintenance events
PORTAL_NTFY_URL (blank = disabled) Full ntfy topic URL — same events, no Discord account needed
PORTAL_DISCORD_BOT_TOKEN (blank = disabled) Enables the optional Discord bot (see the Daily Use / Admin Panel Guide) — requires pip install discord.py
PORTAL_DISCORD_BOT_REFRESH_SECONDS 300 How often the bot updates its presence / edits its tracked status messages
PORTAL_DISCORD_BOT_GUILD_ID (blank = global sync) Set to your server's ID for instant slash-command registration on a single-server bot
PORTAL_BYPARR_TIMEOUT_SECONDS 30 HTTP timeout for the Byparr integration's /health check specifically — it solves a real Cloudflare challenge before responding, so it needs longer than every other integration's 5s timeout
PORTAL_SCHEDULER_TICK_SECONDS 30 How often the scheduler looks for due tasks — the granularity floor for every task schedule. Each task's own schedule is set in the browser at /admin/tasks, not here
PORTAL_JELLYFIN_AUTH_TIMEOUT_SECONDS 10 HTTP timeout for the Jellyfin calls behind user accounts (the user list, and checking a password at sign-in). Longer than the 5s used for read-only health checks because someone is waiting on it — raise it if valid logins are reported as "couldn't reach Jellyfin"
PORTAL_UPDATE_CHECK_INTERVAL_SECONDS 21600 (6h) How often the background thread asks GitHub whether there's a new release
PORTAL_ENABLE_INAPP_UPDATE true Set false to remove the admin panel's "Update now" button entirely (update.py over SSH still works)

Clone this wiki locally