Environment Variables
MusicOrbit reads configuration from environment variables (or a .env file in the repository root for bare-metal installs). Every variable is validated at startup with Zod.
Configuration reference
Section titled “Configuration reference”| Variable | Default | Description |
|---|---|---|
PORT |
4410 |
HTTP port for the Fastify API (and built React UI in production/Docker mode). |
HOST |
0.0.0.0 |
Network interface to bind. |
LOG_LEVEL |
info |
Server log verbosity: fatal, error, warn, info, debug, trace, or silent. |
MUSIC_DIR |
./sample-music |
Root audio library directory (/music in Docker). Relative paths resolve from the repo root. |
DATA_DIR |
./data |
Directory storing musicorbit.db, cover art cache, artist portraits, and transcode cache (/data in Docker). |
DOWNLOADS_DIR |
./downloads |
Incoming folder watched by the Import Pipeline (/downloads in Docker). |
AUTO_IMPORT_THRESHOLD |
85 |
Minimum MusicBrainz match score (0–100) required to auto-import without manual review. |
FETCH_ARTIST_IMAGES |
true |
Fetch and cache artist portraits lazily. Set to false for strict offline / privacy mode. |
CHECK_UPDATES |
true |
Periodically check GitHub Releases (cached 12h, Admin-only notification, zero telemetry). Set to false to disable. |
AUTH_ENABLED |
true |
Enables first-run Admin setup, multi-user login, and session cookies. Set to false only on a private localhost-only dev machine. |
SLSKD_URL |
(empty) | Optional fallback URL of your slskd daemon (recommended: configure right in the UI under System & Scanner). |
SLSKD_API_KEY |
(empty) | Optional fallback slskd API key (recommended: configure right in the UI under System & Scanner). |
WEB_DIST_DIR |
(empty) | Path to built Vite apps/web/dist directory for single-port production serving (set automatically in Docker). |
Example .env
Section titled “Example .env”PORT=4410HOST=0.0.0.0LOG_LEVEL=info
MUSIC_DIR=/srv/media/musicDATA_DIR=/srv/musicorbit/dataDOWNLOADS_DIR=/srv/musicorbit/downloads
AUTH_ENABLED=trueFETCH_ARTIST_IMAGES=trueAUTO_IMPORT_THRESHOLD=85
# Optional slskd integration# SLSKD_URL=http://slskd:5030# SLSKD_API_KEY=your_slskd_api_key