Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/chrisbenincasa/tunarr/llms.txt

Use this file to discover all available pages before exploring further.

Once Tunarr is installed, you can tune its behavior through environment variables and command-line flags. All options listed below apply regardless of whether you run Tunarr in Docker or as a standalone binary. Docker users should prefer environment variables set in their Compose file or docker run command.

Configuration Reference

Server

Environment VariableCLI FlagDefaultDescription
TUNARR_DATABASE_NAME--database''Path where Tunarr writes its data. Do not set this in Docker — use a bind mount pointed to /config/tunarr instead.
TUNARR_SERVER_PORT--port / -p8000Port the Tunarr server listens on. When using Docker, prefer a port mapping rather than setting this variable.
TUNARR_BIND_ADDRN/A0.0.0.0Network interface Tunarr binds to. By default, Tunarr listens on all interfaces. This rarely needs to be changed.
TUNARR_SERVER_TRUST_PROXY--trust_proxyfalseEnables trust proxy mode for deployments behind a reverse proxy.

Logging

Environment VariableCLI FlagDefaultDescription
TUNARR_LOG_LEVELN/AinfoLog verbosity. Valid values: trace, debug, info, warn, error, fatal, silent. Overrides the UI setting.
LOG_DIRECTORYN/A(data dir)Custom directory for log files. Defaults to the Tunarr data directory.

Streaming

Environment VariableCLI FlagDefaultDescription
TUNARR_SESSION_CLEANUP_DELAY_SECONDSN/A15Seconds to wait before cleaning up a transcode session after the last client disconnects.

Search (Meilisearch)

Environment VariableCLI FlagDefaultDescription
TUNARR_MEILISEARCH_PATHN/A(auto-detected)Path to the Meilisearch binary. Tunarr searches common locations automatically if not set.
TUNARR_SEARCH_PORTN/A(random available)Port for the embedded Meilisearch instance.
TUNARR_SEARCH_MAX_MEMORYN/A(unlimited)Maximum memory for Meilisearch indexing (e.g. 1024Mb, 2Gb). See Meilisearch docs.
TUNARR_SEARCH_MAX_INDEXING_THREADSN/A(all cores)Maximum threads for Meilisearch indexing. Useful for limiting CPU usage on shared hosts.
TUNARR_SEARCH_REDUCE_INDEXER_MEMORY_USAGEN/AtrueReduces Meilisearch memory consumption during indexing. See Meilisearch docs. May impact file storage. Not available on Windows.
TUNARR_DISABLE_SEARCH_SNAPSHOT_IN_BACKUPN/AfalseWhen true, excludes the Meilisearch snapshot from backups. The search index will be rebuilt from scratch on restore.

Artwork

Environment VariableCLI FlagDefaultDescription
TUNARR_PROXY_ARTWORKN/AfalseWhen true, Tunarr proxies artwork requests through itself rather than redirecting clients to the media server URL. Useful when clients cannot reach your media server directly (e.g. behind a firewall or on a different network segment).

Transcoding

Environment VariableCLI FlagDefaultDescription
TUNARR_TONEMAP_ENABLEDN/AfalseEnables experimental HDR-to-SDR tonemapping when HDR source content is detected. See HDR Tonemapping.
TUNARR_DISABLE_VULKANN/AfalseDisables Vulkan-based tonemapping in the CUDA pipeline. Use if Vulkan is unavailable or causing stream failures; Tunarr will fall back to software tonemapping.
TUNARR_DISABLE_VAAPI_PADN/AfalseDisables hardware pad filters (pad_vaapi / pad_opencl) for VAAPI and falls back to software padding. Use if hardware padding causes artifacts or errors on your hardware.

Performance

Environment VariableCLI FlagDefaultDescription
TUNARR_USE_WORKER_POOLN/AfalseEnables an experimental worker thread pool for background tasks.
TUNARR_WORKER_POOL_SIZEN/A(CPU count)Number of threads in the worker pool. Recommended: no more than the number of CPUs on the host.

Debug

Environment VariableCLI FlagDefaultDescription
TUNARR_SERVER_PRINT_ROUTES--print_routesfalsePrints all server routes at startup. Useful for debugging routing issues.

Hardware Transcoding

Tunarr supports hardware-accelerated transcoding via Nvidia NVENC, VAAPI (Intel/AMD), and Intel QuickSync. Enabling hardware acceleration in Docker requires passing the GPU device through to the container.
The recommended approach for Nvidia GPUs is to install and configure the Nvidia Container Toolkit on your host.Docker Compose:
version: '3.8'
services:
  tunarr:
    image: chrisbenincasa/tunarr:latest
    container_name: tunarr
    ports:
      - ${TUNARR_SERVER_PORT:-8000}:8000
    environment:
      - TUNARR_LOG_LEVEL=${TUNARR_LOG_LEVEL:-INFO}
      - NVIDIA_VISIBLE_DEVICES=all
      - TZ=America/New_York
    volumes:
      - /path/to/tunarr/data:/config/tunarr
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu, video, utility]
Docker CLI:
docker run \
    --runtime nvidia \
    -v "$(pwd)"/tunarr:/config/tunarr \
    -e "TZ=America/New_York" \
    -p 8000:8000 \
    chrisbenincasa/tunarr

Running as a Service (Standalone Binary)

When using the standalone binary, it is strongly recommended to run Tunarr as a background service so it starts automatically and restarts on failure.
Follow these steps to install Tunarr as a systemd service:
1

Create the installation directory

sudo mkdir /opt/tunarr
sudo mkdir /opt/tunarr/streams
2

Move the binaries

Move both the Tunarr binary and the bundled Meilisearch binary to /opt/tunarr. Replace the source paths with the locations of your downloaded files.
sudo mv tunarr-linux-x64 /opt/tunarr/tunarr-linux-x64
sudo mv meilisearch /opt/tunarr/meilisearch
On every update, you must replace both the Tunarr and Meilisearch binaries.
3

Create the service file

sudo nano /etc/systemd/system/tunarr.service
Paste the following service definition and replace YOUR_USER and YOUR_GROUP with the Linux user and group you want Tunarr to run as:
[Unit]
Description=Tunarr
Wants=network-online.target
After=network-online.target

[Service]
Type=simple
WorkingDirectory=/opt/tunarr
ExecStart=/opt/tunarr/tunarr-linux-x64
ExecReload=pkill -INT tunarr-linux-x64
ExecStop=pkill -INT tunarr-linux-x64
KillMode=process
Restart=always
RestartSec=15

# Replace these values!
User=YOUR_USER
Group=YOUR_GROUP

StandardOutput=journal
StandardError=journal

[Install]
WantedBy=multi-user.target
Press Ctrl+O then Enter to save, then Ctrl+X to exit.
4

Enable and start the service

sudo systemctl daemon-reload
sudo systemctl enable tunarr.service
sudo systemctl start tunarr

Build docs developers (and LLMs) love