Skip to content

Environment Variables

Environment variables configure server-level behavior. Most users don’t need to change these — the Docker image sets sensible defaults.

VariableDefaultDescription
PORT3000Server port
NODE_ENVdevelopmentEnvironment mode. Set to production in Docker.
CORS_ORIGINhttp://localhost:5173Allowed CORS origin for the frontend. Only needed in development or split-origin deployments.
CONFIG_PATH./configDirectory for the database, settings, and other config files.
LIBRARY_PATH./audiobooksRoot directory for your audiobook library.
DATABASE_URLfile:./config/narratorr.dblibSQL database URL. Must include the file: prefix.
AUTH_BYPASSfalseDisable authentication entirely. Development/recovery only — never use in production.
AUDIBLE_REGIONusFallback Audible region for metadata lookups when not configured in Settings > General. Values: us, ca, uk, au, fr, de, jp, it, in, es.

The Docker image and docker-compose.yml set these automatically:

NODE_ENV=production
CONFIG_PATH=/config
LIBRARY_PATH=/audiobooks
DATABASE_URL=file:/config/narratorr.db

You generally don’t need to override these unless you have a custom volume layout.

You can pass TZ to the Docker container for timezone-aware log timestamps:

environment:
- TZ=America/New_York

The app does not read TZ directly — it’s handled by the Node.js runtime and OS. This affects how timestamps appear in logs, not application behavior.

Add variables to the environment section:

services:
narratorr:
image: narratorr/narratorr:latest
environment:
- PORT=8080
- AUDIBLE_REGION=uk
ports:
- "8080:8080"
volumes:
- ./config:/config
- /data/audiobooks:/audiobooks