# Configuration

Mirli keeps everything in one data folder. Most settings live in the app
under **Settings**; this page describes the data folder and the audio output
settings that matter when you run Mirli yourself.

## Data folder

The default data folder is `~/.mirli`, or `~/.soundbox` for an install from
before the rename while no `~/.mirli` exists. Nothing is moved between the
two. It holds:

```text
~/.mirli/
  soundbox.db            library index
  sounds/                generated WAVs
  artwork/               generated cover art and voice avatars
  cache/                 MP3 transcodes
  models/                model weights, and custom.json for your own models
  bin/audiocpp/          the audio.cpp runtime, one folder per version
  bin/llama/             the prompt-assistant engine, same layout
  bin/sd/                the artwork engine, same layout
  soundbox-<PORT>.log    the server log, rotated
  settings.json          settings, including the Hugging Face token
```

| Property | Value |
|---|---|
| Location | `MIRLI_DATA_DIR`, or `--data-dir` for one run of the server. The other `soundbox` commands read only `MIRLI_DATA_DIR`. |
| Moving it | Safe. Downloaded weights are found in the new place, and an interrupted download resumes. |
| Uninstalling | Delete the folder. |
| Sounds folder | Can live elsewhere, set in **Settings > Storage > Sounds folder**. Existing and new audio move there. **Browse** opens a folder picker on the machine running the server, and a folder that does not exist yet is created on save. |
| Windows paths | Windows caps paths at 260 characters unless long paths are turned on. A deep data folder can make downloads fail with *"The system cannot find the path specified"*. The default `%USERPROFILE%\.mirli` is short enough. |

To point the server at another data folder:

```bash title="macOS / Linux"
export MIRLI_DATA_DIR=/mnt/big/mirli
soundbox
```

```powershell title="Windows"
$env:MIRLI_DATA_DIR = "C:\mirli"
npx soundbox
```

## Loudness and MP3

| Feature | Behaviour |
|---|---|
| Loudness normalisation | Built in (an EBU R 128 meter in the server). On by default at -16 LUFS. Set the target or turn it off under **Settings > Sound & files > Normalise loudness**. If metering fails on an unusual input, the server falls back to peak normalisation and logs it. |
| MP3 export | Needs `ffmpeg` on `PATH`. Without it, `/files/<ID>.wav?format=mp3` answers with the WAV and an `X-Soundbox-Format-Fallback: wav` header, and the app says the MP3 was not made. |

Every environment variable is listed in
[Environment variables](https://mirli.app/docs/install-env/index.md).
