Configuration
Tunetorch is configured in two places. They complement each other rather than overlap:
| Level | Where | Takes effect | What for |
|---|---|---|---|
| Environment variables | docker-compose.yml | after restarting the container | Infrastructure: paths, network, process permissions |
| Server settings | Admin interface → Server settings | immediately, without a restart | Operation: time zone, cover art sizes, limits, maintenance |
As a rule of thumb: whatever the container needs to know while starting up is an environment variable. Everything else you set in the interface.
Environment variables
They all start with TT_. If you run Tunetorch behind a TLS reverse proxy, you don't have to
set a single one of them.
Paths
| Variable | Default | Purpose |
|---|---|---|
TT_DATA_DIR | /app/data | Base directory for the database, audio files, cover art, logs and keys. |
TT_MUSIK_PFAD | /app/musik | Music folder for the library scan. |
TT_IMPORT_PFAD | /app/import | Directory for the one-off collection import. |
Network & security
| Variable | Default | Purpose |
|---|---|---|
TT_HTTPS | True | Controls the cookie attributes. True sets Secure + SameSite=Strict (access over HTTPS, including through a proxy). You need False for plain HTTP access. |
TT_TRUSTED_PROXIES | 1 | Number of reverse proxies in front. 0 means direct access without a proxy. It decides which IP the brute-force protection blocks. |
TT_CORS_ORIGINS | (empty) | Only needed if the frontend runs at a different address. CORS is off out of the box, because the interface and the API come from the same address. |
Set
TT_TRUSTED_PROXIEScorrectly. A value that's too high (or1without a real proxy) lets clients fake their IP address. That defeats the brute-force protection.
Operation
| Variable | Default | Purpose |
|---|---|---|
TT_PUID / TT_PGID | 1000 | UID/GID the app runs as and that owns /app/data. |
TT_LOG_LEVEL | INFO | DEBUG, INFO, WARNING, ERROR, CRITICAL. |
TT_GUNICORN_WORKERS | 1 | Number of worker processes. One worker with many threads runs more stably with the SQLite database than several do. |
TT_GUNICORN_THREADS | 8 | Threads per worker. |
TT_DLNA_TMPFS | (automatic) | Where the converted files for DLNA casting are kept. Normally don't set it; the server chooses by itself. |
Schedules for maintenance tasks aren't set here. Which tasks run when is set in the interface (see Server administration).
Server settings
You'll find them under Server settings in the admin interface, sorted into sections. Changes take effect without a restart.
A section is saved as a whole: if the server rejects one value, the others stay unchanged too, and the message names the field that caused it. There are no half-saved sections. The same applies to resetting to the defaults.
| Section | What you set there |
|---|---|
| Overview | The current state of the server: library size, storage, cache, uptime, version. The last card (“Tunetorch”) shows the Pro status (connected or not, Pro or Free, until when, last and next check). |
| Users | Create accounts, grant permissions, assign supervisors. → Users & permissions |
| Time zone | The server's IANA time zone. The default is Europe/Berlin. |
| Sign-in & sessions | After how many days without use the sign-in expires. Below it, under Advanced, is the interval (in minutes) at which the sign-in is renewed in the background. Nobody notices that in everyday use. |
| Brute-force protection | Time window, permitted failed attempts, block duration. |
| Cover art & artist images | You choose the Image quality with a single switch: Economical, Balanced or High. It sets all six dimensions and the cover art quality in one go. If you need more control, open the individual values below it (three cover art edge lengths, three heights for artist images). After saving or resetting, Tunetorch asks whether the existing images should be regenerated. Otherwise they keep their previous resolution → Server administration. At the very bottom you set how many previews an online image search loads at first. |
| Audio upload | Target bitrate for Opus and the maximum file size. A single request may be four times that size in total. This value follows from the file size and can't be set separately. |
| Normalise metadata | Rules for capitalisation and forbidden characters, for each field separately. Plus the suggestion to split up combined artists. If you switch it off, the editors and the metadata assistant stay quiet about it. |
| Audiobooks | Which genres count as audiobooks. → Audiobooks |
| DLNA | Main switch, the server's address on the home network, devices and access lists. → Casting |
| Maintenance & cron tasks | Which tasks run, at what interval or at what time. |
| Marked for deletion | Tracks and accounts waiting to be deleted for good. |
| Database backup | Create a copy of the database now and see the existing ones. Restoring only happens on the server. → Security |
| Advanced | Two speed controls you normally don't need: the pause between the steps of long jobs (scan, loudness, upload; the higher, the more breathing room the server has) and the memory limit of the cache. Useful when the server gets sluggish under load. |
| Export sessions | Running and finished exports, plus the export of the whole database (Pro). |
| Tunetorch Pro | Enter the connection code (the field only exists while the server isn't connected) and check the licence status. With an active subscription you also set the Name of this server here, for example “Smith Family Music” instead of “Tunetorch” (see below). The connection code is managed by whoever owns the server. Other admins only see the server name on this tab. → Tunetorch Pro |
Resetting to defaults
Every section has a ↺ button at the top. As long as all values are at their defaults, it
barely stands out. If one differs, it turns the accent colour, even when the section is
collapsed. Before saving, it shows you what will change (current → default).
Because the default comes straight from the server, an existing installation also picks up, with one click, a default value that changed in an update.
The same button also exists in every account's user settings.
Your server's name
Out of the box, your installation is called “Tunetorch” everywhere. With an active Pro subscription you give it a name of your own under Server settings → Tunetorch Pro → Name of this server, for example “Smith Family Music”. If the field stays empty, it's called “Tunetorch”.
Without an active subscription the field is missing. You don't lose anything that way: without Pro the server is called “Tunetorch” again anyway. Your name stays saved and is back immediately with the subscription.
Where the name appears:
| Place | |
|---|---|
| Header of the interface | immediately |
| Browser tab title | immediately |
| Sign-in page | immediately, see the note below |
| Name of the installed web app (PWA) | only at the next installation |
| Name of the Android app on the home screen | not at all, see below |
The name is on the sign-in page, so it shows before anyone signs in. Anyone who knows your server's address sees it without signing in. That's intentional: the name is meant to greet you. If you don't want that, leave the field empty and it keeps saying “Tunetorch”. Your music and your data aren't affected; it's only about this one piece of text.
A web app that's already installed keeps its old name. The name under the icon on the home screen is fixed at installation. Browsers pick up later changes only with a delay or not at all. To see the new name there, remove the app and install it again.
The Android app stays “Tunetorch”, and that won't change. It can manage several servers. With three servers added, there'd be no right answer as to which name should be on the home screen. Inside the app you see your server name in the header as usual.
If your subscription expires, the server is called “Tunetorch” again. Your name stays saved and is back as soon as Pro returns.
Time zone
Out of the box the server runs in Europe/Berlin. You don't set the time zone with a
Docker variable but in the interface (Server settings → Time zone), where you pick it from
the complete IANA list.
It applies to the timestamps in the log, all dates and the fixed times of the maintenance tasks. A change takes effect immediately.
Reverse proxy & HTTPS
For access from the internet and for the installable PWA you need a reverse proxy with a TLS
certificate. It forwards to port 5000 of the container.
Caddy (obtains the certificate itself):
music.example.com {
reverse_proxy 127.0.0.1:5000
}
Nginx:
server {
server_name music.example.com;
listen 443 ssl;
location / {
proxy_pass http://127.0.0.1:5000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 300s;
}
}
The X-Forwarded-For header is the important one. Tunetorch reads the caller's real IP from
it for the brute-force protection. You specify how many proxies sit in front with
TT_TRUSTED_PROXIES (default 1).
For large uploads under Nginx you also need a suitable
client_max_body_size.
Layout of the data directory
/app/data/
├── db/ the SQLite database (WAL)
├── backups/ backup copies of the database (automatic before schema updates)
├── audio/ uploaded original files + metadata backup (.txt)
├── audio_cache/ converted versions (limited automatically)
├── cover/ cover art in four sizes
├── interpret_hero/ artist images
├── person_hero/ photos of people
├── logs/ server logs (rotating)
├── jwt/ signing keys for sign-in
├── lizenz/ state of the Pro licence
├── redis/ persistent security data (blocks, token blocklist)
├── upload_temp/ running upload sessions
└── temp/ exports and short-lived intermediate files
For a backup, this one directory is enough; see Security & backup.