Skip to main content

Configuration

The service reads the process environment and then fills unset values from .env in its current working directory. Existing environment values win over .env. Empty values for variables read through the default helper generally use the documented default; credential variables read directly from the environment remain empty. See internal/config/config.go, .env.example, and the Docker files.

Runtime environment variables​

VariableDefaultMeaning
PORT8092HTTP listen port. A leading : is accepted and removed; valid range is 1–65535.
ROLEallall, api, or worker. api skips worker startup; worker still serves the HTTP API while starting workers.
FLIXER_URLhttp://localhost:8083Base URL for the flixer internal indexer endpoints.
FLIXER_INTERNAL_URLhttp://localhost:8083Backward-compatible fallback alias used only when FLIXER_URL is unset/blank.
STREAM_TOKEN_SECRETrequiredShared HMAC secret used for both directions of indexer/flixer requests. If blank, JWT_SECRET is used. Either secret must be at least 32 bytes.
JWT_SECRETnoneLegacy fallback for STREAM_TOKEN_SECRET; subject to the same minimum length.
REDIS_ADDRlocalhost:6379Redis address used by Asynq and scan-progress storage.
REDIS_PASSWORDemptyRedis password.
REDIS_DB0Redis database number; must be a non-negative integer.
CACHE_PATH./cache/metadataArtwork cache directory. Made absolute at startup when possible. With Docker, the image sets /var/cache/flixer/indexer.
FFPROBE_PATHffprobeExecutable path/name used to inspect media files.
FFMPEG_PATHffmpegExecutable used for embedded artwork extraction.
CONCURRENCY_SCAN2Initial worker count for the scan queue.
CONCURRENCY_IDENTIFY12Initial worker count for identify.
CONCURRENCY_METADATA12Initial worker count for metadata.
CONCURRENCY_IMAGES8Initial worker count for images.
CONCURRENCY_PROBE6Initial worker count for probe.
CONCURRENCY_REFRESH4Initial worker count for refresh.
LOG_LEVELinfodebug, info, warn/warning, or error.
USER_AGENTflixer-indexer/1.0 (+https://github.com/flixermedia/flixer-indexer)User-Agent sent to external HTTP services.
METADATA_LANGUAGEenFallback language requested from metadata providers.
TMDB_API_KEYemptyFallback TMDB key if flixer does not supply one.
TVDB_API_KEYemptyFallback TVDB key.
OMDB_API_KEYemptyFallback OMDb key.
FANART_API_KEYemptyFallback Fanart.tv key.
AUDIODB_API_KEYemptyFallback TheAudioDB key.
DISCOGS_TOKENemptyFallback Discogs token.
ANIDB_CLIENTemptyFallback registered AniDB client name; AniDB lookups require a known AniDB ID.
LYRICS_FETCHenabled (true)Set to false (case-insensitive) to disable automatic missing-LRC lookup.
OPENSUBTITLES_API_KEYemptyOpenSubtitles API key; without it subtitle integration is inactive.
OPENSUBTITLES_USERNAMEemptyOpenSubtitles account name, needed for downloading, not searching.
OPENSUBTITLES_PASSWORDemptyOpenSubtitles account password, needed for downloading.
SUBTITLE_LANGUAGESMETADATA_LANGUAGE, or enComma-separated preferred subtitle language codes; blank entries are discarded.
SUBTITLE_AUTO_FETCHenabled (true)Set to false (case-insensitive) to disable automatic subtitle downloads during indexing. Manual subtitle API routes remain available when configured.
FLIXER_MODEnormal clientSet to stub (case-insensitive) to use a JSON-file library source and JSONL output instead of flixer HTTP calls.
STUB_LIBRARIES_FILEemptyIn stub mode, JSON input containing {"libraries":[...]}.
STUB_OUTPUT_FILE./cache/stub-items.jsonlIn stub mode, append one indexed item per JSONL line.

All six CONCURRENCY_* values must be integers from 1 to 64. Queue names are scan, identify, metadata, images, probe, and refresh. Runtime controls are described in Queues and workers.

The .env.example lists the provider keys, but the current source also accepts the OpenSubtitles and lyrics variables above. They may be supplied to the process even when absent from that example file.

Settings and library data from flixer​

Outside stub mode, the indexer retrieves library definitions from flixer's signed GET /api/indexer/libraries endpoint and dynamic settings from GET /api/indexer/settings. The folder contract includes rootId, flixer-relative path, and absolutePath; scanning uses absolutePath as visible inside the indexer process. The indexer does not receive SMB credentials or mount instructions through this contract. See Network shares.

Flixer settings include a provider map (enabled, apiKey), per-queue concurrency, preferred metadata language, and optional subtitle settings. A non-empty key from flixer takes precedence over the environment fallback. An explicitly disabled provider stays disabled. Keyless integrations (AniList, MusicBrainz, and Cover Art Archive) are enabled unless explicitly disabled. A library's non-empty providers list can further restrict the registry for that library.

When flixer supplies a non-empty OpenSubtitles API key, its subtitle settings are used; if its language list is empty, the indexer falls back to SUBTITLE_LANGUAGES/METADATA_LANGUAGE. Otherwise the environment subtitle configuration is used. Settings are loaded at startup and polled once a minute; an authenticated reload route is also available.

Docker Compose interpolation variables​

These names are Compose substitutions, not all indexer runtime settings. docker-compose.yml uses INDEXER_ROLE (all), FLIXER_URL (http://flixer:8083), required STREAM_TOKEN_SECRET, INDEXER_LOG_LEVEL (info), METADATA_LANGUAGE (en), provider keys (empty), MEDIA_PATH (../flixer-data/media), and INDEXER_PORT (8092). docker-compose.dev.yml uses REDIS_PORT (6379). The Compose stack sets Redis to its service address; it does not pass Redis password/database configuration. INDEXER_MAX_WRITES is a flixer-side write limiter setting, not an indexer variable; see Queues and workers.