Since I receive more and more questions from people at work, or people I know personally about my home networking setup, I decided to also write an article on my docker environment.
Docker is a tool that allows you to run applications inside containers. A container contains beside a specific application, all parts necessary to make the application function. So docker containers can be exchanged with a guaranteed working environment, no matter the configuration and setup of the host machine.
Docker containers are different from virtual machines in that they can access and make use of underlying features of the host OS. A virtual machine, as the name implies, has access to the hardware of the host machine, but contains a complete virtualised environment of a specific OS for instance. However for the kind of tools I use, docker is more than sufficient.
Stacks
I use two stacks that are configured with docker-compose. These two stacks are designed around a common theme between the containers. So I have a media stack and a tools stack.
Tools Docker stack
The tools stack consists of the following applications:
- Pi-hole: this is a network-wide ad blocking solution. Once running, you can configure the DNS on your devices, or centrally through your router, and it will sinkhole ads, malicious websites, etc.
- Heimdall: Heimdall is an application dashboard. It allows you to create links to all the different services you might be running inside your network, or even link to online platforms.
- Uptime Kuma: A self-hosted monitoring tool for your network devices, services, etc.
- Syncthing: This is a file synchronisation program, much like Dropbox, Google Drive, etc. which allows you to sync folders between devices. I use it to auto-sync/backup certain data from different machines.
Here’s the source code for the docker-compose.yaml file.
version: "3"
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
ports:
- "53:53/tcp"
- "53:53/udp"
- "67:67/udp"
- "80:80/tcp"
environment:
TZ: ${TZ}
volumes:
- '/usr/local/share/pihole/etc-pihole/:/etc/pihole/'
- '/usr/local/share/pihole/etc-dnsmasq.d/:/etc/dnsmasq.d/'
cap_add:
- NET_ADMIN
restart: unless-stopped
heimdall:
container_name: heimdall
image: lscr.io/linuxserver/heimdall
ports:
- 8080:80
environment:
TZ: ${TZ}
volumes:
- '/home/pi/docker/heimdall:/config'
restart: unless-stopped
uptime-kuma:
container_name: uptime-kuma
image: louislam/uptime-kuma:1
ports:
- "3001:3001"
volumes:
- uptime-kuma:/app/data
restart: always
security_opt:
- no-new-privileges:true
syncthing:
container_name: syncthing
image: syncthing/syncthing
ports:
- 8384:8384
- 22000:22000/tcp
- 22000:22000/udp
environment:
- PUID=1000
- PGID=1000
volumes:
- syncthing:/var/syncthing
- /mnt/downloads:/backups
restart: unless-stopped
There’s one tool / application not listed or part of this docker-compose file and that’s Portainer. It’s a web GUI to manage your docker containers.
Media Docker stack
The media docker stack consists of media-related applications. The docker-compose.yaml is also available on Github. Please note that I’m referencing /mnt
folders in most of these containers. These are mounted NAS locations where I store my movie and tv-series collection.
- Radarr: This tool is a collection manager for Usenet/BitTorrent users. It can monitor RSS feeds for discovering new movies and will connect to clients and indexers to grab them. You can also configure monitoring of existing movies within your library and fetch a higher quality source if available on the network.
- Sonarr: Sonarr is actually more or less the same tool as Radarr, except it’s for series instead of movies.
- Overseerr: Overseerr is what more or less ties Radarr, Sonarr together. It is a media discovery tool and will instruct Radarr or Sonarr to fetch new movies or series when you discover them.
- Transmission: A bitTorrent client which is instructed by Radarr or Sonarr to download a specific movie or series.
- Plex: Requires no introduction as it’s one of the most popular media servers available
---
version: "3"
services:
radarr:
image: linuxserver/radarr
container_name: radarr
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Brussels
volumes:
- /mnt/movies:/movies
- /mnt/downloads:/downloads
ports:
- 7878:7878
restart: unless-stopped
sonarr:
image: linuxserver/sonarr
container_name: sonarr
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Brussels
volumes:
- /mnt/tvshows:/tvshows
- /mnt/downloads:/downloads
ports:
- 8989:8989
restart: unless-stopped
overseerr:
image: sctx/overseerr:latest
container_name: overseerr
environment:
- TZ=Europe/Brussels
ports:
- 5055:5055
volumes:
- /home/pi/docker/overseerr:/app/config
restart: unless-stopped
transmission:
image: linuxserver/transmission
container_name: transmission
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Brussels
volumes:
- /mnt/downloads:/downloads
ports:
- 9091:9091
- 51413:51413
- 51413:51413/udp
restart: unless-stopped
plex:
image: linuxserver/plex
container_name: plex
network_mode: host
environment:
- PUID=1000
- PGID=1001
- VERSION=docker
volumes:
- /mnt/tvshows:/tvshows
- /mnt/movies:/movies
- /mnt/music:/music
restart: unless-stopped
How does it work?
It’s actually quite straightforward once everything is setup. Your search starts in Overseerr. Once you found the movie or tv show you’re interested in, you click the request button. A dialog will ask you for the location and/or which quality profile. I created a custom profile (UHD/FHD) in both Radarr and Sonarr as I’m only interested in 4K or 1080p content.
That’s it! Overseerr instructs either Radarr or Sonarr to fetch the data required to download the requested media. Once found in the assigned quality profile, Radarr or Sonarr sends a request to Transmission to download and monitors, since both are connected, the process. Once the media is downloaded, Sonarr or Radarr will in turn send a request to Plex to re-index since new media should be added.
Planning for upcoming movies / tv shows
This setup will not only list or monitor existing movies but you can also discover upcoming movies based on their IMDB code for instance. This allows you to add movies not yet available and it will queue and monitor configured sources. Once available, again in the requested quality profile, these will be automatically downloaded, renamed, stored on my NAS and made available through Plex.
Hardware
You might expect that you need to run some beefy hardware solution for all these containers but in fact I run all of these on a Raspberry Pi 3B+ without generating too much load on the system.
Dashboards
Here are some screenshots of the Heimdall, Uptime Kuma, Portainer and Pi-hole dashboards.