Complete reference for AIOLiveTV environment variables and runtime settings.
AIOLiveTV has two kinds of configuration:
Bootstrap variables — read from the environment only, before the
database is available. They configure the things needed to start the process
(server, database, encryption, operator auth, logging). These must
be set as environment variables and cannot be changed in the dashboard.
Runtime settings — everything else. These are stored in the database and
are best configured in the dashboard (Settings page) where they can be
edited live, validated, and changed without redeploying. Every runtime
setting still has a matching environment variable: if that variable is set,
it becomes a locked override — the value is forced and the field is shown as
read-only in the UI. Leave it unset to manage the setting from the dashboard.
Recommended approach: set only the bootstrap variables in your .env,
then configure everything else from the dashboard. The
.env.sample
intentionally only contains bootstrap variables for this reason. Use
environment overrides for runtime settings only when you need to lock a value
(for example in ephemeral hosts like Vercel).
The generated tables below still list inherited AIOStreams settings (debrid,
Usenet, TMDB, anime DB, NZB proxy, torrent scrape). The dashboard Settings
page hides those. Leave them at defaults unless you know you need an env
override for the leftover pipeline.
Required. Public URL of your instance, including protocol (e.g. https://aiolivetv.example.com).
SECRET_KEY
—
Required. 64-character hex string used to encrypt stored configurations. Generate with openssl rand -hex 32. Cannot be changed after first run. The legacy alias SESSION_SECRET is still accepted for one minor release.
PORT
3000 (80 on Vercel)
Port the server listens on. Do not set this manually on Vercel; the platform provides it.
DATABASE_URI
sqlite://./data/db.sqlite
Database connection URI. Supports SQLite and PostgreSQL (postgres://user:pass@host:port/db). PostgreSQL is required on Vercel; SQLite is rejected when VERCEL=1. Prefer a pooled connection string.
DATABASE_POOL_MAX
10 (3 on Vercel)
Maximum PostgreSQL connections per process. Keep this low on Vercel because each instance opens its own pool.
REDIS_URI
—
Redis URI for shared caching. Recommended for multi-instance deployments and required for consistent cache on Vercel.
REDIS_TIMEOUT
5000
Redis client connect timeout in milliseconds.
SETTINGS_REFRESH_INTERVAL
30
How often (seconds) each instance polls the DB settings version and reloads runtime config if another instance changed a setting via the dashboard. Keeps multi-instance deployments consistent. Set 0 to disable on single-instance setups. On Vercel, settings are also refreshed at the start of requests.
INTERNAL_URL
http://localhost:${PORT}
Internal URL used for communication with built-in addons. The default is fine for almost all setups, including Vercel Container Functions.
Base URL for age-rating SVG icons used when an EPG source does not provide ContentRating.icon.
CRON_SECRET
—
Bearer token required by /api/internal/tasks/*. Vercel Cron Jobs send Authorization: Bearer ${CRON_SECRET} automatically when this variable is set.
HTTP_ALLOW_PRIVATE_URLS
false
Allow outbound HTTP to localhost and private/reserved IP ranges (RFC1918, link-local, cloud metadata). Leave false on public or multi-user instances. Set true only for a personal LAN that hosts XMLTV or M3U locally.
SECRET_KEY is required and must be a 64-character hexadecimal string.
AIOLiveTV will refuse to start without it, and changing it after first run
makes existing encrypted configurations undecryptable.
Comma-separated username:password pairs defining all valid credentials. e.g. user1:pass1,user2:pass2. Legacy alias AIOSTREAMS_AUTH is still accepted.
AIOLIVETV_AUTH_ADMINS
—
Comma-separated usernames (from AIOLIVETV_AUTH) that are admins. Admins can access the configure page and admin-only endpoints (proxy stats, proxy URL generation). If unset, all users are admins. Legacy alias AIOSTREAMS_AUTH_ADMINS.
AIOLIVETV_AUTH_PROXY
—
Comma-separated usernames (from AIOLIVETV_AUTH) allowed to use the built-in proxy. If unset, all authenticated users can use the proxy. Users not listed can still log in and access the configure page. Legacy alias AIOSTREAMS_AUTH_PROXY.
AIOLIVETV_AUTH_CONNECTIONS_LIMIT
—
Comma-separated username:limit connection limits (0 for unlimited) for the built-in proxy. Legacy alias AIOSTREAMS_AUTH_CONNECTIONS_LIMIT.
Everything below is stored in the database and editable from the dashboard
Settings page. The sections, groups, and labels mirror the dashboard exactly.
Set the listed environment variable only if you want to lock that value (it will
appear read-only in the UI). Defaults shown are the built-in defaults used when
neither the environment variable nor a stored value is present.
When true, /stremio/configure requires a valid login session (any user in AIOLIVETV_AUTH) and the config-write gate (CONFIG_ACCESS_KEY) is enforced. When false, the config page is public. Legacy alias AIOSTREAMS_AUTH_REQUIRED is still accepted.
CONFIG_ACCESS_KEY
Config Access Key
string
(unset)
Single key embedded in a config and checked on create/update/serve. If unset while authRequired is true, one is generated and persisted automatically. Rotating it invalidates every existing config until re-saved. (secret)
SESSION_TTL_SECONDS
Session TTL Seconds
duration
86400
Lifetime of a login session before the user must log in again. Defaults to 24 hours (1d).
ALIASED_CONFIGURATIONS
Aliased Configurations
map
(unset)
Map of aliases to {uuid, password} accessible at /stremio/u/<alias>/manifest.json. Env-supplied form: comma-separated alias:uuid:password entries. (secret)
ENABLE_SEARCH_API
Enable Search API
boolean
true
When true, the /api/search endpoint is mounted and reachable. (restart required)
PROVIDE_STREAM_DATA
Provide Stream Data
boolOrList
—
Whether stream metadata is included in Stremio stream responses. null (default) auto-detects from User-Agent (AIOLiveTV/* or AIOStreams/* always gets it). true/false overrides for everyone. An IP list enables it only for matching request IPs.
EXPOSE_USER_COUNT
Expose User Count
boolean
false
Include the total user count on the public status endpoint.
STREMIO_ADDONS_CONFIG_ISSUER
Stremio Addons Config Issuer
string
https://stremio-addons.net
Issuer URL declared in the manifest for the Stremio Addons Config integration.
STREMIO_ADDONS_CONFIG_SIGNATURE
Stremio Addons Config Signature
string
(unset)
Signed JWT for the Stremio Addons Config integration. Both issuer and signature must be set for the manifest field to be emitted. (secret)
TRUSTED_IPS
Trusted Ips
list
["172.17.0.0/16","127.0.0.1/32","::1/128"]
Comma-separated list of trusted IPs / CIDR ranges. Used when determining the requesting IP. User IP is always trusted via headers regardless of this setting.
Default User-Agent header for outbound HTTP requests. Supports {version} and {random} placeholders. (restart required)
AIOLIVETV_USER_AGENT
Aiostreams User Agent
string
AIOLiveTV/{version}
User-Agent identifying this addon to upstream services. Supports {version} and {random} placeholders. Legacy alias AIOSTREAMS_USER_AGENT is still accepted. (restart required)
HOSTNAME_USER_AGENT_OVERRIDES
Hostname User Agent Overrides
map
—
Per-hostname User-Agent overrides. Env shape: host1:ua1,host2:ua2,.... Takes priority over the default user agents.
ADDON_PROXY
Addon Proxy
list
—
Outbound HTTP proxy URL(s) used when fetching addon endpoints.
ADDON_PROXY_CONFIG
Addon Proxy Config
map
—
Per-hostname proxy enablement / index. Env shape: host1:bool|index,host2:bool|index,.... Index references addonProxy when configured as a list.
REQUEST_URL_MAPPINGS
Request URL Mappings
map
—
Origin-level URL rewrites applied to outbound requests. JSON object of {origin: replacement} URLs.
Default credentials pre-filled into user configurations when not provided. Format: one serviceId.credentialId=value entry per line (use \n if your environment cannot store multiline values). Service IDs: realdebrid, alldebrid, premiumize, debridlink, torbox, offcloud, putio, easynews, easydebrid, debrider, pikpak, seedr, nzbdav, altmount, stremthru_newz. Credential IDs vary by service (e.g. apiKey, username, password, clientId, encodedToken). Example: realdebrid.apiKey=xxx / easynews.username=user / easynews.password=pass. (secret)
FORCED_SERVICE_CREDENTIALS
Forced Credentials
map
(unset)
Credentials that override whatever the user has configured and are hidden from the configuration UI. Same serviceId.credentialId=value per-line format and service/credential IDs as DEFAULT_SERVICE_CREDENTIALS. (secret)
By default, built-in addons only use the primary title for text-based queries. true enables all alternative titles for every indexer; false (default) uses the primary title only; a comma-separated hostname list (e.g. jackett,knaben.org) enables it only for those indexers. Superseded per-indexer by BUILTIN_SCRAPE_TITLE_LANGUAGES.
BUILTIN_SCRAPE_TITLE_LANGUAGES
Scrape › Title Languages
map
—
Fine-grained alternative-title control, per indexer hostname, indexer name, or addon type. Supersedes BUILTIN_SCRAPE_WITH_ALL_TITLES. Format: <key>:<spec>[,<spec>...][,<key>:<spec>...]. Keys (checked in priority order): exact indexer hostname (e.g. my-indexer.com); auto-extracted indexer name (Jackett /api/v2.0/indexers/<name>/..., NZBHydra2 ?indexers=<name>); addon-id (newznab, torznab, easynews, knaben, prowlarr, torrent-galaxy); * wildcard fallback. Specs: default (primary/English-style title), all (all alternative titles up to BUILTIN_SCRAPE_TITLE_LIMIT), original (TMDB original-language title), <lang> (ISO 639-1 code, e.g. de, fr). Multiple specs under one key are combined (duplicates removed); only the highest-priority matching key applies; always falls back to the primary title. Examples: *:default,original — every indexer gets default + TMDB original-language title. *:default,newznab:default,original,de — newznab indexers query English + original + German, others English only. *:default,germanindexer.com:de,default — germanindexer.com queries German + English, all others English only.