Files
felhom.eu/documentation/audits/qbittorrent-2026-10-12/bench/12-compose-resolved.txt
T
admin 5148fe1e11
gates / gates (push) Successful in 6m29s
audit: download clients for the catalog - qbittorrent + transmission measured twice, five defects fixed
The arr stack had no download client: radarr/sonarr/seerr decide what to fetch
and hand it to one, and there was none. Both templates are written and measured
on the bench (LXC 9401) and on 9202 through the product. Neither is published -
the onboarding records are not complete and the gate refuses a template without
one.

Found by measuring, each fixed:
- qBittorrent was unreachable on its own public name: WebUI\ServerDomains takes
  SEMICOLONS; a comma list answers 401 Invalid Host header to everything.
  Undocumented upstream; measured four ways through the app's own API.
- Both clients asked the household's router to open a port (qBittorrent
  UPnP/NAT-PMP ON, Transmission port-forwarding-enabled true). The box opens no
  port at home. qBittorrent ignores the seeded Session\UseUPnP=false at first
  start but honours the same setting through its API, so it goes through
  after_install: ON at 17:21:51, OFF at 17:21:56.
- Transmission could never go healthy (401 on every path, curl -f exit 22).
- Transmission's host whitelist refused its own healthcheck.
- The apparent lock-out was a measurement artefact: with stranger and household
  on two different addresses, the stranger is banned and the household signs in
  at the same instant (204). qBittorrent reads the real visitor address.

Downloads work with no inbound port, measured: 34 seeds / 4 MB/s (qBittorrent),
48 peers (Transmission), both complete, port confirmed closed.

9202 is back on the live catalog with both apps removed; bench 9401 stopped as
found; the live catalog's main untouched.
2026-10-12 19:38:23 +02:00

71 lines
2.6 KiB
Plaintext

name: qbt-bench
services:
qbittorrent:
container_name: qbittorrent
deploy:
resources:
limits:
memory: "1073741824"
entrypoint:
- /bin/sh
- -c
- |
CONF=/config/qBittorrent/config/qBittorrent.conf
if [ ! -f "$$CONF" ]; then
echo "[felhom] first boot - seeding qBittorrent config and the generated WebUI password"
mkdir -p /config/qBittorrent/config
HASH=$$(QBT_PW="$$QBT_ADMIN_PASSWORD" python3 -c "import base64,hashlib,os,sys; s=os.urandom(16); k=hashlib.pbkdf2_hmac('sha512', os.environ['QBT_PW'].encode('utf-8'), s, 100000, 64); sys.stdout.write('@ByteArray(%s:%s)' % (base64.b64encode(s).decode(), base64.b64encode(k).decode()))")
printf '%s\n' '[BitTorrent]' 'Session\DefaultSavePath=/downloads' 'Session\TempPath=/downloads/.temp' 'Session\TempPathEnabled=true' 'Session\Port=6881' '[Meta]' 'MigrationVersion=9999' '[Preferences]' 'WebUI\Username=admin' "WebUI\\Password_PBKDF2=\"$$HASH\"" 'WebUI\Port=8080' 'WebUI\Address=*' "WebUI\\ServerDomains=$$QBT_PUBLIC_HOST" 'WebUI\ReverseProxySupportEnabled=true' 'WebUI\TrustedReverseProxiesList=172.16.0.0/12' > "$$CONF"
fi
exec /sbin/tini -g -- /entrypoint.sh
environment:
PGID: "1000"
PUID: "1000"
QBT_ADMIN_PASSWORD: <redacted>
QBT_LEGAL_NOTICE: confirm
QBT_PUBLIC_HOST: torrent.bench.local
QBT_TORRENTING_PORT: "6881"
QBT_WEBUI_PORT: "8080"
TZ: Europe/Budapest
UMASK: "022"
healthcheck:
test:
- CMD
- curl
- -fsS
- -o
- /dev/null
- http://127.0.0.1:8080/
timeout: 5s
interval: 30s
retries: 3
start_period: 30s
image: qbittorrentofficial/qbittorrent-nox:5.2.4-1
labels:
traefik.enable: "true"
traefik.http.routers.qbittorrent.entrypoints: websecure
traefik.http.routers.qbittorrent.rule: Host(`torrent.bench.local`)
traefik.http.routers.qbittorrent.tls: "true"
traefik.http.routers.qbittorrent.tls.certresolver: letsencrypt
traefik.http.services.qbittorrent.loadbalancer.server.port: "8080"
networks:
traefik-public: null
restart: unless-stopped
volumes:
- type: bind
source: /opt/qbt-bench/userdata/media/torrents
target: /downloads
bind:
create_host_path: true
- type: volume
source: qbittorrent_config
target: /config
volume: {}
networks:
traefik-public:
name: traefik-public
external: true
volumes:
qbittorrent_config:
name: qbt-bench_qbittorrent_config