Some checks failed
CI / Test (push) Successful in 3m35s
CI / Build (push) Successful in 1m33s
CI / Build-1 (push) Successful in 2m0s
CI / Build-2 (push) Successful in 1m34s
CI / Build-3 (push) Successful in 1m33s
CI / Build-4 (push) Successful in 1m35s
CI / Build-5 (push) Successful in 1m33s
CI / Lint (push) Failing after 2m31s
CI / Coverage (push) Successful in 2m48s
CI / Vet (push) Successful in 2m2s
Alpine/musl can't run NVIDIA's glibc userspace (nvidia-smi, libnvidia-encode, the static nvenc ffmpeg), so HW transcode was impossible — every 4K/anamorphic HLS encode fell back to software or failed. Switch the runtime stage to debian:bookworm-slim + a static BtbN ffmpeg built with nvenc, add par2 (Usenet segment repair) + 7z (RAR/7z extraction), and set NVIDIA_DRIVER_CAPABILITIES=video,compute,utility so a plain --gpus all (or the compose device reservation) lights up nvenc with no extra flags. Falls back to libx264 automatically when no GPU is attached. Build stage cross-compiles (--platform=BUILDPLATFORM) so multi-arch stays fast; downloads forced over IPv4.
77 lines
2.9 KiB
YAML
77 lines
2.9 KiB
YAML
# unarr — TorrentClaw agent
|
|
#
|
|
# Quick start:
|
|
# 1. Copy this file to any directory.
|
|
# 2. Set UNARR_API_KEY to your key (Settings → API Keys on torrentclaw.com).
|
|
# 3. Set DOWNLOAD_DIR to your media folder (absolute path).
|
|
# 4. Run: docker compose up -d
|
|
#
|
|
# Get your API key: https://torrentclaw.com/settings/api-keys
|
|
# Full docs: https://torrentclaw.com/unarr
|
|
|
|
services:
|
|
unarr:
|
|
image: torrentclaw/unarr:latest
|
|
pull_policy: always # always pull on `up` so you stay on the latest release
|
|
container_name: unarr
|
|
restart: unless-stopped
|
|
|
|
# host network is required for:
|
|
# - streaming to reach your TV / mobile / other LAN devices (port 11818)
|
|
# - HLS transcode server (port 11819)
|
|
# - Tailscale connectivity (if you use it)
|
|
# On macOS / Windows Docker Desktop, replace with `ports` mapping (see below).
|
|
network_mode: host
|
|
|
|
environment:
|
|
# --- Required ---
|
|
- UNARR_API_KEY=${UNARR_API_KEY:?Set UNARR_API_KEY in .env or export it}
|
|
|
|
# --- Optional ---
|
|
# Server URL — change only if you run a self-hosted TorrentClaw instance
|
|
- UNARR_API_URL=${UNARR_API_URL:-https://torrentclaw.com}
|
|
- TZ=${TZ:-UTC}
|
|
|
|
volumes:
|
|
# Config: config.toml is auto-created here on first run.
|
|
# After first start, edit this file to set organize paths, quality, etc.
|
|
- ${CONFIG_DIR:-./config}:/config
|
|
|
|
# Downloads: where finished media is saved.
|
|
# Set DOWNLOAD_DIR in .env or export it before running.
|
|
- ${DOWNLOAD_DIR:?Set DOWNLOAD_DIR to your media folder}:/downloads
|
|
|
|
# Data: piece-completion DB, HLS cache, DHT nodes.
|
|
# Named volume keeps this off your media drive (avoids NFS locking issues).
|
|
- unarr-data:/data
|
|
|
|
# --- NVIDIA GPU: hardware transcode (nvenc) ---
|
|
# Uncomment on a host with an NVIDIA GPU + nvidia-container-toolkit. The
|
|
# image already bundles an nvenc-enabled ffmpeg and sets
|
|
# NVIDIA_DRIVER_CAPABILITIES=video,compute,utility, so this device
|
|
# reservation is the only thing needed to enable HW transcode. Without a GPU
|
|
# the same image falls back to software (libx264) automatically — leave it
|
|
# commented. (docker run equivalent: add --gpus all)
|
|
# deploy:
|
|
# resources:
|
|
# reservations:
|
|
# devices:
|
|
# - driver: nvidia
|
|
# count: all
|
|
# capabilities: [gpu]
|
|
# # Optional: cap CPU/RAM for transcoding on shared hosts
|
|
# limits:
|
|
# memory: 2G
|
|
# cpus: "4.0"
|
|
|
|
# --- macOS / Windows alternative (replace network_mode: host above) ---
|
|
# network_mode: bridge
|
|
# ports:
|
|
# - "11818:11818" # direct stream (VLC, download)
|
|
# - "11819:11819" # HLS transcode (web player)
|
|
# - "42069:42069" # BitTorrent incoming peers
|
|
# Note: streaming will only reach devices on the same machine.
|
|
# For LAN / Tailscale playback use a Linux host with network_mode: host.
|
|
|
|
volumes:
|
|
unarr-data:
|