Skip to main content

Configuration

flixer is configured through environment variables (loaded from the process environment and a .env file via dotenv; see .env.example) and through database settings edited in the admin UI (src/config/settings.json, table settings).

Environment variables read by the code​

VariableDefaultRequiredPurpose
DATABASE_URL–YesPostgreSQL connection string. Also used by pg-boss (own pool of 2).
DATABASE_POOL_MAX10NoMax connections in the TypeORM pool.
PORT8083NoHTTP port. The Docker image sets 8081.
NODE_ENVdevelopmentNoproduction switches logging layout/streams and disables the dev port-killer.
JWT_SECRET–YesHMAC secret (≥ 32 bytes) signing access tokens, passkey second-factor tickets and e-mail verification tokens.
STREAM_TOKEN_SECRET–Yes (to play/stream/index)Secret (≥ 32 bytes) shared with flixer-streamer and flixer-indexer. Signs stream tokens, indexer and streamer request signatures, derives the streamer admin key, and is the key source for encrypting network-share passwords. Changing it invalidates saved share passwords.
APP_URLhttps://localhost:5173NoPublic web URL; used to build links in e-mails (/verify-email?token=).
STREAMER_PUBLIC_URLemptyNoPrefix for stream URLs returned to clients. Empty = relative URL (/stream/<token>), so the browser reaches the streamer through the same origin (proxy / Vite dev server).
STREAMER_INTERNAL_URLhttp://localhost:8091NoWhere flixer reaches the streamer admin API (list/cancel sessions).
INDEXER_URLhttp://localhost:8092NoWhere flixer reaches the indexer. INDEXER_INTERNAL_URL is accepted as a fallback.
PASSKEY_RP_IDlocalhostNoWebAuthn relying-party id (the site's domain).
PASSKEY_RP_NAMEFlixerNoWebAuthn relying-party display name.
PASSKEY_ORIGINShttps://localhost:5173NoComma-separated allowed WebAuthn origins.
STREAM_MEDIA_ROOTfalls back to MEDIA_PATH, then ../flixer-data/mediaNoMedia root folder(s). Accepts a JSON array of paths, a list separated by the OS path delimiter (; on Windows, : elsewhere) or a single path.
AVATAR_DIR./data/avatarsNoWhere user avatars are stored.
MEDIA_IMAGE_DIR./data/media-imagesNoWhere admin-uploaded media images are stored.
SMB_MOUNT_DIR./data/mountsNoMount base for SMB shares on Linux/macOS (Windows uses UNC paths).
INDEXER_MAX_WRITES3NoMax concurrent indexer write requests (WorkLimiter).
INDEXER_MAX_QUEUED_WRITES200NoWaiting writes allowed before the API answers 429.
LOG_DIRunsetNoIf set, flixer writes JSON logs to <LOG_DIR>/flixer.log and tails <LOG_DIR>/streamer.log into the live log stream.
note

SMTP is not configured through environment variables – it lives in the smtp_* database settings.

Example .env​

DATABASE_URL=postgres://flixer:flixer@localhost:5432/flixer
JWT_SECRET=change-me-to-a-long-random-string-of-32+bytes
STREAM_TOKEN_SECRET=another-long-random-string-shared-with-streamer
APP_URL=https://localhost:5173
STREAM_MEDIA_ROOT=["D:/Media/Movies","D:/Media/Shows"]
LOG_DIR=../flixer-data/logs

Docker / process-manager variables​

These are consumed by the Dockerfile, processes.config.cjs or compose files, not by the application code:

VariableDefaultWherePurpose
NB_INSTANCES2PM2 configNumber of cluster instances.
MAX_MEMORY_RESTART750MPM2 configRestart an instance above this memory.
NODE_VERSION26.12.0Dockerfile build argNode base image version.
APP_VERSION–Dockerfile build argVersion label of the image.
HTTP_PORT8080composeHost port published by the proxy.
MAX_TRANSCODES, STREAMER_LOG_LEVEL, INDEXER_LOG_LEVEL–composePassed to streamer/indexer.
AVATAR_PATH, MEDIA_PATH, MEDIA_IMAGE_PATH, SMB_MOUNT_PATH, LOG_PATH../flixer-data/...composeHost folders mounted into containers.

.env.example also lists FLIXER_PUBLIC_URL, which the backend source does not read.

Database-backed settings (settings table)​

Defined in src/config/settings.json and synchronised at every start by src/config/settingsSync.ts (inserts missing keys, updates is_public, deletes keys no longer defined, never overwrites existing values). Non-admins only see public settings.

KeyDefaultPublicNotes
registration_enabledtrueyesWhen false, only an admin can create accounts.
email_verification_requiredtruenoOnly effective when smtp_host is set.
server_name, server_addressnullyesDisplay info.
cache_path, logs_path, metadata_path, secret_keynullnoReserved.
smtp_host, smtp_port (587), smtp_secure (false), smtp_user, smtp_password, smtp_fromemptynoOutgoing mail. smtp_password is returned masked as ********.
indexer_language"en"noMetadata language code (e.g. en, pt-BR).
indexer_providers{}noPer-provider {enabled, apiKey}; providers: tmdb tvdb omdb fanart audiodb discogs anidb musicbrainz anilist.
indexer_concurrency{}noWorkers per queue (scan identify metadata images probe refresh), 1–64.
indexer_subtitles{}noOpenSubtitles apiKey, username, password, languages (≤ 10), autoFetch.
sentry_enabled, sentry_flixer_enabled, sentry_streamer_enabled, sentry_web_enabledtruenoSentry switches.
sentry_flixer_dsn, sentry_streamer_dsn, sentry_web_dsnbuilt-in DSNsnoMust be http(s) URLs or null.

Settings are changed with PUT /api/settings/:key (admin). See Admin API.