Running a server
Configuration reference
Every setting in wrentv.yaml, its environment variable and its default.
Most settings can be changed in Manage → Settings in the server's web app. Everything is stored in wrentv.yaml
in the data directory, and environment variables override the file.
Data directory
wrentv.yaml, the database, artwork and certificates live in the data directory:
| Platform | Data directory |
|---|---|
| Docker | /config |
| Linux | /var/lib/wrentv (as root, which the service uses) or ~/.local/share/wrentv |
| macOS | ~/Library/Application Support/Wren TV |
| Windows | C:\ProgramData\WrenTV |
Override it with WRENTV_DATA_DIR or the -data <dir> option. See Backups for what's
inside.
wrentv.yaml
The file is created with defaults on first start. Secrets (machine_id, integration_key, auth.signing_key) are
generated then. Restart the server after editing it by hand.
yamlserver_name: Wren TV # shown in players; defaults to the computer's name
listen: ":32500" # address and port for HTTP and HTTPS
public_url: "" # your own HTTPS address, e.g. behind a reverse proxy
local_urls: [] # LAN addresses to advertise; detected automatically
integration_key: wtv_… # generated; for services, sent as X-WrenTV-Key
auth:
mode: local # local | supabase (Wren TV accounts)
supabase:
url: ""
publishable_key: ""
# server_id, server_secret and claim_code are managed by the server
remote_access: # automatic HTTPS addresses (Wren TV accounts only)
enabled: true
upnp: true # forward a port with UPnP / NAT-PMP
public_port: 0 # a port you forwarded by hand (replaces UPnP)
metadata:
tmdb_api_key: ""
omdb_api_key: "" # optional: IMDb, Rotten Tomatoes, Metacritic ratings
language: en-US
workers: 8 # concurrent metadata lookups
transcode:
ffmpeg_path: ffmpeg
ffprobe_path: ffprobe
hwaccel: auto # auto | videotoolbox | nvenc | qsv | vaapi | amf | none
vaapi_device: /dev/dri/renderD128
scratch_dir: "" # default <data>/transcode
streaming: # see Running a server → Streaming with debrid
enabled: false
torbox_key: ""
alldebrid_key: ""
realdebrid_key: ""
provider_order: [torbox, alldebrid, realdebrid]
addons:
- { name: torrentio, url: "https://torrentio.strem.fun/manifest.json", enabled: true }
- { name: comet, url: "https://comet.feels.legal/manifest.json", enabled: true }
qualities: [2160p, 1080p] # a stream is saved for each
max_size_gb: {} # per quality, e.g. { 2160p: 40 }; 0 = any size
prefetch: true # look up the rest of the season in the background
mode: stream # stream | download (save what's watched as files)
movie_library: "" # library ids that downloads go to
show_library: ""
download_quality: 2160p
limits: # 0 = no limit
max_streams: 0 # debrid playbacks at once, all users
bandwidth_mbps: 0 # all debrid traffic
per_stream_mbps: 0
download_mbps: 0
max_downloads: 2 # server downloads at once
prefetch_workers: 2
download_quota_gb: 0
min_free_gb: 20
users: # defaults for every user; see Users and sharing
max_streams: 0 # playbacks at once per person; 0 = no limit
device_downloads: true # people may download titles to their devices
max_downloads: 2 # device downloads at once per person
webhooks: # see Developers → Integrations
- url: https://backend.example.com/wrentv
secret: change-me
events: [download.completed, download.failed] # empty = all events
scanner:
watch: true # filesystem notifications for instant pickup
poll_sec: 0 # folder polling; 0 = 5 s on macOS, 30 s elsewhere
interval_min: 30 # full incremental rescan; 0 = off
probe_workers: 4 # background ffprobe runs; -1 = probe on first play
markers:
fingerprint: true # find intros and credits by comparing episode audio
Settings by topic
| Setting | Guide |
|---|---|
auth | First run and claiming |
remote_access, public_url, local_urls | Remote access |
metadata | Metadata |
transcode | Transcoding |
streaming | Streaming with debrid |
users | Users and sharing |
webhooks, integration_key | Integrations |
scanner | Libraries |
markers | Intro and credits detection |
local_urls
The server advertises its LAN addresses so players at home connect directly. It detects them from the computer's
network interfaces. In Docker with bridge networking, those are the container's internal addresses, which nothing else
can reach. Use network_mode: host, or list the real addresses:
yaml environment:
- WRENTV_LOCAL_URLS=http://192.168.1.20:32500
Environment variables
Environment variables override wrentv.yaml. They're handy with Docker.
| Variable | Setting |
|---|---|
WRENTV_DATA_DIR | The data directory |
WRENTV_LISTEN | listen |
WRENTV_SERVER_NAME | server_name |
WRENTV_PUBLIC_URL | public_url |
WRENTV_LOCAL_URLS | local_urls, comma-separated |
WRENTV_AUTH_MODE | auth.mode |
WRENTV_SUPABASE_URL | auth.supabase.url |
WRENTV_SUPABASE_PUBLISHABLE_KEY | auth.supabase.publishable_key |
WRENTV_REMOTE_ACCESS | remote_access.enabled (true or false) |
WRENTV_PUBLIC_PORT | remote_access.public_port |
WRENTV_TMDB_API_KEY | metadata.tmdb_api_key |
WRENTV_OMDB_API_KEY | metadata.omdb_api_key |
WRENTV_FFMPEG | transcode.ffmpeg_path |
WRENTV_FFPROBE | transcode.ffprobe_path |
WRENTV_HWACCEL | transcode.hwaccel |
WRENTV_STREAMING | streaming.enabled (true or false) |
WRENTV_TORBOX_API_KEY | streaming.torbox_key |
WRENTV_ALLDEBRID_API_KEY | streaming.alldebrid_key |
WRENTV_REALDEBRID_API_KEY | streaming.realdebrid_key |
WRENTV_SCAN_POLL_SEC | scanner.poll_sec |
WRENTV_DEBUG | Any value turns on debug logging |
For testing only: WRENTV_DIRECT_API and WRENTV_ACME_DIRECTORY point remote access at another address service or
certificate authority (such as Let's Encrypt staging).
The old HAVEN_* names still work. See Upgrading from Haven.
Ports
| Port | Protocol | For |
|---|---|---|
| 32500 | TCP | The web app, API and streaming, over HTTP and HTTPS |