Skip to content

Server configuration

The server loads its settings from a config.toml file. The binary searches the current directory and its parents for that file, or you point it at an exact file with AUDIOLAND_CONFIG; AUDIOLAND_* environment variables then override what the file says. The Python toolkit is stricter: it expects config.toml at the root of the server repository and does not search.

If you are setting the config up for the first time, follow Run the server - it covers the copy-and-edit step and the traps in the example values.

Field What it does Confirmed default or example
server_host, server_port The address the API listens on http://127.0.0.1:3000 - reachable only from the server’s own machine until you change it
scanner.music_root Where your FLAC library lives the example ships /library/music, edit it to your machine
scanner.cache_root Where the server caches Opus transcodes the example uses Linux paths under /var/lib/audioland/...
[auth] secret The secret that signs access tokens (HMAC) the example ships change-me - replace it before going live
[auth] master_password Gates POST /api/auth/create-user the example ships change-me - replace it before going live
[auth] discogs_consumer_key, [auth] discogs_consumer_secret Read only by the Python toolkit - the AI tagger and the genre helper. The Rust server ignores them the keys appear in the example config; the values are yours to supply
[tagger] musicbrainz_root Read by tagger.py the example ships "" - see the Aside below
The database file, data.db The single SQLite file: the toolkit writes the index into it, the server reads it its location is a Linux path under /var/lib/audioland/... in the example; the audited source does not quote the exact key name for it

The two change-me defaults matter operationally: the secret signs every access token, so rotating it invalidates existing logins and you sign in again; the master password is what lets the first account be created at all. Background on both is in Create your account.

The source lists these AUDIOLAND_* variables as environment overrides applied on top of the config file. It records the names, so the table maps each to the field it corresponds to rather than documenting override semantics beyond “it wins over the file”:

Variable Corresponds to
AUDIOLAND_CONFIG Which config.toml to load
AUDIOLAND_HOST server_host
AUDIOLAND_PORT server_port
AUDIOLAND_AUTH_SECRET [auth] secret
AUDIOLAND_MASTER_PASSWORD [auth] master_password
AUDIOLAND_LOG_LEVEL Log verbosity
AUDIOLAND_LOG_JSON Log format (JSON)
AUDIOLAND_LOGS_PATH Where logs are written

The three logging variables have no matching field quoted in the audited source - they are how logging is configured through the environment. RUST_LOG is a separate one that the production systemd unit sets; it appears in deploy/audioland.service, not in the config file.

Changing the signing secret by any route - file or environment - invalidates tokens issued before the change. For service setup, see Deploy to a home server.

The desktop player keeps its own config.toml, separate from the server’s:

  • server_host and server_port tell it where your server lives - for a server on another machine, the LAN address, not 127.0.0.1.
  • In debug builds, the file is auto-created at the desktop project root from config.example.toml.
  • The app has no local database; its state lives in this config file.
  • For development, TAURI_DEV_HOST is the environment variable that matters: when it is set, Vite’s hot module reload moves to port 1421.

The full walkthrough is in Connect the desktop app; port conflicts show up under Troubleshooting.