Environment variables
naelox serve fills in a default for everything, so it runs with no configuration. A value set in the environment wins over the same setting in the web app, and Settings → Server shows that setting locked with the reason.
Server
Section titled “Server”| Variable | Default | Meaning |
|---|---|---|
ADDR |
:34200 |
Listen address. --port sets the same thing. Locks the Port setting. |
DATA_DIR |
See Ports, paths and data | Where the database, caches, keys and settings live. |
DATABASE_URL |
the URL in DATA_DIR/database.json, else sqlite:DATA_DIR/naelox.db |
A postgres:// URL uses Postgres. Set, it wins over database.json and hides Move to Postgres…. |
WORKER_TOKEN |
generated once, kept in DATA_DIR/worker-token |
Shared secret for workers that have not joined with a certificate. |
TMDB_API_KEY |
unset | v3 key or v4 read token. Matching is skipped without one. Locks the TMDB key setting. |
INDEX_INTERVAL |
6h |
How often libraries are rescanned. Editable per library in the web app. |
IMAGE_CACHE_DIR |
DATA_DIR/cache/images |
Cached posters and backdrops. |
SUBTITLE_CACHE_DIR |
DATA_DIR/cache/subtitles |
Extracted text subtitles and saved image subtitle tracks. |
PREVIEW_CACHE_DIR |
DATA_DIR/cache/previews |
Rendered preview clips and thumbnails. |
ALLSPARK |
on |
off turns the built-in Allspark off. Locks the Converting setting. |
ALLSPARK_API_URL |
unset | Send jobs to this Allspark instead of the built-in one. Locks the Converting setting. |
LOCAL_WORKER |
on |
off skips the local media worker. Locks the Local worker setting. |
Worker
Section titled “Worker”These apply to naelox worker run on its own, and to the local worker the server starts (which gets MEDIA_ROOT=/).
| Variable | Default | Meaning |
|---|---|---|
API_URL |
required | The server’s API address. |
WORKER_TOKEN |
required | Shared secret, unless the worker joined with a certificate. |
WORKER_NAME |
hostname | How the worker is shown. |
MEDIA_ROOT |
/media |
The path under which libraries live, as the worker sees it. |
WORK_DIR |
DATA_DIR/work |
Scratch for in-progress HLS segments. |
VIDEO_ENCODER |
auto |
auto uses VAAPI_DEVICE if it encodes H.264, else software. software or vaapi forces one. Settings → Transcoder overrides this per worker. |
VAAPI_DEVICE |
/dev/dri/renderD128 |
The default render node until Settings → Transcoder picks one. |
TRANSCODE_CAPACITY |
2 with VAAPI, 0.5 with software |
How many 4K transcodes the worker takes at once. |
SPATIAL_BIN |
naelox-spatial |
The Atmos and DTS:X renderer behind Settings → Transcoder → Spatial audio. Without it on the path the worker takes no spatial sessions. |
HDHOMERUN_URLS |
unset | Comma-separated tuner base URLs, for example http://192.0.2.10. Settings → Live TV can set a tuner address instead. |
Allspark worker
Section titled “Allspark worker”Concurrency, hardware acceleration and media roots are set per worker in the web app and pushed to the worker. These are the only variables it reads.
| Variable | Default | Meaning |
|---|---|---|
API_URL |
set by the server | The Allspark API address. |
FFMPEG_BIN, FFPROBE_BIN |
ffmpeg, ffprobe |
Which binaries to run. |
LOG_LEVEL |
info |
debug, info, warn or error. |
WORK_DIR |
the OS temp directory | Scratch for in-progress encodes. |