Files
app-catalog-felhom.eu/templates/transmission/docker-compose.yml
T
adminandClaude Opus 5 9081a47e11
gates / gates (push) Successful in 3s
qBittorrent and Transmission: the two download clients, each with its complete record
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.

- qbittorrent 5.2.4-1 (the project's own image), 192M/1024M, torrent.<domain>
- transmission version-4.1.3-r0 (lscr.io/linuxserver — the project publishes no image at all;
  the operator was asked and chose it before the build), 64M/512M, transmission.<domain>
- first admin class 1 in both, measured; no UPnP (the box opens no port at home), both peer
  ports unpublished, a 276 MB torrent completed on outgoing connections alone
- six defects found by measuring and fixed before publication (CHANGELOG has each measurement)
- ladders written by upgrade-test.py --write-ladder, both venues proven
- 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 20:48:56 +02:00

111 lines
5.7 KiB
YAML

# Transmission - Egyszerű torrent letöltő webes felülettel
# Domain: ${SUBDOMAIN}.${DOMAIN}
# Database: none (its settings and torrent state are files in the config volume)
# RAM: ~40M idle, more while downloading (mem_limit: 512M) | Pi-compatible: Yes (amd64, arm64)
#
# WHY A SECOND TORRENT CLIENT (operator ruling 2026-10-12): qBittorrent is the full one; this is the
# light one - the client most NAS owners already know, at a quarter of the memory. Same job, simpler
# surface, and it is the one to offer on a small box.
#
# THE IMAGE IS NOT THE PROJECT'S OWN, and this is the first template in this catalog where that is
# true (operator ruling 2026-10-12, asked and answered before the build). The Transmission project
# publishes NO Docker image; `lscr.io/linuxserver/transmission` is the maintained community one
# (version-4.1.3-r0, built from the upstream release, versioned tags, amd64 + arm64). Checklist 0.3
# wants an official image; the onboarding record carries this as a named exception with its reason.
#
# FIRST ADMIN (class 1 - generated by us at install, FIRST-ADMIN.md). The image's init script sets
# `rpc-authentication-required=true` plus the username and password from USER/PASS on EVERY start, so
# the generated password is re-applied rather than seeded once. With USER/PASS unset the same script
# sets `rpc-authentication-required=false` - an app open to anyone who knows the name. They are never
# unset here.
#
# THE PUBLIC NAME: Transmission validates the Host header through `rpc-host-whitelist`. HOST_WHITELIST
# carries the app's own public name, which is tighter than the image's default (validation off when
# the variable is empty). WHITELIST (the IP allow-list) stays off: traffic arrives from traefik, so an
# address allow-list would either admit everyone behind the proxy or nobody.
#
# NO INBOUND PEER PORT, deliberately - as for qBittorrent. The tunnel carries HTTP only and the box
# opens no port at home (01-topology-and-trust.md §7), so Transmission runs outbound-only: downloads
# work, poorly seeded torrents are slower.
#
# 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
# TR_ADMIN_PASSWORD - generated at install (deploy_fields), re-applied at every start
#
# Folders: the downloads in ${USERDATA_PATH}/media/transmission (the household sees them in the file
# browser); the settings and the torrent state in the named volume transmission_config (NVMe).
services:
transmission:
image: lscr.io/linuxserver/transmission:version-4.1.3-r0
container_name: transmission
restart: unless-stopped
environment:
- TZ=Europe/Budapest
- PUID=1000
- PGID=1000
- UMASK=022
- USER=admin
- PASS=${TR_ADMIN_PASSWORD}
# The whitelist is a Host-header allow-list and it answers 400 to anything else - the
# container's OWN healthcheck included, which dials 127.0.0.1. Measured on the bench
# 2026-10-12: with the public name alone the app never goes healthy. The local names are
# what Transmission itself allows by default; the point of the list is DNS rebinding from a
# browser, which a request from inside the container is not.
- HOST_WHITELIST=${SUBDOMAIN}.${DOMAIN},localhost,127.0.0.1
- PEERPORT=51413
# The image's init copies /defaults/settings.json on first boot and then patches only what the
# env vars name. `port-forwarding-enabled` is NOT one of them and Transmission's own default is
# TRUE - the app asks the household's router for a forwarded port (read on 9202 2026-10-12:
# "port-forwarding-enabled": true). The box opens no port at home, so it is turned off here,
# before the service starts, with the jq the image already carries.
entrypoint:
- /bin/sh
- -c
- |
CONF=/config/settings.json
if [ ! -f "$$CONF" ]; then
cp /defaults/settings.json "$$CONF"
fi
jq '.["port-forwarding-enabled"] = false' "$$CONF" > /tmp/s.json && mv /tmp/s.json "$$CONF"
exec /init
volumes:
- ${USERDATA_PATH}/media/transmission:/downloads
# Dropping a .torrent file into this folder starts it - the household sees the folder in the
# file browser. The image watches /watch and logs an error when it does not exist.
- ${USERDATA_PATH}/media/transmission/watch:/watch
- transmission_config:/config
networks:
- traefik-public
deploy:
resources:
limits:
memory: 512M
healthcheck:
# Transmission answers 401 on EVERY path once authentication is on, so `curl -f` can never
# succeed and the container reads unhealthy for ever (measured on the bench 2026-10-12: exit 22,
# "The requested URL returned error: 401"). A 401 is the web server answering, which is what a
# liveness probe needs; the controller's own `type: http` probe counts any response as alive
# (felhom-controller/internal/stacks/healthprobe.go:292), so the two agree.
test: ["CMD-SHELL", "curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1:9091/transmission/web/ | grep -qE '^(200|401)$$'"]
interval: 30s
timeout: 5s
retries: 3
start_period: 30s
labels:
- "traefik.enable=true"
- "traefik.http.routers.transmission.rule=Host(`${SUBDOMAIN}.${DOMAIN}`)"
- "traefik.http.routers.transmission.entrypoints=websecure"
- "traefik.http.routers.transmission.tls=true"
- "traefik.http.routers.transmission.tls.certresolver=letsencrypt"
- "traefik.http.services.transmission.loadbalancer.server.port=9091"
volumes:
transmission_config:
networks:
traefik-public:
external: true