Back

home theater services

tjheffner

2024-02-10


last black friday, I splurged and got a new 65” tv, record player, AV receiver and surround sound speakers for the living room. it’s been a monumental upgrade to our home theater experience. the living room was already wired for a 5.1 setup by a previous owner, so it wasn’t too much of a stretch to adapt it to 7.1. cannot recommend it enough. but the digital side of my home theater needed some love to match. it was using the same janky setup i initially hacked together when i first got my NAS. (which I bought using the 2020 covid trumpbux. pretty sweet.) so this weekend i re-did my NAS setup to make use of the *arr family of apps and help manage everything with a little less friction.

obligatory note that i don’t condone or endorse downloading content illegally. use torrents responsibly as dictated by the laws of your country of residence. thanks! ✌️

before i was only running qbittorrent in docker, not really using jackett, etc. after a couple of hours this weekend, and several more hours moving files around to match my new folder structure, i now have a bunch of additional services running in docker and they all communicate with each other. it’s great. content in my media library is monitored via radarr/sonarr/prowlarr and when higher quality versions of files are available, it updates them. it also lets me know when i’m missing episodes of series, etc. has made the whole process a lot more seamless.

basically, it works with one large shared folder so things are treated as a single filesystem. all the services are exposed on different ports available only to my home network.

data
├── torrents
│   ├── books
│   ├── movies
│   ├── music
│   └── tv
└── media
     ├── books
     ├── movies
     ├── music
     └── tv

there is a separate shared folder for all of the docker services and their config. this separation allows things to be easily mounted in as volumes and shared across the services that need them, without exposing everything to a service that doesn’t need it. nifty.

docker
└── appdata
    ├── radarr
    ├── sonarr
    ├── bazarr
    ├── prowlarr
    ├── flaresolverr
    ├── plex
    ├── tautalli
    ├── pullio
    └── qbittorrent

at least on synology you have to make these folders manually, but that’s not a big deal if you can ssh into your box instead of using the web ui.

  • radarr — movies
  • sonarr — tv shows
  • bazarr — subtitles
  • prowlarr — centralized indexer management for the *arr apps. only have to enter data in one spot, instead of individually.
  • flaresolverr — get around cloudflare blocking prowlarr on certain indexers
  • plex — media library
  • tautalli — stats for plex
  • qbittorrent — my preferred torrent client. easy to use.
  • pullio — keeps docker images for the above updated

in the docker/appdata folder, i have a docker-compose.yml and a .env file to centralize management of all these services.

here’s what the docker-compose looks like for all of the services:

version: "3.2"
services:
# Radarr - https://hotio.dev/containers/radarr/
  radarr:
    container_name: radarr
    image: ghcr.io/hotio/radarr:latest
    restart: unless-stopped
    logging:
      driver: json-file
      options:
        max-file: ${DOCKERLOGGING_MAXFILE}
        max-size: ${DOCKERLOGGING_MAXSIZE}
    labels:
      - org.hotio.pullio.update=${PULLIO_UPDATE}
      - org.hotio.pullio.notify=${PULLIO_NOTIFY}
      - org.hotio.pullio.discord.webhook=${PULLIO_DISCORD_WEBHOOK}
    ports:
      - 7878:7878
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
      - UMASK=002
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ${DOCKERCONFDIR}/radarr:/config
      - ${DOCKERSTORAGEDIR}:/data

# Sonarr - https://hotio.dev/containers/sonarr/
  sonarr:
    container_name: sonarr
    image: ghcr.io/hotio/sonarr:release
    restart: unless-stopped
    logging:
      driver: json-file
      options:
        max-file: ${DOCKERLOGGING_MAXFILE}
        max-size: ${DOCKERLOGGING_MAXSIZE}
    labels:
      - org.hotio.pullio.update=${PULLIO_UPDATE}
      - org.hotio.pullio.notify=${PULLIO_NOTIFY}
      - org.hotio.pullio.discord.webhook=${PULLIO_DISCORD_WEBHOOK}
    ports:
      - 8989:8989
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
      - UMASK=002
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ${DOCKERCONFDIR}/sonarr:/config
      - ${DOCKERSTORAGEDIR}:/data

