Skip to content

Configuration

Settings come from environment variables or .env. Lists are written as JSON.

Some can also be changed in the app, under Settings → Server, when .env (or the environment) has ALLOW_REMOTE_SETTINGS=true: Disable online metadata retrieval (the opposite of ARTWORK_ONLINE_LOOKUP), MUSICBRAINZ_CONTACT, FANARTTV_API_KEY, AI_PLAYLISTS_ENABLED, ANTHROPIC_API_KEY, AI_MODEL and the Lidarr settings. Changes apply at once, without a restart, and are saved in data/settings.json (readable by the server's user only). Which value wins: an environment variable (shown as locked in the app), then what was saved in the app, then .env, then the default. "Reset to .env or default" forgets a saved value. API keys are never sent to the app: it only shows whether one is set and its last four characters, and a new one is typed in once. It's off by default because the API has no login: with it on, anyone who can reach Nessie can change these, including putting in API keys. To expose another setting, add it to app/core/editable_settings.py; the app draws its controls from that list.

Variable Default Purpose
DATABASE_URL postgresql+psycopg://postgres:change-me@localhost:5432/app PostgreSQL connection
POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB Used by docker compose to create the database
LIBRARY_BROWSE_ROOTS ["~", "/media", "/mnt"] The only folders the folder browser can list or add as libraries
MPV_BINARY mpv mpv executable
MPV_SOCKET nsy-mpv.sock in the temp folder mpv's IPC socket
MPV_AUDIO_DEVICE mpv's default Output device, e.g. alsa/hw:0,0 (mpv --audio-device=help lists them)
MPV_START_VOLUME 50 Volume (0–100) mpv starts at when none was set before, and the most it starts at otherwise
MPV_VOLUME_FILE data/volume.json Where the last volume set is kept, across app and server restarts
MPV_EXTRA_ARGS [] Extra mpv arguments, e.g. ["--ao=alsa"]
PLAYER_NAME the hostname The server's name in the app's output menu, e.g. Living Room
SHAIRPORT_METADATA_PIPE /tmp/shairport-sync-metadata shairport-sync's metadata pipe; empty turns AirPlay support off
ARTWORK_DIR data/artwork Resized album covers; a cache that the next scan rebuilds
ARTWORK_ONLINE_LOOKUP true Look up album covers and artist photos online when the folders have none; false keeps scans offline
MUSICBRAINZ_CONTACT An email address or URL, sent to MusicBrainz as it asks
LYRICS_ONLINE_LOOKUP true Lyrics from LRCLIB for songs without a .lrc file or lyrics in their tags (also off while ARTWORK_ONLINE_LOOKUP is)
FANARTTV_API_KEY A free Fanart.tv key: artist photos come from Fanart.tv first (the best ones), then Wikimedia Commons
AI_PLAYLISTS_ENABLED false Turns AI playlists on (they also need ANTHROPIC_API_KEY)
ANTHROPIC_API_KEY An Anthropic API key, for AI playlists
AI_MODEL claude-opus-5-5 The model AI playlists use (Settings → Server → Model)
LIDARR_ENABLED false Turns on getting music through Lidarr (see Lidarr)
LIDARR_URL, LIDARR_API_KEY Where the server reaches Lidarr, e.g. http://localhost:8686, and its API key (Lidarr: Settings → General)
LIDARR_REMOTE_PATH, LIDARR_LOCAL_PATH When Lidarr sees the music under another path (Docker): its folder, and the same folder as Nessie sees it, e.g. /data and /srv/music
LIDARR_SEARCH_ON_ADD true Lidarr looks for an album as soon as it's added
AUTH_TRUSTED_NETWORKS [] Networks or addresses where the app asks "Who's listening?" (no sign-in), e.g. ["192.168.1.0/24"]; set, profiles are on (see Profiles and sign-in)
AUTH_PROXY_SECRET A secret the reverse proxy sends with the signed-in user; set, profiles are on, and requests carrying it are that user
AUTH_PROXY_SECRET_HEADER X-Nessie-Proxy-Secret The header it comes in
AUTH_PROXY_IPS [] Optionally, the only addresses signed-in requests may come from
AUTH_USER_HEADER, AUTH_NAME_HEADER, AUTH_GROUPS_HEADER, AUTH_GROUPS_SEPARATOR Remote-User, Remote-Name, Remote-Groups, , Where the sign-in service says who it is (Authelia's names)
AUTH_ADMIN_GROUP, AUTH_AI_GROUP, AUTH_REQUEST_GROUP nessie-admins, nessie-ai, nessie-requests Its groups that make someone an admin, let them make AI playlists, or let them request music from Lidarr
SECRET_KEY made and kept in the data folder Signs the cookie that remembers a device's profile
ALLOW_REMOTE_SETTINGS false Lets the app change the settings above marked as editable (Settings → Server); only from .env or the environment

Command line

python -m app.cli scan PATH [--name NAME] [-v]   # create a library if needed, then scan it
python -m app.cli libraries                      # list libraries and their track counts
python -m app.cli give-plays USERNAME            # give the plays from before profiles to someone
python -m app.cli give-likes USERNAME            # and the liked songs from before profiles
python -m app.cli give-playlists USERNAME [NAME…] # give some of the household's playlists to someone
python -m app.cli give-mixes USERNAME [NAME…]     # and some of its custom mixes

-v lists files that couldn't be read. An interrupted scan keeps the batches it finished; run it again to continue.