Configuration
Environment Variables Complete reference for all AIOStreams environment variables.
AIOStreams is configured via environment variables. When using Docker Compose, these go in your .env file. A fully documented sample is available at .env.sample .
Variable Default Description ADDON_NAME"AIOStreams"Display name for your addon instance ADDON_ID"aiostreams.viren070.com"Unique addon identifier PORT3000Port the server listens on BASE_URL— Required. Public URL of your instance (e.g. https://aiostreams.example.com)SECRET_KEY— Required. 64-character hex string used to encrypt configs. Generate with openssl rand -hex 32ADDON_PASSWORD— Password to protect your instance. Supports multiple comma-separated values DATABASE_URIsqlite://./data/db.sqliteDatabase connection URI. Supports SQLite and PostgreSQL REDIS_URI— Redis URI for shared caching (only needed for multi-instance deployments)
SECRET_KEY is required and must be a 64-character hexadecimal string.
AIOStreams will refuse to start without it.
Variable Default Description AIOSTREAMS_AUTH— Comma-separated user:password pairs for the built-in proxy (e.g. user1:pass1,user2:pass2) AIOSTREAMS_AUTH_ADMINS— Comma-separated usernames (from AIOSTREAMS_AUTH) that have admin access TRUSTED_UUIDS— Comma-separated list of UUIDs that are considered "trusted" REGEX_FILTER_ACCESStrustedWho can use regex filters: none, trusted, or all SEL_SYNC_ACCESStrustedWho can sync SEL expressions from arbitrary URLs: all or trusted WHITELISTED_REGEX_PATTERNS— JSON array of regex pattern strings available to all users WHITELISTED_REGEX_PATTERNS_URLS— JSON array of URLs to fetch whitelisted patterns from WHITELISTED_REGEX_PATTERNS_DESCRIPTION— Markdown description shown alongside whitelisted patterns WHITELISTED_SEL_URLS— JSON array of SEL sync URLs that non-trusted users can sync from WHITELISTED_SYNC_REFRESH_INTERVAL86400How often sync URL content is refreshed (seconds)
Variable Default Description BUILTIN_STREMTHRU_URLhttps://stremthru.13377001.xyzStremThru URL for built-in Debrid integrations BUILTIN_SCRAPE_WITH_ALL_TITLESfalseUse alternative titles for text queries. true = all, false = primary only, or comma-separated hostnames BUILTIN_SCRAPE_TITLE_LANGUAGES— Fine-grained per-indexer title language control. See .env.sample for format BUILTIN_DEBRID_INSTANT_AVAILABILITY_CACHE_TTL1800Cache TTL for debrid cache status (seconds) BUILTIN_DEBRID_PLAYBACK_LINK_CACHE_TTL3600Cache TTL for debrid playback links (seconds) BUILTIN_DEBRID_ERROR_CACHE_TTL3600Cache TTL for content-level failures (seconds) BUILTIN_DEBRID_LIBRARY_CACHE_TTL604800Cache TTL for debrid library list (seconds) BUILTIN_DEBRID_LIBRARY_STALE_THRESHOLD600Stale threshold for background library refresh (seconds) BUILTIN_DEBRID_USE_TORRENT_DOWNLOAD_URLtrueUse torrent download URLs instead of magnets MAX_NZB_FAILOVER_COUNT5Max NZB failover attempts users can configure BUILTIN_DOWNLOAD_POLL_INTERVALsee sample Per-service download poll intervals (e.g. torbox:15s,nzbdav:3s,*:10s) BUILTIN_DOWNLOAD_MAX_WAIT_TIMEsee sample Per-service max wait times before timeout BUILTIN_GET_TORRENT_TIMEOUT5000Timeout for fetching torrent metadata from a URL (ms) BUILTIN_GET_TORRENT_CONCURRENCY100Concurrency for torrent metadata fetch tasks BUILTIN_GET_TORRENT_LAZILYtrueFetch non-magnet torrents in the background instead of blocking the search BUILTIN_MINIMUM_BACKGROUND_REFRESH_INTERVAL86400Minimum interval between background cache refreshes (seconds)
Variable Description BUILTIN_PROWLARR_URLDefault Prowlarr URL (hidden from users) BUILTIN_PROWLARR_API_KEYDefault Prowlarr API key (hidden from users) BUILTIN_PROWLARR_INDEXERSComma-separated list of allowed indexers BUILTIN_PROWLARR_SEARCH_CACHE_TTLCache TTL for search results (default: 604800) BUILTIN_PROWLARR_INDEXERS_CACHE_TTLCache TTL for indexer list (default: 1209600)
Variable Description BUILTIN_JACKETT_URLDefault Jackett URL (hidden from users) BUILTIN_JACKETT_API_KEYDefault Jackett API key (hidden from users)
Variable Description BUILTIN_NZBHYDRA_URLDefault NZBHydra2 URL (hidden from users) BUILTIN_NZBHYDRA_API_KEYDefault NZBHydra2 API key (hidden from users)
Variable Description BUILTIN_KNABEN_SEARCH_TIMEOUTTimeout for Knaben search requests (default: 30000 ms) BUILTIN_KNABEN_SEARCH_CACHE_TTLCache TTL for Knaben results (default: 604800) BUILTIN_KNABEN_DOWNLOAD_TORRENTSWhether to download .torrent files for results without an infohash
Variable Description BUILTIN_TORRENT_GALAXY_URLTGx URL (default: https://torrentgalaxy.space) BUILTIN_TORRENT_GALAXY_SEARCH_TIMEOUTTimeout for TGx searches (default: 30000 ms) BUILTIN_TORRENT_GALAXY_SEARCH_CACHE_TTLCache TTL (default: 604800) BUILTIN_TORRENT_GALAXY_PAGE_LIMITMax pages to fetch (default: 5)
Variable Default Description BUILTIN_NAB_SEARCH_TIMEOUT30000Search request timeout (ms) BUILTIN_NAB_SEARCH_CACHE_TTL604800Search results cache TTL (seconds) BUILTIN_NAB_CAPABILITIES_CACHE_TTL1209600Indexer capabilities cache TTL (seconds) BUILTIN_NAB_MAX_PAGES5Max pages to fetch per search BUILTIN_NAB_USER_AGENT— Override the User-Agent for *znab requests BUILTIN_NAB_HTTP_PROXY— Per-namespace HTTP proxy override (e.g. torznab:http://proxy:8118)
Variable Default Description BUILTIN_TORBOX_SEARCH_SEARCH_API_TIMEOUT30000Timeout for TorBox Search API (ms) BUILTIN_TORBOX_SEARCH_CACHE_PER_USER_SEARCH_ENGINEfalseCache results per-user when user search engines are enabled BUILTIN_TORBOX_SEARCH_SEARCH_API_CACHE_TTL604800Cache TTL for search results (seconds)
Variable Description BUILTIN_GDRIVE_CLIENT_IDOAuth2 Client ID for Google Drive integration BUILTIN_GDRIVE_CLIENT_SECRETOAuth2 Client Secret for Google Drive integration BUILTIN_GDRIVE_PAGE_SIZE_LIMITMax Drive API results per query (default: 1000)
Variable Description BUILTIN_BITMAGNET_URLURL of a Bitmagnet instance to enable in the marketplace
Variable Default Description BUILTIN_SEADEX_URLhttps://releases.moeSeaDex URL BUILTIN_SEADEX_DATASET_REFRESH_INTERVAL86400Refresh interval for SeaDex data (seconds)
Variable Default Description BUILTIN_ZILEAN_URLhttps://zileanfortheweebs.midnightignite.meZilean URL BUILTIN_ANIMETOSHO_URLhttps://feed.animetosho.orgAnimeTosho URL BUILTIN_NEKOBT_URLhttps://nekobt.to/api/torznabNekoBT URL
Variable Default Description ANIME_DB_LEVEL_OF_DETAILrequiredDetail level for the local anime database: none, required, or full ANIME_DB_FRIBB_MAPPINGS_REFRESH_INTERVAL86400000Refresh interval for Fribb mappings (ms) ANIME_DB_MANAMI_DB_REFRESH_INTERVAL604800000Refresh interval for Manami DB (ms) ANIME_DB_KITSU_IMDB_MAPPING_REFRESH_INTERVAL86400000Refresh interval for Kitsu→IMDb mappings (ms) ANIME_DB_EXTENDED_ANITRAKT_MOVIES_REFRESH_INTERVAL86400000Refresh interval for AniTrakt movie mappings (ms) ANIME_DB_EXTENDED_ANITRAKT_TV_REFRESH_INTERVAL86400000Refresh interval for AniTrakt TV mappings (ms)
For each service, you can set a DEFAULT_ value (pre-filled in the UI but user-editable) or a FORCED_ value (overrides user settings and is hidden from the UI).
Service Variables Real-Debrid DEFAULT_REALDEBRID_API_KEY, FORCED_REALDEBRID_API_KEYAllDebrid DEFAULT_ALLDEBRID_API_KEY, FORCED_ALLDEBRID_API_KEYPremiumize DEFAULT_PREMIUMIZE_API_KEY, FORCED_PREMIUMIZE_API_KEYDebrid-Link DEFAULT_DEBRIDLINK_API_KEY, FORCED_DEBRIDLINK_API_KEYTorBox DEFAULT_TORBOX_API_KEY, FORCED_TORBOX_API_KEYOffCloud DEFAULT_OFFCLOUD_API_KEY/EMAIL/PASSWORD, FORCED_OFFCLOUD_API_KEY/EMAIL/PASSWORDPut.io DEFAULT_PUTIO_CLIENT_ID/SECRET, FORCED_PUTIO_CLIENT_ID/SECRETEasyNews DEFAULT_EASYNEWS_USERNAME/PASSWORD, FORCED_EASYNEWS_USERNAME/PASSWORDEasyDebrid DEFAULT_EASYDEBRID_API_KEY, FORCED_EASYDEBRID_API_KEYDebrider DEFAULT_DEBRIDER_API_KEY, FORCED_DEBRIDER_API_KEYPikPak DEFAULT_PIKPAK_EMAIL/PASSWORD, FORCED_PIKPAK_EMAIL/PASSWORDSeedr DEFAULT_SEEDR_ENCODED_TOKEN, FORCED_SEEDR_ENCODED_TOKEN
Also available for metadata:
Variable Description TMDB_ACCESS_TOKENTMDB access token for title matching TMDB_API_KEYTMDB API key TRAKT_CLIENT_IDTrakt client ID for alias lookups FETCH_TRAKT_ALIASESWhether to fetch Trakt aliases (default: true)
These control the default stream proxy shown to users. DEFAULT_ values are pre-filled. FORCE_ values override and hide the option.
Variable Default Description DEFAULT_PROXY_IDmediaflowProxy type: mediaflow or stremthru DEFAULT_PROXY_URL— URL of your proxy instance DEFAULT_PROXY_PUBLIC_URL— Public URL of your proxy instance (if different) DEFAULT_PROXY_CREDENTIALS— Credentials in username:password format DEFAULT_PROXY_PUBLIC_IP— Public IP of the proxy DEFAULT_PROXY_PROXIED_SERVICES— JSON array of service IDs to proxy (e.g. ["realdebrid","torbox"]) DEFAULT_PROXY_ENABLED— Default enabled state FORCE_PROXY_ID— Force proxy type FORCE_PROXY_URL— Force proxy URL FORCE_PROXY_CREDENTIALS— Force proxy credentials FORCE_PROXY_ENABLED— Force proxy on/off FORCE_PROXY_DISABLE_PROXIED_ADDONSfalseDisable the "Proxied Addons" feature ENCRYPT_MEDIAFLOW_URLStrueEncrypt MediaFlow streaming URLs ENCRYPT_STREMTHRU_URLStrueEncrypt StremThru streaming URLs
Configure a proxy for requests AIOStreams makes to upstream addons (e.g. to bypass Torrentio IP blocks).
Variable Description ADDON_PROXYProxy URL, e.g. http://warp:1080. Can be a JSON array for multiple proxies ADDON_PROXY_CONFIGComma-separated rules domain:bool_or_index (e.g. *:false,*.strem.fun:true)
Variable Default Description DEFAULT_MAX_CACHE_SIZE100000Max items in any cache instance PROXY_IP_CACHE_TTL900TTL for proxy public IP cache (seconds). -1 disables MANIFEST_CACHE_TTL21600Manifest cache TTL (seconds) SUBTITLE_CACHE_TTL300Subtitle cache TTL (seconds) STREAM_CACHE_TTL-1Stream cache TTL. Supports per-addon rules (e.g. *:-1,torrentio:300) CATALOG_CACHE_TTL300Catalog cache TTL (seconds) META_CACHE_TTL300Meta cache TTL (seconds) ADDON_CATALOG_CACHE_TTL300Addon catalog cache TTL (seconds) POSTER_API_KEY_VALIDITY_CACHE_TTL604800TTL for poster service API key validation cache (seconds) BACKGROUND_RESOURCE_REQUEST_TIMEOUT— Timeout for background resource requests (ms)
Variable Description CUSTOM_HTMLHTML snippet displayed at the top of the configuration page FEATURED_TEMPLATE_IDSComma-separated template IDs to pin in the "About" section (max 2) ALTERNATE_DESIGNEnable alternate AIOStreams logo design (default: false) ALIASED_CONFIGURATIONSComma-separated alias:uuid:encryptedPassword vanity URL triplets PROVIDE_STREAM_DATAtrue, false, or comma-separated IPs to control stream data exposureENABLE_SEARCH_APIEnable the /api/v1/search endpoint (default: true)
Variable Default Description TEMPLATE_URLS[]JSON array of URLs to fetch remote templates from TEMPLATE_REFRESH_INTERVAL86400How often remote templates are refreshed (seconds). 0 disables auto-refresh
Variable Default Description DISABLE_SELF_SCRAPINGtruePrevent this instance from being added as an addon to itself DISABLED_HOSTS— host:reason pairs to block specific hostnames from being addedDISABLED_ADDONS— addonID:reason pairs to hide addons from the marketplaceDISABLED_SERVICES— service:reason pairs to hide services from the configuration page
Variable Default Options LOG_LEVELhttperror, warn, info, http, verbose, debug, sillyLOG_FORMATtexttext or jsonLOG_SENSITIVE_INFOtrueInclude API keys/sensitive data in logs LOG_TIMEZONEEtc/UTCIANA timezone string (e.g. Europe/London)
Variable Default Description MAX_ADDONS15Max addons per configuration MAX_GROUPS20Max groups per configuration MAX_KEYWORD_FILTERS30Max keyword filters per configuration MAX_STREAM_EXPRESSIONS200Max total stream expressions across all filter types MAX_STREAM_EXPRESSIONS_TOTAL_CHARACTERS50000Max total character count across all stream expressions MAX_SEL_LENGTH3000Max character length of a single SEL expression MAX_FORMATTER_TEMPLATE_LENGTH5000Max character length for formatter templates MAX_BACKGROUND_PINGS2Max streams that can be pinged in a single background operation PRELOAD_STREAMS_CONCURRENCY5Concurrency for stream preload requests MAX_TIMEOUT50000Maximum addon timeout override (ms) MIN_TIMEOUT1000Minimum addon timeout override (ms) DEFAULT_TIMEOUT7000Default request timeout (ms) PRECACHE_NEXT_EPISODE_MIN_INTERVAL86400Minimum interval between precache attempts of the same episode (seconds) PRELOAD_MIN_INTERVAL3600Minimum interval between preload operations for the same item (seconds)
Variable Default (window/max) Description DISABLE_RATE_LIMITSfalseDisable all rate limits (not recommended) STATIC_RATE_LIMIT_WINDOW / _MAX_REQUESTS5s / 75Static file serving USER_API_RATE_LIMIT_WINDOW / _MAX_REQUESTS5s / 5User API STREAM_API_RATE_LIMIT_WINDOW / _MAX_REQUESTS5s / 10Stream API FORMAT_API_RATE_LIMIT_WINDOW / _MAX_REQUESTS5s / 30Format API CATALOG_API_RATE_LIMIT_WINDOW / _MAX_REQUESTS5s / 5Catalog API ANIME_API_RATE_LIMIT_WINDOW / _MAX_REQUESTS60s / 120Anime API STREMIO_STREAM_RATE_LIMIT_WINDOW / _MAX_REQUESTS15s / 10Stremio stream endpoint STREMIO_CATALOG_RATE_LIMIT_WINDOW / _MAX_REQUESTS5s / 30Stremio catalog endpoint STREMIO_MANIFEST_RATE_LIMIT_WINDOW / _MAX_REQUESTS5s / 5Stremio manifest endpoint STREMIO_SUBTITLE_RATE_LIMIT_WINDOW / _MAX_REQUESTS5s / 10Stremio subtitle endpoint STREMIO_META_RATE_LIMIT_WINDOW / _MAX_REQUESTS5s / 15Stremio meta endpoint
Variable Default Description PRUNE_INTERVAL86400How often to check for inactive users (seconds) PRUNE_MAX_DAYS-1Days of inactivity before pruning. -1 disables pruning
Variable Description REQUEST_URL_MAPPINGSJSON map to reroute outgoing requests (e.g. {"https://ext.example.com": "http://localhost:3000"}) STREAM_URL_MAPPINGSJSON map to rewrite stream URLs returned to clients
For each supported third-party addon, you can configure a default URL and timeout via <ADDON_NAME>_URL and DEFAULT_<ADDON_NAME>_TIMEOUT. Examples:
Variable Default TORRENTIO_URLhttps://torrentio.strem.fun/COMET_URLhttps://comet.feels.legal/MEDIAFUSION_URLhttps://mediafusion.elfhosted.com/JACKETTIO_URLhttps://jackettio.elfhosted.com/STREMTHRU_STORE_URLhttps://stremthru.13377001.xyz/stremio/store/METEOR_URLhttps://meteorfortheweebs.midnightignite.me
Refer to the .env.sample for the complete list. Most addons also support FORCE_<ADDON>_HOSTNAME, FORCE_<ADDON>_PORT, and FORCE_<ADDON>_PROTOCOL overrides for reverse proxy scenarios.