Skip to content
PhysK edited this page Jan 22, 2020 · 1 revision

There's a ton of moving parts involved in a automated media server system. You can think of Plexguide as an easy-to-assemble lego set with all the pieces already sourced in the box. Many of the more complex pieces are already packaged and configured to work together with the help of Docker and Ansible.

Bitorrent, Usenet, Indexers and Trackers

The journey begins on the high seas of BitTorrent and Usenet. To sail these waters, one requires the guidance of Torrent Tracker sites and Usenet Indexers. You can think of these as a digital treasure map (but more like a phonebook directory). They help you find content for Plex by pointing out the location of the files you request. Trackers and indexers can be public, semi-public (as in pay-to-play) and private (invite required). Private trackers and indexers will get net the best content, the fastest download speeds and the best selection. Note that if you go with Torrents, you'll need a bigger hard drive to seed files. Also note there is a special place in hell for people who don't seed. If you go with Usenet, know that many older files (and many new ones) will be blown out of the water by the DMCA Royal Navy before you can download the file, so gaining access to private indexers or having multiple indexers and block accounts will be necessary. You can either pick using torrents or usenet, but I recommend both— Torrents for older and rare files, and Usenet for fast access to recent files.

NZBHydra & Jackett

These are helper programs that aggregate all your Usenet indexers (NZBhydra) and Torrent trackers (Jackett) together in one place. This is optional, as Radarr/Sonarr/Lidarr can (usually) be configured to access your indexers and torrent trackers directly. If you have many indexers/trackers or private ones, I recommend going with this route.

These programs are optional and many features available here are already packed into Radarr and Sonarr.

Media Managers (Radarr, Sonarr & Lidarr)

Radarr is for Movies, Sonarr is for TV and Lidarr is for Music. These programs are your vigilant crewmates on lookout for new movies, shows and albums. They automatically check the RSS feeds from your indexers and trackers (directly, or indirectly via nzbhydra/jackett) and tell NZBget/Deluge to snatch the file immediately if it matches what you request it to. They can also search for older releases. You can configure these to look for content based on lists, so you don't have to import content manually. Note that these programs can also see what's in UnionFS (a filesystem) and will not download media you've already plundered). More on that later.

Lidarr is still in the alpha stage of devlopment, so it may contain bugs!

Download Clients (NZBget & Deluge)

NZBget handles Usenet downloads, Deluge handles torrent downloads. They assemble the file together in temporary directories, perform a integrity check based on file hashes and repairs them if necessary.

If you are using public trackers, a VPN is highly recommended.

Post Processing

Once the files are finished downloading, they are moved (or copied for torrent files) into "completed" directories, which Radarr/Sonarr/Lidarr then processes by stripping out .nfo's, samples and extras and renaming the file in a way that Plex can find the correct metadata. After processing, the files are then packaged into an appropriately named folder and placed onto a loading dock (/mnt/move*) where it awaits shipment to Google Drive

You can easily upload a pre-existing library on local disk (or network mount) to google drive by manually moving the file to /mnt/move/Movies.

RClone & move.sh

Rclone is a utility program that syncs files to the cloud. You can think of rclone as a truck that arrives every 8 minutes, driven by a systemd daemon called move.sh that delivers your files to the Google Drive warehouse for long-term storage. The workers at Google don't exactly have the best reputation when it comes to respecting your privacy, so you may wish to obfuscate your booty (get it?) by encrypting your files before it's whisked away to the great cloud in the sky.

PlexDrive

Google doesn't like it when you spam it with requests every time Plex issues a library rescan, and will issue a 24 hour API ban if you hit their servers too hard. To mitigate this issue, you'll need to mount your Google Drive with PlexDrive. PlexDrive caches the metadata of your gdrive (filenames, locations) into a database, then presents that information as a pseudo directory called a fuse mount. Now when Plex scans this directory, it only issues new api requests to google for files that have been recently changed, instead of every single file of your entire library.

UnionFS

There's a caveat though, Plex doesn't actually scan the pseudo-directory. Plexdrive is actually mounted onto a union filesystem called UnionFS which combines the contents of what's in the loading dock awaiting upload (/mnt/move/) and the contents of PlexDrive into one cohesive directory (/mnt/unionfs). Note that Radarr/Sonarr/Lidarr can read from this directory so it won't download duplicates. The advantage to having UnionFS combine these two directories is the ability to watch files right after they are done downloading, instead of waiting for it to be uploaded.

