Home | Plex Infrastructure

Here is where I go over the front and backend of how my Plex ecosystem works. If I ever die, someone should be able to follow these instructions to keep Plex running for my users.

Docker Containers

service host ip hostname container name
Plex 192.168.1.181 plex01 plex
SABnzbd 192.168.1.162 Docker01 sabnzbd
Sonarr 192.168.1.162 Docker01 sonarr
Radarr 192.168.1.162 Docker01 radarr
Deluge 192.168.1.162 Docker01 deluge
Tautulli 192.168.1.162 Docker01 tautulli

Services

Each of the services listed above are Docker containers running on their respected hosts. Plex runs on a host of its own since it is more resource heavy than the others. Most of those services uses a volume mounted on the host. That volume is being served by my Drobo, which I will have a different document detailing the Drobo itself.

Aside from the Plex container, the remaining services all live on one Docker server and use docker-compose to spin them up. You can find my compose file in my private git repo. I won't go over the compose file here, but will give some breakdown of each service below.

Plex

URL: http://raph.odrallag.com:32400/web/index.html

Docker-hub: https://hub.docker.com/r/plexinc/pms-docker/

This is the front end for Plex itself. It serves up it's own WebUI which you can reach at http://raph.odrallag.com:32400/web/index.html. It also acts as the endpoint for Plex (https://www.plex.tv/) to serve up content
for users.

Docker Breakdown

If you ssh into the plex sever and navigate to /home/plex/dockerconfigs you will find a plex.sh script which contains the docker run command used to spin up the Plex container. You will find all the port redirects and mounted volumes it uses. The mounted volumes it is using are:

Local Dir Container Dir Description
/home/plex/dockerconfigs/config /config This contains all the Plex configurations and logs. This directory is huge. Gigabytes worth of storage.
/home/plex/dockerconfigs/transcode /transcode A transient directory used when a video needs host transcoding in order to play.
/home/plex/dockerconfigs/drobomount /media/freshy/plraphex The root directory of where all shared content is.

If you ever need to restart the docker service simply run docker restart plex.

If you ever need to update the service execute the 'plex.sh' script found in the /home/plex/dockerconfigs folder. Just running sh /home/plex/dockerconfigs/plex.sh should do it for you.

SABnzbd

URL: https://sab.odrallag.com/

Docker-hub: https://hub.docker.com/r/linuxserver/sabnzbd

SABnzbd is an NZBD downloading service. Information on how this is being utilized can be found in the Automated Downloads section of this wiki.

Local Dir Container Dir Description
/etc/localtime /etc/localtime:ro Set up local time
/home/raph/dockerRaph/sabnzbd/config /config All the sabnzbd config files
/home/raph/dockerRaph/sabnzbd/incompleteDownloads /incomplete-downloads Transient folder for incomplete downloads
/home/raph/dockerRaph/drobomount/Completed /downloads Transient folder of completed downloads

Sonarr

URL: https://sonarr.odrallag.com

Docker-hub: https://hub.docker.com/r/linuxserver/sonarr

Sonarr is an orchestration service used to maintain and download TV shows. This service has hooks with different indexers, NZBGeek and SimplyNZBs. Information on how to use this can be found in the Automated Downloads section of this wiki.

Local Dir Container Dir Description
/etc/localtime /etc/localtime:ro Set up local time
/home/raph/dockerRaph/sonarr/config /config All the sonarr config files
/home/raph/dockerRaph/drobomount/Completed /downloads Transient folder of completed downloads
/home/raph/dockerRaph/drobomount/Shows /tv Main folder of where the TV shows are located

Radarr

URL: https://radarr.odrallag.com

Docker-hub: https://hub.docker.com/r/linuxserver/radarr

Radarr is an orchestration service used to maintain and download movies. This service has hooks with different indexers, NZBGeek and SimplyNZBs. Information on how to use this can be found in the Automated Downloadssection of this wiki.

Local Dir Container Dir Description
/etc/localtime /etc/localtime:ro Set up local time
/home/raph/dockerRaph/radarr/config /config All the radarr config files
/home/raph/dockerRaph/drobomount/Completed /downloads Transient folder of completed downloads
/home/raph/dockerRaph/drobomount/Movies /movies Main folder of where the movies are located

Deluge

URL: https://deluge.odrallag.com

Docker-hub: https://hub.docker.com/r/linuxserver/deluge