# Bazarr - https://hotio.dev/containers/bazarr/
  bazarr:
    container_name: bazarr
    image: ghcr.io/hotio/bazarr:nightly
    restart: unless-stopped
    logging:
      driver: json-file
      options:
        max-file: ${DOCKERLOGGING_MAXFILE}
        max-size: ${DOCKERLOGGING_MAXSIZE}
    labels:
      - org.hotio.pullio.update=${PULLIO_UPDATE}
      - org.hotio.pullio.notify=${PULLIO_NOTIFY}
      - org.hotio.pullio.discord.webhook=${PULLIO_DISCORD_WEBHOOK}
    ports:
      - 6767:6767
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
      - UMASK=002
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ${DOCKERCONFDIR}/bazarr:/config
      - ${DOCKERSTORAGEDIR}/media:/data/media

  # Prowlarr - https://hotio.dev/containers/prowlarr/
  prowlarr:
    container_name: prowlarr
    image: ghcr.io/hotio/prowlarr
    restart: unless-stopped
    logging:
      driver: json-file
      options:
        max-file: ${DOCKERLOGGING_MAXFILE}
        max-size: ${DOCKERLOGGING_MAXSIZE}
    labels:
      - org.hotio.pullio.update=${PULLIO_UPDATE}
    ports:
      - 9696:9696
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - UMASK=002
      - TZ=${TZ}
    volumes:
      - ${DOCKERCONFDIR}/prowlarr:/config

  # Flaresolverr - https://github.com/FlareSolverr/FlareSolverr/tree/master
  # proxy service for prowlarr when cloudflare is detected
  flaresolverr:
    # DockerHub mirror flaresolverr/flaresolverr:latest
    image: ghcr.io/flaresolverr/flaresolverr:latest
    container_name: flaresolverr
    environment:
      - LOG_LEVEL=${LOG_LEVEL:-info}
      - LOG_HTML=${LOG_HTML:-false}
      - CAPTCHA_SOLVER=${CAPTCHA_SOLVER:-none}
      - TZ=${TZ}
    ports:
      - 8191:8191
    restart: unless-stopped

  # Plex - https://hotio.dev/containers/plex/
  # Also please read the extra info => https://trash-guides.info/Hardlinks/How-to-setup-for/Synology/#appdata
  plex:
    container_name: plex
    image: ghcr.io/hotio/plex
    restart: unless-stopped
    logging:
      driver: json-file
      options:
        max-file: ${DOCKERLOGGING_MAXFILE}
        max-size: ${DOCKERLOGGING_MAXSIZE}
    labels:
      - org.hotio.pullio.update=${PULLIO_UPDATE}
      - org.hotio.pullio.notify=${PULLIO_NOTIFY}
      - org.hotio.pullio.discord.webhook=${PULLIO_DISCORD_WEBHOOK}
    ports:
      - 32400:32400
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
      - UMASK=002
      - PLEX_CLAIM_TOKEN=${PLEX_CLAIM_TOKEN}
      - PLEX_ADVERTISE_URL=${PLEX_ADVERTISE_URL}
      - PLEX_NO_AUTH_NETWORKS=
      - PLEX_BETA_INSTALL=${PLEX_BETA_INSTALL}
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ${DOCKERCONFDIR}/plex:/config:rw
      - ${DOCKERSTORAGEDIR}/media:/data/media:rw

  # qbittorrent - https://hotio.dev/containers/qbittorrent
  qbittorrent:
    container_name: qbittorrent
    image: hotio/qbittorrent:legacy
    restart: unless-stopped
    logging:
      driver: json-file
      options:
        max-file: ${DOCKERLOGGING_MAXFILE}
        max-size: ${DOCKERLOGGING_MAXSIZE}
    labels:
      - org.hotio.pullio.update=${PULLIO_UPDATE}
      - org.hotio.pullio.notify=${PULLIO_NOTIFY}
      - org.hotio.pullio.discord.webhook=${PULLIO_DISCORD_WEBHOOK}
    ports:
      - ${QBITTORRENT_WEBUI_PORT}:${QBITTORRENT_WEBUI_PORT}
      - ${QBITTORRENT_PRIVOXY_PORT}:${QBITTORRENT_PRIVOXY_PORT}
    cap_add:
      - NET_ADMIN
    devices:                              # Optional, uncomment if you use VPN
      - /dev/net/tun:/dev/net/tun         # Optional, uncomment if you use VPN
    sysctls:
      - net.ipv4.conf.all.src_valid_mark=1
      - net.ipv6.conf.all.disable_ipv6=1
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
      - UMASK=022
      - VPN_ENABLED=${VPN_ENABLED}
      - VPN_LAN_NETWORK=${LAN_NETWORK}
      - VPN_CONF=wg0
      - PRIVOXY_ENABLED=${QBITTORRENT_ENABLE_PRIVOXY}
    dns:
      - 1.1.1.1
      - 8.8.8.8
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ${DOCKERCONFDIR}/qbittorrent:/config:rw
      - ${DOCKERSTORAGEDIR}/torrents:/data/torrents:rw

  # tautulli - https://hotio.dev/containers/tautulli
  tautulli:
    container_name: tautulli
    image: ghcr.io/hotio/tautulli
    restart: unless-stopped
    logging:
      driver: json-file
      options:
        max-file: ${DOCKERLOGGING_MAXFILE}
        max-size: ${DOCKERLOGGING_MAXSIZE}
    labels:
      - org.hotio.pullio.update=${PULLIO_UPDATE}
    ports:
      - 8181:8181
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - UMASK=002
      - TZ=${TZ}
      - WEBUI_PORTS=8181/tcp,8181/udp
    volumes:
      - ${DOCKERCONFDIR}/tautulli:/config

you’ll need an accompanying .env file for any of the ${ } values, and a little bit of extra work if you do want to use a VPN for your torrent client (recommended). the TRaSH guide and hotio.dev docs for the qbittorent container linked below were very helpful in sorting all of that out. The TRaSH guide has good base versions for both files.

i also created some scheduled tasks. one runs docker-compose up -d on boot, so whenever my NAS restarts, these services will too. the other scheduled task runs pullio every weekend to keep these containers updated.

in the future, i think i’m going to play around with self-hosting a discord server where i can send container updates / notifications to. potentially integrate with slash commands to add content to my library from anywhere, not necessarily just through the webui when connected to my home network. knowing me, i probably won’t get to that for many months… but someday i will 😁

resources

huge shoutout to these links which really helped me sort it out along the way:


Loading comments...
Back to top