Files
app-catalog-felhom.eu/templates/sabnzbd/docker-compose.yml
T
adminandClaude Opus 5 8ee687e544
gates / gates (push) Successful in 4s
SABnzbd and NZBGet: the Usenet pair, each with its complete record (R-988)
Two new apps, published in one commit with their onboarding records, bench-proven on LXC 9401
and box-proven on scratch guest 9202 through the product.

- sabnzbd version-5.1.3 (lscr.io/linuxserver — the project publishes no image; the second
  third-party publisher here after transmission), 96M/1024M, usenet.<domain>
- nzbget v26.3 (the project's own image), 64M/512M, nzbget.<domain>
- a PAID Usenet provider is the household's own: both app pages say so before the install, and
  neither record claims the download chain was measured, because without a provider it cannot be
- first admin class 1 in both; SABnzbd ships with NO login at all and its inet_exposure asks
  nobody to log in until local_ranges stops the proxy's address counting as local
- nine defects found by measuring and fixed before publication (CHANGELOG has each one)
- ladders written by upgrade-test.py --write-ladder, both venues proven, C3 failed first
- README (tree + both tables), FIRST-ADMIN (two rows), fixtures for both venues

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117kRTSgs3rJWUFGxyoWN6Y
2026-10-12 22:48:54 +02:00

159 lines
9.4 KiB
YAML

# SABnzbd - Usenet letöltő, teljes felülettel
# Domain: ${SUBDOMAIN}.${DOMAIN}
# Database: none (its settings, queue and history are files in the config volume)
# RAM: measured on the bench (mem_limit: 1024M) | Pi-compatible: Yes (amd64, arm64)
#
# WHY A USENET CLIENT AT ALL (operator request 2026-10-12, R-988): Radarr, Sonarr and Jellyseerr can
# hand a job to a Usenet client exactly as they hand one to a torrent client, and until today the
# catalog had no Usenet client. SABnzbd is the full one of the pair; NZBGet is the light one.
#
# THE HOUSEHOLD MUST BRING A PAID USENET PROVIDER. Usenet is not a peer-to-peer swarm: the articles
# live on a provider's servers and access is a subscription. No provider is configured here and none
# can be - the server, port, username and password are the household's own. The app page says so
# before the install, and the first step after it is entering them.
#
# NO INBOUND PORT NEEDED, and that is not a compromise here: a Usenet client only ever makes OUTGOING
# connections (NNTP, usually 563 with TLS). The torrent pair loses incoming peers behind the box's
# closed ports; this app loses nothing at all.
#
# THE IMAGE IS NOT THE PROJECT'S OWN - the second such template in this catalog (the first was
# Transmission, operator ruling 2026-10-12). SABnzbd publishes no Docker image of its own;
# `lscr.io/linuxserver/sabnzbd` is the maintained community one (version-5.1.3, built from the
# upstream release, versioned tags, amd64 + arm64). The onboarding record carries this as a named
# exception with its reason.
#
# FIRST ADMIN (class 1 - generated by us at install, FIRST-ADMIN.md). SABnzbd HAS NO LOGIN OF ITS OWN
# on a fresh install: whoever opens the page first owns the app, and its API hands out everything.
# The image offers no environment variable for this, so the entrypoint seeds the app's own
# `sabnzbd.ini` before the first start with:
# * username + password - the generated login. A plaintext value IS accepted: SABnzbd's
# `encode_password` only encodes a value containing `#` or a
# non-printable character (read in sabnzbd/config.py, 2026-10-12),
# and our generator is letters and digits.
# * inet_exposure = 5 - "webui with login for external". **This one can ONLY be set in the
# file**: it is declared `protect=True` (sabnzbd/cfg.py), which means
# the API refuses to set it.
# * local_ranges = 127.0.0.1 - and THIS is what makes inet_exposure mean anything. SABnzbd
# decides whether a visitor needs the login from the CLIENT ADDRESS:
# `login_bypassed() = inet_exposure == 5 and check_access(6)`, and
# `check_access` for a type above the exposure level is just
# `is_loopback_addr(ip) or is_local_addr(ip)` (sabnzbd/security.py).
# With local_ranges UNSET, `is_local_addr` falls back to SABnzbd's
# built-in LAN_RANGES - which contain 172.16.0.0/12 (sabnzbd/misc.py).
# Behind traefik every request arrives from 172.18.x, so the login is
# bypassed for EVERYONE: measured on the bench 2026-10-12, where a
# request with no credentials at all answered 200 and served the
# Quick-Start Wizard. Setting the list REPLACES those defaults, so
# nothing a proxy can present is local and the web UI asks every
# visitor to log in. The same list feeds `xff_trusted_networks`, so it
# also stops the app trusting an X-Forwarded-For header - which the
# tunnel's chain can carry client-written (R-753, and this app is in
# the "never trust the leftmost entry" family).
# Unaffected: the API (its access_type is below the exposure level, so
# Radarr and Sonarr keep working with the key) and the container's own
# healthcheck (127.0.0.1 is loopback).
# * host_whitelist - the public name, the container name (the controller's probe and the
# *arr apps dial that) and the local names. NOTE, read in
# sabnzbd/interface.py and measured: the Host check is SKIPPED
# entirely while a login is configured (`check_hostname` returns
# early if `login_configured()`), so on this box the list is inert
# insurance - it only starts working if a household removes the
# login. It is seeded because it costs nothing and covers that case.
# * api_key - generated too, so the key Radarr/Sonarr use is not one the app
# minted on its own and printed in its config for the first visitor.
#
# Environment variables:
# DOMAIN - Your domain (e.g., demo-felhom.eu)
# SUBDOMAIN - The name this app answers on
# HDD_PATH - The drive the downloads go to
# SAB_ADMIN_PASSWORD - generated at install (deploy_fields), seeded before the first start
# SAB_API_KEY - generated at install, the key the *arr apps authenticate with
#
# Folders: one folder on the drive, ${USERDATA_PATH}/media/usenet, with the app's own complete/ and
# incomplete/ inside it (the household sees it in the file browser); the settings, the queue and the
# history in the named volume sabnzbd_config (NVMe).
services:
sabnzbd:
image: lscr.io/linuxserver/sabnzbd:version-5.1.3
container_name: sabnzbd
restart: unless-stopped
environment:
- TZ=Europe/Budapest
- PUID=1000
- PGID=1000
- UMASK=022
- SAB_ADMIN_PASSWORD=${SAB_ADMIN_PASSWORD}
- SAB_API_KEY=${SAB_API_KEY}
- SAB_PUBLIC_HOST=${SUBDOMAIN}.${DOMAIN}
# The seed happens ONCE, before the app's first start, and only when the app has no config of its
# own - a household that changes any of this in the app keeps its change across a restart and an
# update. What the app does with the file afterwards is its business; `after_install` reads the
# three settings that matter back out of the running app, so a value the app ignores or rewrites
# cannot pass unnoticed (the qBittorrent lesson of 2026-10-12).
entrypoint:
- /bin/sh
- -c
- |
CONF=/config/sabnzbd.ini
if [ ! -f "$$CONF" ]; then
mkdir -p /config
{
printf '%s\n' '[misc]'
printf '%s\n' 'host = 0.0.0.0'
printf '%s\n' 'port = 8080'
printf '%s\n' 'username = admin'
printf 'password = %s\n' "$$SAB_ADMIN_PASSWORD"
printf 'api_key = %s\n' "$$SAB_API_KEY"
printf '%s\n' 'inet_exposure = 5'
printf '%s\n' 'local_ranges = 127.0.0.1'
printf 'host_whitelist = %s, sabnzbd, localhost, 127.0.0.1\n' "$$SAB_PUBLIC_HOST"
printf '%s\n' 'download_dir = /downloads/incomplete'
printf '%s\n' 'complete_dir = /downloads/complete'
printf '%s\n' 'check_new_rel = 0'
printf '%s\n' 'auto_browser = 0'
} > "$$CONF"
chmod 600 "$$CONF"
fi
exec /init
volumes:
- sabnzbd_config:/config
# ONE bind for the household's downloads, with the app's own two folders inside it:
# complete/ for the finished files and incomplete/ for the ones still being assembled. Two
# separate binds were REFUSED by the controller (measured on 9202, 2026-10-12): a backup class
# and a data_paths annotation must name a path the compose actually binds, and they named the
# parent. The incomplete set stays on the drive deliberately - it is large, it churns, and it
# is worthless on its own, so it has no business on the NVMe volume that gets backed up.
- ${USERDATA_PATH}/media/usenet:/downloads
networks:
- traefik-public
deploy:
resources:
limits:
memory: 1024M
healthcheck:
# `/` answers 303 (it redirects into the interface), so a probe that accepts only 200 or 401
# can never pass - measured on the bench 2026-10-12, where exactly that happened. The API's
# version call is the stable one: 200 while the request counts as local, 401 or 403 once it
# does not, and all three mean the web server is answering, which is the question a liveness
# probe asks. Proven in both directions on the bench.
test: ["CMD-SHELL", "curl -s -o /dev/null -w '%{http_code}' 'http://127.0.0.1:8080/api?mode=version' | grep -qE '^(200|401|403)$$'"]
interval: 30s
timeout: 5s
retries: 3
start_period: 60s
labels:
- "traefik.enable=true"
- "traefik.http.routers.sabnzbd.rule=Host(`${SUBDOMAIN}.${DOMAIN}`)"
- "traefik.http.routers.sabnzbd.entrypoints=websecure"
- "traefik.http.routers.sabnzbd.tls=true"
- "traefik.http.routers.sabnzbd.tls.certresolver=letsencrypt"
- "traefik.http.services.sabnzbd.loadbalancer.server.port=8080"
volumes:
sabnzbd_config:
networks:
traefik-public:
external: true