Media Server, Pt 5 - Transmission
Like Sabnzbd, Transmission is a downloader - this one, for Torrents. The basic steps for installation of a new container should be pretty evident by now: Create the storage directories, add to the compose file, although now that we have Authentik installed, there's another step, at least for containers we wish to integrate: Set up authentication.
So, in order, let's start with the Authentik setup. Log into your Authentik admin portal, and create a new Provider for Transmission. Proxy provider, forward auth (single application), default authentication, explicit consent authorization, external host transmission.<your domain>. Then create an Application using that Provider, and add it to the default Outpost.
There's similarly little special about the directory setup, although, given the nature of this application, we'll be setting up shared storage with other containers again.
$ mkdir -p /srv/data/docker/transmission/config
$ mkdir -p /srv/data/shared/torrent/{books,movies,music,tv}
$ sudo chown -R 10006:10002 /srv/data/docker/transmission
$ sudo chmod -R g-rwx,o-rwx /srv/data/docker/transmission
$ sudo chown -R root:10002 /srv/data/shared/torrent
$ sudo chmod -R g+w /srv/data/shared/torrend
That done, add to the compose file.
transmission:
deploy:
labels:
traefik.enable: "true"
traefik.http.routers.transmission-rtr.entrypoints: "websecure"
traefik.http.routers.transmission-rtr.middlewares: "authentik@swarm"
traefik.http.routers.transmission-rtr.rule: "Host(`transmission.<your.domain>`)"
traefik.http.routers.transmission-rtr.service: "transmission"
traefik.http.services.transmission.loadbalancer.server.port: "9091"
replicas: 1
environment:
PUID: 10006
PGID: 10002
UMASK: 002
TZ: "Etc/UTC"
healthcheck:
test: "curl -f http://localhost:9091"
interval: 2m
timeout: 5s
start_period: 1m
hostname: "transmission"
image: "linuxserver/transmission:latest"
networks:
- homelab
restart: on-failure
volumes:
- "/srv/data/docker/transmission/config:/config"
- "/srv/data/shared/torrent:/download"
Bring the stack up.
$ docker stack deploy -c <compose file> --prune homelab
We'll need to do some manual configuration on Transmission before it can be fully put into service, so let's shut that particular service back down.
$ docker service rm homelab_transmission
Now, edit /srv/data/docker/transmission/config/settings.json, and make sure the following fields are set:
bind-address-ipv4: "0.0.0.0",
download-dir: "/downloads/complete",
incomplete-dir: "/downloads/incomplete",
And restart the stack again.