Plex Media Server

From there, Plex scans the library from UnionFS where it's indexed and presented with metadata like IMDB ratings, movie posters and descriptions in a presentable format. By default, Plex works on port 32400, not port 80/443 like most websites.

Traefik Reverse Proxy

That's an ugly port number though, so we'll present it in a nicer way on port 443 (https) with your own domain name with Traefik. Traefik is a reverse proxy that routes traffic from various TCP ports into port 443 and applies SSL encryption so traffic can't be sniffed en route to your users. Note that all the other programs also have their traffic routed through Traefik, I just haven't shown it on the diagram for simplicity's sake.

Ombi

Finally, users can then browse to your website and watch. If they'd like to make a request for another movie or show, they can access Ombi, which is basically a front-end middleman that passes on media requests to Radarr or Sonarr. The advantage is that you won't have to give your users admin access to the rest of your configs and you can deny/allow requests if you want. It can also send all your users an email with what shows have been recently added to your Plex library.


Useful Starter Links

  1. Introduction
  2. G-Suite Signup
  3. Recommended NewsHosts
  4. Change Log

Prior Planning 101

  1. Recommended Pre-Reading
  2. Server - Storage Planning
  3. Usenet or BitTorrent
  4. PTS Editions
  5. PTS Folder Structure
  6. PTS-Repos
  7. Common Issues

Deploy & Config

PTS-Team
  1. SSH Server Access
  2. Install PTS
  3. WatchTower
  4. Remote Path Mappings

Data Transport
  1. PTS Clone
    1. Google OAuth Keys
    2. PTS Move
    3. PTS Blitz
    4. 2nd HD Option

Key Components

  1. Traefik
  2. Port Guard
  3. PTS Shield
  4. PTS Press
  5. Google Cloud - GCE
    1. Automated setup
  6. Hetzner Cloud
  7. PTS Fork
  8. Extra PTS Commands

Blitz App Info

  1. Accessing PTS Apps
  2. App Port Scheme

Tools & Services

Core Apps [Expand]
  1. Emby
  2. Jackett
  3. Jellyfin
  4. LazyLibrarian
  5. Lidarr
  6. Netdata
  7. NZBGet
  8. Ombi
  9. Plex
  10. Portainer
  11. qBittorrent
  12. Radarr
  13. Radarr4k
  14. RadarrHDR
  15. RuTorrent
  16. SABnzbd
  17. Sonarr
  18. Sonarr4k
  19. SonarrHDR
  20. Tautulli
  21. JDownloader2
Community Apps [Expand]
  1. AirSonic
  2. Bazarr
  3. Bitwarden
  4. BookSonic
  5. cAdvisor
  6. Cloud Commander
  7. Deluge
  8. DelugeVPN
  9. Dozzle
  10. Duplicati
  11. Filebrowser
  12. FlexGet
  13. Gazee
  14. Headphones
  15. Heimdall
  16. HomeAssistant
  17. jd2-openvpn
  18. Kitana
  19. Logarr
  20. MakeMKV
  21. MariaDB
  22. McMyadmin
  23. MEDUSA
  24. Mellow
  25. Miniflux
  26. Monitorr
  27. Muximux
  28. Mylar
  29. NextCloud
  30. NowShowing
  31. NZBHydra2
  32. Organizr
  33. plpp
  34. pyLoad
  35. qBittorrent
  36. QBittorrent VPN
  37. radarrsyncarr
  38. Resilio
  39. rflood-openvpn
  40. rutorrent-openvpn
  41. Shoko Anime Server
  42. SpeedTest
  43. SyncLounge
  44. Teamspeak3
  45. The Lounge
  46. Transmission
  47. Trakt.or
  48. Ubooquity
  49. Varken
  50. vnc-xfce
  51. vnstat
  52. ZeroTier

Misc Info & Articles

  1. Change Server Time
  2. Fail2Ban
  3. Custom Containers
  4. Deploying Varken, Influx, Telegraf, Grafana
  5. cloneclean commands
  6. Understanding htop
Scripts
  1. Scripting Area
    1. Auto Upload for Sonarr and Lidarr
    2. Auto Delete Log
    3. Plex Plugin DB Backup
    4. Plex fast BACKUP
    5. Delete All Unmonitored from Radarr
Clone this wiki locally