Deluge is a torrent download service with a front end Web-UI. Information on how to use this can be found in the Torrent Downloads section of this wiki. This is also configured to run through my Private Internet Access VPN as a proxy for all the downloads to mask my traffic coming through this container.

Local Dir Container Dir Description
/etc/localtime /etc/localtime:ro Set up local time
/home/raph/dockerRaph/deluge/config /config All the deluge config files
/home/raph/dockerRaph/deluge/incomplete /downloads/downloading Transient folder for incomplete downloads
/home/raph/dockerRaph/drobomount/Completed /downloads/completed Transient folder of completed downloads

Tautulli

URL: https://plexpy.odrallag.com

Docker-hub: https://hub.docker.com/r/shiggins8/tautulli

Tautulli tracks and logs all of the Plex traffic. Keeping track of when users are watching, finished watching, pausing, and everything. Including keeping logs to draw charts and graphs for easy visualization of your data. This service has hooks with a discord bot that is reporting to two different discord servers. Newly added movies/shows are being notified to the Odrallag Discord server and watching/watched monitoring are being notified to my own private Gado Discord server.

Local Dir Container Dir Description
/etc/localtime /etc/localtime:ro Set up local time
/home/raph/dockerRaph/plexpy/config /config All the Tautulli config files
/home/raph/dockerRaph/plexpy/plexlogs /logs All the Tautulli log files

Orchestration

Now that you have a bit of an idea of what each service does, I'll walk you through what each of them are doing in relation to one another.

Automated Downloads

So let's say a user texts me and asks, "Hey Raph, could you download Moana?"
Awesome, piece of cake. For one, that's a (fairly) recent and popular movie. Older, less popular movies are a bit harder to find and I go over that in the Torrent Downloads section of this page. So what I would do is use my Radarr (Sonarr for TV shows) service to orchestrate my download. I go to https://radarr.odrallag.com (https://sonarr.odrallag.com for TV Shows) and log in. Login details can be found in my super secret vault that Phan has access to if you need it. Once logged in, in the upper left, there is a button: + Movie (+Series for TV Shows)

Add Movie

Click that then type in the name of the movie you want to download. The search should start auto search each letter you type. Once you locate your movie, on the bottom right of the movie listing there are a few icons.

Add Search

Clicking the plus icon will just add it to your list of wanted movies. Clicking on the magnifying glass will add it to your list of wanted movies and do a search for the movie at the same time. The last one button you should ignore. Don't use that button, that will disable searching for that movie title ever again. As for the other setting found just to the left of those three button, keeping the defaults should be just fine. It should read:

For TV Shows I typically update it a bit so that I don't try to download 9 seasons of a show all at once. That gets annoying. So I typically have it just download the first seasons. So my defaults would read something like:

So what is happening here on the backend of things are a couple of different actions.

Awesome, so the new movie/show is now downloaded. Next we have Tautulli (https://plexpy.odrallag.com/home) monitoring Plex for newly added movies and TV Shows. When it see's that a new movie has been added it will send a Discord notification to the Odrallag Discord Server.

Torrent Downloads

So what happens when the automated downloads can't find a certain TV show or Movie? Or what happens if the NZB that it downloads keeps failing during the unpacking and we need to download something manually? That's where I fail back to manual downloads using torrents.

So what I would do is search for a torrent, typically I use https://rarbg.to/torrents.php or https://thepiratebay.org/ and do my searches there. Once I find the torrent I want (usually the one with the most seeders) I would start the process of downloading it.

Magnet

Add

URL

This part is a bit weird. So if the movie/show you are download has been added to Radarr/Sonarr you might be able to see the download in the Activity section of Radarr/Sonarr. Even though it's there, it actually won't do the rest of the orchestration. So I have to do those steps a bit manually. Well to a certain point, then Radarr/Sonarr can take care of the rest. So let's say the download completes. When the download completes you can again find the files in the same place as before:

Once it shows up there, you might have to give it a bit of time first. It needs to move the files from the local drive space to the mounted volume. So when you check on that folder you might still see the file size slowly increase because the copy might take some time. So give it a little time before executing the next couple steps.

Okay, sweet. So the file has finally moved over. Here is what I have to do manually. Steps are a little different for movies than it is for TV Shows.

Movie Downloads

menu

menu

menu

TV Downloads

menu

menu

menu