Environment Variables Reference
Complete reference of all environment variables supported by Mydia.
Required Variables
| Variable | Description | Example |
|---|---|---|
SECRET_KEY_BASE |
Phoenix secret key for cookies/sessions | Generate with: openssl rand -base64 48 |
GUARDIAN_SECRET_KEY |
JWT signing key for authentication | Generate with: openssl rand -base64 48 |
Both must be set to a non-empty value of at least 32 characters, and Mydia
refuses to start otherwise with an error naming the variable. Set-but-blank
counts as unset: a zero-length signing key is accepted by the JWT library for
both signing and verification, which would make tokens forgeable. The 32
character floor is the one mix phx.gen.secret and mix guardian.gen.secret
enforce themselves, so any secret produced by the commands above passes.
GUARDIAN_SECRET_KEY is required in its own right and is never inherited from
SECRET_KEY_BASE.
Container Configuration
| Variable | Description | Default |
|---|---|---|
PUID |
User ID for file permissions | 1000 |
PGID |
Group ID for file permissions | 1000 |
TZ |
Time zone for the container and the default display zone of the web UI, as an IANA name (e.g., Europe/Rome). Each user can override it under Profile, Appearance, Date & time. |
UTC |
DATABASE_PATH |
Path to SQLite database file | /config/mydia.db |
Server Configuration
| Variable | Description | Default |
|---|---|---|
PHX_HOST |
Public hostname for the application | localhost |
PORT |
HTTP server port (also used for URL generation) | 4000 |
HTTPS_PORT |
HTTPS server port (also used for URL generation) | 4443 |
HOST |
Server binding address | 0.0.0.0 |
URL_SCHEME |
No effect in a container. Accepted and validated, but a release build hardcodes its external URL to https://{PHX_HOST} and never reads this. |
http |
PHX_CHECK_ORIGIN |
WebSocket origin checking | Allows PHX_HOST with any scheme |
URL_SCHEME does not change generated links
Absolute URLs, including the OIDC redirect URI, are always https://{PHX_HOST}
regardless of what you set here. If you serve Mydia over plain http, set
OIDC_REDIRECT_URI explicitly. See
SSO / OIDC.
Port Configuration Notes
The PORT and HTTPS_PORT environment variables serve dual purposes:
1. Server binding - The ports on which the HTTP and HTTPS servers listen
2. URL generation - Used to generate direct access URLs (e.g., sslip.io URLs for remote access)
This simplifies configuration by eliminating the need for separate port variables for URL generation.
PHX_CHECK_ORIGIN Options
false- Allow all origins (useful for IP-based access)- Comma-separated list of allowed origins
Media Library
| Variable | Description | Default |
|---|---|---|
MOVIES_PATH |
Movies directory path | /media/movies |
TV_PATH |
TV shows directory path | /media/tv |
Additional Library Paths
Configure additional libraries using numbered variables (<N> = 1, 2, 3, etc.):
| Variable Pattern | Description | Example |
|---|---|---|
LIBRARY_PATH_<N>_PATH |
Directory path | /media/anime |
LIBRARY_PATH_<N>_NAME |
Display name shown in the UI. Defaults to the folder name. | Kids Movies |
LIBRARY_PATH_<N>_TYPE |
Library type | mixed |
LIBRARY_PATH_<N>_MONITORED |
Enable monitoring | true |
LIBRARY_PATH_<N>_SCAN_INTERVAL |
Automatic scan interval in seconds. Minimum 900. Omit for manual-only scanning. | 3600 |
Library Types: movies, series, or mixed
S3 Storage Backends
Declare S3-compatible storage (AWS S3, MinIO, Cloudflare R2, and similar) with
numbered variables (<N> = 1, 2, 3, etc.). A library path refers to a backend by
name as s3://<name>/<prefix>.
| Variable Pattern | Description | Example |
|---|---|---|
STORAGE_BACKEND_<N>_NAME |
Name used in s3://<name>/ paths. Required. |
media |
STORAGE_BACKEND_<N>_ENDPOINT |
Endpoint URL. Leave empty for AWS S3. | http://minio:9000 |
STORAGE_BACKEND_<N>_REGION |
Region. Defaults to us-east-1. |
eu-west-1 |
STORAGE_BACKEND_<N>_BUCKET |
Bucket name. Required. | library |
STORAGE_BACKEND_<N>_ACCESS_KEY_ID |
Access key ID. Required. | AKIDEXAMPLE |
STORAGE_BACKEND_<N>_SECRET_ACCESS_KEY |
Secret access key. Required. | - |
STORAGE_BACKEND_<N>_PATH_STYLE |
Use path-style addressing. Defaults to true. |
true |
Authentication
| Variable | Description | Default |
|---|---|---|
LOCAL_AUTH_ENABLED |
Enable local username/password auth | true |
OIDC_ENABLED |
Enable OIDC/OpenID Connect auth | false |
OIDC_ISSUER |
OIDC issuer URL (e.g., https://auth.example.com) |
- |
OIDC_CLIENT_ID |
OIDC client ID | - |
OIDC_CLIENT_SECRET |
OIDC client secret | - |
OIDC_REDIRECT_URI |
OIDC callback URL | Auto-computed |
OIDC_SCOPES |
Space-separated scope list | openid profile email |
LIBRARY_API_KEY |
Admin key for the Library API, sent as the x-api-key header. Optional; unset means only database API keys work. Minimum 32 characters. Generate with openssl rand -hex 32. Remove it and restart to revoke. |
(unset) |
Legacy Variable
OIDC_DISCOVERY_DOCUMENT_URI is accepted as a legacy alias for OIDC_ISSUER. The issuer is extracted by stripping the /.well-known/openid-configuration suffix.
Feature Flags
| Variable | Description | Default |
|---|---|---|
ENABLE_PLAYER |
Everything that serves the Mydia player: p2p remote access and pairing, streaming, offline downloads, intro and credits detection, and the player's pages and buttons | true |
ENABLE_CARDIGANN |
Enable native Cardigann indexer support | true |
CARDIGANN_ENGINE |
Pins which engine runs Cardigann definitions, builtin or prowlarr, and locks the choice on the Indexers page. Unset, the choice is made there (default builtin). The Prowlarr-based engine (prowlarr) is experimental: it downloads about 39 MB and compiles, and uses more memory; see Cardigann Indexers. Any other value stops startup |
(unset) |
CARDIGANN_WASM_PATH |
When the Prowlarr-based engine is selected (on the Indexers page or with CARDIGANN_ENGINE=prowlarr): path to a local cardigann-<hash>.wasm, for servers without internet access. Checked against the checksum built into the release |
(unset) |
ENABLE_IMPORT_LISTS |
Enable import lists for syncing external lists (TMDB watchlists, popular, etc.) | true |
ENABLE_REMOTE_ACCESS |
P2P remote access for the player. Also a toggle under Admin › System › Remote Access; when the variable is set it wins and the toggle is locked | true |
ENABLE_PLAYER=false is for servers nobody plays from. Mydia then starts no p2p
node, answers 404 on the player's routes, and hides the Player and Devices
entries. It accepts true, false, 1 and 0, and refuses to start on
anything else, so a typo cannot leave the player running. It is read at
startup, so changing it takes a restart.
ENABLE_PLAYBACK is gone. If you set it, Mydia logs a warning and ignores it.
Import Lists
| Variable | Description | Default |
|---|---|---|
IMPORT_LISTS_ALLOW_PRIVATE_DESTINATIONS |
Allow a Custom URL import list to fetch from private, loopback or link-local addresses | false |
Only enable this for a list you host yourself
A Custom URL list is fetched by the Mydia server, not by your browser, so the URL can reach anything the server can reach: other containers, your router, a cloud metadata endpoint. Mydia refuses those destinations by default and revalidates every redirect hop.
Set this to true only if you serve the list from your own LAN or container
network, for example a JSON file on a NAS. It never relaxes the scheme
allowlist, which is always limited to http and https.
Download Clients
Configure multiple clients using numbered variables (<N> = 1, 2, 3, etc.):
| Variable Pattern | Description | Example |
|---|---|---|
DOWNLOAD_CLIENT_<N>_NAME |
Display name | qBittorrent |
DOWNLOAD_CLIENT_<N>_TYPE |
Client type | qbittorrent |
DOWNLOAD_CLIENT_<N>_ENABLED |
Enable this client | true |
DOWNLOAD_CLIENT_<N>_PRIORITY |
Client priority. Lower wins: 1 is tried before 2. | 1 |
DOWNLOAD_CLIENT_<N>_HOST |
Hostname or IP | qbittorrent |
DOWNLOAD_CLIENT_<N>_PORT |
Client port | 8080 |
DOWNLOAD_CLIENT_<N>_USE_SSL |
Use SSL/TLS | false |
DOWNLOAD_CLIENT_<N>_USERNAME |
Auth username | - |
DOWNLOAD_CLIENT_<N>_PASSWORD |
Auth password | - |
DOWNLOAD_CLIENT_<N>_API_KEY |
API key (SABnzbd, debrid, qBittorrent 5.2+) | - |
DOWNLOAD_CLIENT_<N>_WEB_UI_URL |
Address your browser uses to open the client's web UI from the Downloads page. Leave blank to derive it from HOST and PORT. Set it when HOST is a Docker hostname (such as qbittorrent) that your browser cannot resolve. |
https://qbit.example.org |
DOWNLOAD_CLIENT_<N>_CATEGORY |
Default category | - |
DOWNLOAD_CLIENT_<N>_EXTERNAL_TORRENTS |
What to do with torrents Mydia did not add: auto, adopt, category_only, ignore. category_only is not valid for rqbit. |
auto |
DOWNLOAD_CLIENT_<N>_DOWNLOAD_DIRECTORY |
Download directory | - |
DOWNLOAD_CLIENT_<N>_PROVIDER |
Debrid provider (debrid only) | real_debrid |
DOWNLOAD_CLIENT_<N>_WATCH_FOLDER |
Watch folder (blackhole only) | /downloads/watch |
DOWNLOAD_CLIENT_<N>_COMPLETED_FOLDER |
Completed folder (blackhole only) | /downloads/complete |
DOWNLOAD_CLIENT_<N>_NAMEis required: clients are discovered by their_NAMEvariable, so a block without it is ignored.
Client Types: qbittorrent, transmission, rqbit, rtorrent, blackhole, sabnzbd, nzbget, debrid
# qBittorrent
DOWNLOAD_CLIENT_1_NAME=qBittorrent
DOWNLOAD_CLIENT_1_TYPE=qbittorrent
DOWNLOAD_CLIENT_1_HOST=qbittorrent
DOWNLOAD_CLIENT_1_PORT=8080
DOWNLOAD_CLIENT_1_USERNAME=admin
DOWNLOAD_CLIENT_1_PASSWORD=adminpass
# Alternative to username/password on qBittorrent 5.2 and newer. Generate the
# key in qBittorrent under Preferences, WebUI, API Key. When set, it takes
# precedence over the username and password. qBittorrent holds exactly one
# API key at a time, so generating a new one immediately invalidates the
# previous one and breaks any other integration still using it.
# DOWNLOAD_CLIENT_1_API_KEY=qbt_yourkeyhere
# Transmission
DOWNLOAD_CLIENT_2_NAME=Transmission
DOWNLOAD_CLIENT_2_TYPE=transmission
DOWNLOAD_CLIENT_2_HOST=transmission
DOWNLOAD_CLIENT_2_PORT=9091
DOWNLOAD_CLIENT_2_USERNAME=admin
DOWNLOAD_CLIENT_2_PASSWORD=adminpass
# rqbit
DOWNLOAD_CLIENT_3_NAME=rqbit
DOWNLOAD_CLIENT_3_TYPE=rqbit
DOWNLOAD_CLIENT_3_HOST=rqbit
DOWNLOAD_CLIENT_3_PORT=3030
# Optional, when rqbit HTTP basic auth is enabled
DOWNLOAD_CLIENT_3_USERNAME=admin
DOWNLOAD_CLIENT_3_PASSWORD=adminpass
# SABnzbd
DOWNLOAD_CLIENT_4_NAME=SABnzbd
DOWNLOAD_CLIENT_4_TYPE=sabnzbd
DOWNLOAD_CLIENT_4_HOST=sabnzbd
DOWNLOAD_CLIENT_4_PORT=8080
DOWNLOAD_CLIENT_4_API_KEY=your-sabnzbd-api-key
# NZBGet
DOWNLOAD_CLIENT_5_NAME=NZBGet
DOWNLOAD_CLIENT_5_TYPE=nzbget
DOWNLOAD_CLIENT_5_HOST=nzbget
DOWNLOAD_CLIENT_5_PORT=6789
DOWNLOAD_CLIENT_5_USERNAME=nzbget
DOWNLOAD_CLIENT_5_PASSWORD=tegbzn6789
# rTorrent (uses the XML-RPC path /RPC2 by default)
DOWNLOAD_CLIENT_6_NAME=rTorrent
DOWNLOAD_CLIENT_6_TYPE=rtorrent
DOWNLOAD_CLIENT_6_HOST=rtorrent
DOWNLOAD_CLIENT_6_PORT=8080
DOWNLOAD_CLIENT_6_USERNAME=admin
DOWNLOAD_CLIENT_6_PASSWORD=adminpass
Debrid Clients
Debrid clients connect to a hosted debrid service rather than a self-hosted
torrent/usenet daemon. They require TYPE=debrid, an API_KEY, and a
PROVIDER selecting which service to use. HOST/PORT are ignored: each
provider's API endpoint is built in.
Providers: real_debrid, all_debrid, premiumize, tor_box
DOWNLOAD_CLIENT_7_NAME=Real-Debrid
DOWNLOAD_CLIENT_7_TYPE=debrid
DOWNLOAD_CLIENT_7_API_KEY=your-debrid-api-key
DOWNLOAD_CLIENT_7_PROVIDER=real_debrid
Swap PROVIDER for any of the values above (e.g. all_debrid, premiumize,
tor_box) to use a different service. Debrid clients default to a 24-hour
stall-detection grace period (vs. 60 minutes for other clients), since remote
caching can take longer to resolve a download.
Blackhole Clients
Blackhole clients drop .torrent files into a watched folder for an external
client to pick up, and detect finished downloads in a completed folder. They
require TYPE=blackhole, a WATCH_FOLDER, and a COMPLETED_FOLDER instead of
host/port.
DOWNLOAD_CLIENT_8_NAME=Blackhole
DOWNLOAD_CLIENT_8_TYPE=blackhole
DOWNLOAD_CLIENT_8_WATCH_FOLDER=/downloads/watch
DOWNLOAD_CLIENT_8_COMPLETED_FOLDER=/downloads/complete
Media Servers
Plex runs as a bundled plugin. Each Plex server is an instance, numbered from 0. The easiest setup is Admin > Configuration > Media Servers > Add server > Plex, which signs in with your Plex account and finds your servers. To declare a server in the environment instead:
PLUGIN_PLEX_0_NAME="Living room"
PLUGIN_PLEX_0_URL=http://192.168.1.20:32400
PLUGIN_PLEX_0_TOKEN=your-plex-token
# Optional
PLUGIN_PLEX_0_ENABLED=true
PLUGIN_PLEX_0_SYNC_WATCHED=on # on or off (default off)
PLUGIN_PLEX_0_SYNC_WATCHED_DIRECTION=bidirectional # bidirectional, import or export
PLUGIN_PLEX_<N>_URL is required for a declared server. Servers declared this
way show as read-only in the UI. The URL you declare is the only private address
the plugin may reach for that server. NAME identifies the server across
restarts (it defaults to plex-<N>): renaming it creates a new server, and the
old one stays behind as a disabled server you can delete in the UI.
MEDIA_SERVER_<N>_* variables with MEDIA_SERVER_<N>_TYPE=plex still work and
are translated into Plex instances, but they are deprecated: Mydia logs a
warning at startup and shows a banner on the Media Servers page. Rename them to
PLUGIN_PLEX_<N>_*. Jellyfin keeps using MEDIA_SERVER_<N>_*.
Plugins
How to install, approve and update plugins is in
Install and manage plugins. Settings for an installed
plugin can come from the environment. Install and
approve the plugin in the admin UI (or with mydia-cli plugin install) first;
these variables only fill in its settings.
PLUGIN_0_SLUG=assistant-openai
PLUGIN_0_SETTINGS='{"base_url":"http://ollama.lan:11434/v1","model":"llama3.1"}'
PLUGIN_<N>_SETTINGS is a JSON object whose keys are the plugin's setting
keys. Settings set this way are applied at startup and when the plugin is
installed, and show as read-only in the plugin's Settings dialog. Keys the
plugin does not define, and URLs that are not full http(s) URLs, are skipped
with a warning in the log. Removing a variable leaves its last value in place,
editable in the UI. Values set this way are saved in Mydia's database, the same
as values entered in the Settings dialog, so an API key set by env is also in
the database and its backups.
A URL setting that the plugin uses to reach a server (such as the Assistant's
base_url) is added to the plugin's allowed hosts, as it is when you type it in
the Settings dialog.
The older PLUGIN_<N>_NAME, _VERSION, _ENABLED, _PRIORITY,
_SOURCE_URL, _INTEGRITY_HASH and _GRANTED_CAPABILITIES variables are
ignored.
Plugin file overrides
A directory of <slug>.wasm files that replace the bytes of the plugin with
that slug, including a bundled one. The variable is read once at startup, so
restart after changing it. Replacing a .wasm file inside the directory needs
no restart: disable and enable that plugin to load it. It is meant for testing a
patched build; see
Replace a bundled plugin's bytes.
Plugin sources
Extra signed plugin catalogs are declared with numbered variables, starting at 0. Both variables are required for each source.
The URL must be https. The public key is the minisign key, the base64 line
starting with RW in the publisher's .pub file. Declared sources show in
Admin > System > Plugins > Plugin sources as read-only, with a "Declared" badge.
Mydia trusts the declared key as given, and it replaces any key previously
pinned for that URL at startup. Removing a declaration disables the source
rather than deleting it. A missing key or an http URL is a config error at
startup. Sources can also be added in the admin UI, which shows the key
fingerprint to compare before you trust it. To publish a source of your own,
see Publish your own plugin source.
Indexers
Configure multiple indexers using numbered variables (<N> = 1, 2, 3, etc.):
| Variable Pattern | Description | Example |
|---|---|---|
INDEXER_<N>_NAME |
Display name | Prowlarr |
INDEXER_<N>_TYPE |
Indexer type | prowlarr |
INDEXER_<N>_ENABLED |
Enable this indexer | true |
INDEXER_<N>_PRIORITY |
Display order only, does not affect searching | 1 |
INDEXER_<N>_BASE_URL |
Indexer base URL | http://prowlarr:9696 |
INDEXER_<N>_API_KEY |
Indexer API key | - |
INDEXER_<N>_API_PATH |
Newznab only. Endpoint path appended to the base URL; defaults to /api |
/api |
INDEXER_<N>_INDEXER_IDS |
Comma-separated indexer IDs | 1,2,3 |
INDEXER_<N>_CATEGORIES |
Comma-separated categories | movies,tv |
INDEXER_<N>_RATE_LIMIT |
Maximum requests per minute. Unset means no limit. | - |
INDEXER_<N>_TIMEOUT |
Request timeout in milliseconds | - |
Indexer Types: prowlarr, jackett, newznab, public
# Prowlarr
INDEXER_1_NAME=Prowlarr
INDEXER_1_TYPE=prowlarr
INDEXER_1_BASE_URL=http://prowlarr:9696
INDEXER_1_API_KEY=your-prowlarr-api-key
# Jackett
INDEXER_2_NAME=Jackett
INDEXER_2_TYPE=jackett
INDEXER_2_BASE_URL=http://jackett:9117
INDEXER_2_API_KEY=your-jackett-api-key
# Newznab (works with any Newznab-compatible indexer)
INDEXER_3_NAME=NZB Indexer
INDEXER_3_TYPE=newznab
INDEXER_3_BASE_URL=https://indexer.example
INDEXER_3_API_KEY=your-newznab-api-key
# Optional; defaults to /api
INDEXER_3_API_PATH=/api
Legacy nzbhydra2 type
Existing configurations with INDEXER_<N>_TYPE=nzbhydra2 keep working;
Mydia accepts the legacy value and treats it as newznab. New
configurations should use newznab.
Automatic Search
| Variable | Description | Default |
|---|---|---|
AUTO_SEARCH_MIN_SEEDERS |
Minimum seeders a result must report for an automatic search to consider it. A hard filter applied before ranking, so a torrent below it is removed rather than demoted. Manual searches have their own control, and Usenet results report no seeders and are exempt | 0 (filters nothing) |
Some indexers report zero seeders when they could not read the count rather than when a torrent is dead, so any nonzero floor can silently empty their results. See How Mydia decides which release to grab before raising it. Also settable under Admin > System > Settings > Downloads.
PostgreSQL Configuration
For PostgreSQL deployments (using latest-pg image):
| Variable | Description | Default |
|---|---|---|
DATABASE_TYPE |
Set to postgres |
sqlite |
DATABASE_HOST |
PostgreSQL hostname | localhost |
DATABASE_PORT |
PostgreSQL port | 5432 |
DATABASE_NAME |
Database name | mydia |
DATABASE_USER |
Database username | postgres |
DATABASE_PASSWORD |
Database password | - |
POOL_SIZE |
Connection pool size | 10 |
Remote Access (P2P)
| Variable | Description | Default |
|---|---|---|
P2P_KEYPAIR_PATH |
Path to store the P2P keypair for persistent node identity | - |
P2P_BIND_PORT |
UDP port for direct peer-to-peer connections (enables hole punching) | Random |
Note
P2P_KEYPAIR_PATH is required for remote access. Without it, the node ID changes on restart and paired devices can't reconnect.
Metadata Relay
| Variable | Description | Default |
|---|---|---|
METADATA_RELAY_URL |
URL for the metadata relay service | https://relay.mydia.dev |
The metadata relay proxies requests to TVDB/TMDB and handles remote access relay connections. See Architecture for details.
Update Check
| Variable | Description | Default |
|---|---|---|
UPDATE_CHECK_ENABLED |
Ask the metadata relay whether a newer Mydia release exists | true |
Mydia checks shortly after startup and once a week after that, and shows a newer release on Admin → Status. The check sends four values and nothing else:
- a random install ID, generated for this check and used nowhere else
- the Mydia version
- the CPU architecture
- the database type (
sqliteorpostgres)
The relay keeps one record per install per week and does not store your IP address. That record is also how the developers count active installs and decide which versions and platforms to prioritise. Nothing about your library, accounts or network is sent.
To turn it off, set UPDATE_CHECK_ENABLED=false, or switch off Check for updates under Admin → Settings → Updates. When the variable is set, it overrides the switch.
Language
| Variable | Description | Default |
|---|---|---|
DOWNLOAD_AUDIO_LANGUAGE |
Audio that automatic and manual search prefer when choosing a release: original for the show or film's own language, or a language code such as en, which prefers that dub and falls back to the original. Each show can override it from its page |
original |
AUDIO_LANGUAGE |
Audio track that plays, as a comma-separated list tried in order, for example original,en. When none matches, the track the file marks as default plays |
original,en |
PREFER_DEFAULT_AUDIO_TRACK |
Play the track the file marks as default and ignore AUDIO_LANGUAGE |
false |
DOWNLOAD_SUBTITLE_LANGUAGE |
Subtitles to go and fetch, comma-separated, for example en,es. Decides what a season fetch looks for and what subtitle search starts from |
en |
SUBTITLE_PLAYBACK_LANGUAGE |
Subtitle track to switch on for a show nobody has chosen one for, as a comma-separated list tried in order. Empty means no automatic subtitle | (empty) |
SUBTITLE_LANGUAGE |
Legacy name for DOWNLOAD_SUBTITLE_LANGUAGE and still read as the same setting. It names what to acquire, as it always did; only the key it lives under moved |
en |
METADATA_LANGUAGE |
Language sent to TMDB/TVDB for titles, descriptions, and posters. Accepts ISO 639-1 codes (de) or BCP 47 tags (de-DE, pt-BR). |
en-US |
Download audio and playback audio are separate settings. The first decides which release is downloaded, the second which of its tracks plays. Subtitles split the same way: DOWNLOAD_SUBTITLE_LANGUAGE decides what gets fetched, SUBTITLE_PLAYBACK_LANGUAGE which track switches on. SUBTITLE_LANGUAGE keeps working and still means acquisition: its meaning never changed, only where the setting lives.
Every variable in this section can also be set from Admin > System > Settings, under Language. An environment variable overrides the database value and locks the field there. Playback audio and the default-track option appear only when the player is enabled.
FlareSolverr
FlareSolverr is a proxy server used to bypass Cloudflare protection on indexer sites. Used by Cardigann indexers that require browser-based challenge solving.
| Variable | Description | Default |
|---|---|---|
FLARESOLVERR_URL |
FlareSolverr instance URL | - |
FLARESOLVERR_ENABLED |
Enable FlareSolverr integration | Auto-enabled if URL is set |
FLARESOLVERR_TIMEOUT |
Request timeout in milliseconds | 60000 |
FLARESOLVERR_MAX_TIMEOUT |
Maximum timeout in milliseconds | 120000 |
FLARESOLVERR_MAX_CONCURRENT_REQUESTS |
How many FlareSolverr requests run at once across all indexers. Raise it only if FlareSolverr has the memory for several Chrome tabs. | 1 |
Automatic Quality Upgrades
These pace the daily upgrade sweep instance-wide. Which items it considers is set per quality profile instead; see Quality Profiles.
| Variable | Description | Default |
|---|---|---|
UPGRADE_SWEEP_ENABLED |
Master switch for the daily upgrade sweep. false stops all automatic upgrades without editing any profile |
true |
UPGRADE_SWEEP_BATCH_SIZE |
Maximum indexer searches one sweep run may cost. Counts searches, not items: a season pack covers a whole season for one | 50 |
MYDIA_TRASH_DIR |
Where replaced and deleted files are moved. Must be outside every library path. Unset trashes into .mydia-trash beside each library |
Beside each library |
See Automatic Quality Upgrades for what these cost you in disk.
Streaming
| Variable | Description | Default |
|---|---|---|
MAX_TRANSCODE_HEIGHT |
Ceiling in pixels on the output height of any transcode, for example 720. Unset means no ceiling and a transcode keeps the source resolution |
No limit |
A transcode only happens when a file's codec is not playable as-is, or when a player asks for a quality below the source. This ceiling bounds those; it never upscales, and it does not apply when a file is streamed without re-encoding. Set it on a server that cannot encode 4K in realtime, which is what an incompatible 4K file would otherwise ask of it. Also settable under Admin > System > Settings > Streaming.
Advanced Configuration
| Variable | Description | Default |
|---|---|---|
LOG_LEVEL |
Log level (debug, info, warning, error) | info |
MYDIA_PERF_METRICS |
Records hourly performance timings (page loads, API calls, database queries, background jobs) in the database, kept 14 days, for diagnosing slowness. Set to false, 0, no, or off to turn off |
true |
MYDIA_METRICS_ENABLED |
Serves Prometheus metrics at /metrics: memory, request latency, background jobs, library size, downloads and active streams. The endpoint has no authentication, so keep it off your public reverse proxy, including the HTTPS player port when the player is enabled. Accepts true, 1, yes, on. See Monitoring with Prometheus |
false |
SKIP_BACKUPS |
Skip the automatic database snapshot Mydia takes before applying pending migrations. SQLite only, since PostgreSQL has no automatic backup to skip. Accepts true, 1, yes, on |
false |
See Backing Up and Restoring for what the automatic backup does, where it writes, and what it does not protect you from.
See Configuration for how these variables interact with database settings and the YAML config file.