So you obviously found your way to this page looking for a way to setup a fully automated Home theater PC that takes care of all your streaming Needs via Plex. The setup is not too difficult to do nor understand but requires several steps to get up and going. I will cover the entire process from start to finish, taking into consideration Torrent Indexers & downloading. I will not be covering Newsgroups or Usenet, in this tutorial as I personally feel the recurring costs outweigh the benefits opposed to a single payment for memberships into private trackers. The amount of public trackers available should provide 95% of all content you could want but it is nice to have a couple private trackers with large databases to supplement.

Getting Started

So lets get started by accessing your Synology Server Desktop (If you don’t have Synology Installed refer to my tutorial here)

  • Open Package Center
  • Select “All Packages” in the Left hand pane

In the search box near the top of the window, search and “click Install” for the following Applications:

  • Docker
  • Mono
  • Plex
  • Text Editor

Now with all of those applications installed, lets get our directories created and in place. Close the package manager and open up the File Station and create the following Shared folders with sub-directories in the Root: 

  • radarr  -> config
  • sonarr -> config
  • lidarr -> config
  • deluge -> config -> openvpn
  • jackett -> config
  • tun

TV shows

so in the shared directory “docker” you should have 6 sub directories (radarr, sonarr, lidarr, deluge, jacket, tun) and in all of those directories with the exception of “tun” you should have another directory “config“. with an additional “openvpn” sub-directory in /docker/deluge/config in Lets move forward to deluge.

Setting up Deluge with OpenVPN

So the first utility we are going to tackle is Deluge, we will be putting allot of configuration into this as this will be the utility downloading the media, and with that we want to hide our IP addresses to ensure our ISP Doesn’t disconnect our services. While some VPN’s have small utilities that run in the background, these are far more risky then just setting up OpenVPN which will keep our connections private at all times with no additional steps after installation.

Lets start by clicking on menu drop-down in the top left corner

Now lets open up “Text Editor” and paste the following: 


# Create the necessary file structure for /dev/net/tun
if ( [ ! -c /dev/net/tun ] ); then
  if ( [ ! -d /dev/net ] ); then
    mkdir -m 755 /dev/net
  mknod /dev/net/tun c 10 200

# Load the tun module if not already loaded
if ( !(lsmod | grep -q "^tun\s") ); then
  insmod /lib/modules/tun.ko

# Load iptables mangle is not already loaded
if ( !(lsmod |grep -q "^iptable_mangle\s") ); then
  insmod /lib/modules/iptable_mangle.ko

Special thanks to Tom The Great for writing this script that allows us an automated method of starting the tun/tap drivers to enable our VPN to run from startup. This will become necessary for our Deluge install to function properly.

Now lets save the file as: to the following directory: /volume1/docker/tun/
With the file saved, we will open up the “Control Panel
Click on “Task Scheduler
Create new scheduled startup task with  Create -> Triggered Task -> User Defined Script

Task: OpenVPN Tun/Tap Adapter
User: root
Event: Boot-up
PreTask: Blank
Enabled: Checked

Task Settings TAB
Send Run Details by Email: Unchecked (Leave alone)
In the Text Box under “User-Defined Script” put in the following: /volume1/docker/tun/ (This is assuming you created the directories on volume1)

Now Lets Reboot the Synology Server

With our Synology server rebooted we are going to get a couple other things we need out of the way, so lets start by collecting the PUID & PGID.

Once again Open Control Panel
Left hand pane scroll down & look for or Search “Terminal & SNMP”
the box next to “Enable SSH Service”
login to your Synology Server via puTTy 
type: id

You should now see the info you want with your PUID (1026) & PGID (100) If your values differ, use them instead of what I have listed (The most likely case).

Now it’s time to get some information from your VPN service provider. There are several, but most of the reputable ones support “OpenVPN” login to your account and look for something similar to “OpenVPN Configuration Generator” and you want to ensure you are using “openVPN 2.3 or lower” upon generating the applicable scripts for a server that supports “Port Forwarding” you should have 3 files with .ovpn, .crt, and .pem extensions. 

Move the 3 files to your Synology server directory: /volume1/docker/deluge/config/openvpn
you can do this either by SSH with puTTy, mapping the docker shared folder on the PC you downloaded the files from, or FTP.

Installing Containers on Docker
Open docker and start downloading the images of containers we are going to need for this process, with Docker open, Click on the Registry Tab in the left hand pane and use the search bar to search for and download the following:

  • binhex/arch-delugevpn:latest
  • linuxserver/jackett:latest
  • linuxserver/sonarr:latest
  • linuxserver/radarr:amd64-latest (Only AMD Chip, Otherwise Latest)
  • linuxserver/lidarr:amd64-latest (Only AMD Chip, Otherwise Latest)

After you have downloaded all 5 images, click on the image tab and you should see everything you downloaded, and it’s corresponding size. 

We are going to start with Deluge for now, so go ahead while in the image tab, click on the binhex/arch-delugevpn image so it is highlighted, then in the top center of the screen click on “Launch

Name: Deluge
Execute container use high privilege: Checked

Click on Advanced Settings
Advanced Settings
Enable auto-restart: Checked

Volume Tab
Add the Following 2 Folder entries:
File/Folder: downloads                                  Mount Path: /downloads
File/Folder: docker/deluge/config              Mount Path:/config

Port Settings Tab
Fill in the Local Ports, do Not leave it in auto mode or your going to have a bad time! You can re-define these ports if you so choose, but if you are not familiar with proper port ranges, just follow the example below.

Environment Tab
Add the Following Variables: (Variable = Value)
TZ = America/Los_Angeles (whatever your Time Zone is)
VPN_USER = (VPN providers username you use to login)
VPN_PASS = (Password you use for your VPN Provider)
VPN_PROV = custom
OPENVPN_OPTS = inactive 3600 –ping 10 –ping-exit 60
LAN_NETWORK = Your Lan IP (CIDR Format)
UMASK= 000
DEBUG= false


Finalization of Install
Go ahead and click on “Apply“, then Click on “Next” make sure the review screen looks correct and, click finish. Ensure that Deluge is running by verifying it’s status under “Containers” Tab

You should now open a browser window and direct it to:

http://<Synology Server IP>:8112 
(Default Password for deluge is “deluge”)

Installing Jackett
Now with Deluge up & Running lets install the next configuration intensive utility and that will be Jackett. Just for some additional insight Jackett allows for API support to multiple Torrent trackers. To simplify it even more, it provides Sonarr, Radarr & Lidarr the ability to search through Multiple trackers automatically without any sort of need for manual import, furthering the automation piece.

So with Docker open let’s click on the Image Tab, Find “linuxserver/jackett:latest” select it and then click on launch and we will use the following settings:

File/Folder                                            Mount Path
/docker/jackett/config                       /config

With the Container installed and running; we can verify this by clicking on the “container” tab and verify that you see “Running” on the left hand side of the tab with an Up Time. If not, simply click on the Blue slide switch all the way to the right to start the application, and navigate in your web browser to:
http://<Synology Server IP>:9117 

Configuring Jackett
With Jackett Pulled up, lets first look to the top right of the screen, you should see “API Key” followed by a text box with what appears to be a randomly generated string. This is a crucial piece of information that will assist in making this all work.

Directly below there are some colored buttons with a green one furthest to the left titled “+ Add Indexer” lets go ahead and click on that. You will now be presented with a drop down list of available indexers (Several Private, Some Public). To the right of each tracker there will be an “+” Add button or a “Wrench” Indicating Setup Button, or both. Go through the list and pick whichever trackers you would like to add and utilize the buttons.

Once completed and you have your trackers added, your Jackett home screen should look similar to this:

As long as you feel you have enough trackers to adequately find the Movies, TV Shows, and Music you are wanting your setup here should be complete. It should be noted that you need to keep Private trackers in careful consideration, especially those with Share Ratios; but we will cover this more in depth in the following “Configuration” post.

So you have now installed 2 of the 5 Docker apps, you will just need to repeat the previous steps for Sonarr, Radarr, Lidarr, and when doing so be sure to use the following Settings:

Sonarr Settings
Execute Container using High privilege
Enable auto-restart

File/Folder                                       Mount Path
docker/Sonarr/config                      /config
downloads                                      /downloads
TV Shows                                       /TV Shows

Local Port                               Container Port
8989                                         8989
9898                                         9898

Environmental Variables
PGID                    100
PUID                     1026

Verify it is running by checking the following address:
http://<Synology Server IP>:8989

Radarr Settings
Execute Container using High privilege
Enable auto-restart

File/Folder                                       Mount Path
docker/radarr                                  /config
downloads                                      /downloads
Movies                                            /Movies

Local Port                               Container Port
7878                                         7878

Environmental Variables
PGID 100
PUID 1026

Verify it is running by checking the following address:
http://<Synology Server IP>:7878

Lidarr Settings
Execute Container using High privilege
Enable auto-restart

File/Folder                                       Mount Path
docker/lidarr                                    /config
downloads                                      /downloads
Music                                              /Music

Local Port                               Container Port
8686                                         8686
Environmental Variables
PGID                    100
PUID                     1026

Verify it is running by checking the following address:
http://<Synology Server IP>:8686

Setting up Plex
Alright now let’s back to where we started and configure the Plex app you downloaded earlier. If you don’t already have a Plex account head over to and Sign up for a free account.

After you have gotten your credentials, use the Plex shortcut in the menu drop down on the home screen. When Plex first boots up it will ask you to Sign In, go ahead and do this with the credentials you created. 

We will now be at the Server Setup, with the first Option asking us to give our Server a Name, I named mine HTPC.

Next you will be asked to “Organize Your Media” you can go ahead click on “Add Library” Towards the bottom of the page.

With “Select Type” highlighted to the left, lets select “Movies

Now click on “Browse For Media Folder” (If the option does not appear it is under the “Add Folders” subsection)

Since we are selecting where Plex will be searching for Movies, we need to go ahead and choose: /volume1/movies/

Go ahead and repeat the steps for TV Shows and Music, selecting the corresponding directories we created earlier.

Once that is done you can select the option “Done“, Keep in mind they will try to sell you a “Plex Pass” that has a price attributed to the subscription, you do not need the pass to accomplish this, It simply adds a few additional features for media playback, and feel free to add if you so choose and support, otherwise skip.

Additional Info on Naming Conventions
Plex has a particular naming convention requirement for scraping data, and while Sonarr, Radarr, and Lidarr will be renaming all the files to fit within this convention, it won’t hurt to get a quick understanding of how it works in case you find yourself manually having to add media.

Movies need to be titled exactly as they appear in The Movie DB and best to always follow with a year as several movies have the same title. So For example let’s say we want to add the movie “The Avengers“, we need to first go check out The Movie DB, then Search for “The Avengers“, as you can see we get Several Matches, 2012, 1998, 1950. Well we have the newest version so lets click on the thumbnail. We will see center screen the title as “The Avengers (2012)” so this is what we need to name our file, examp “The Avengers (2012).mkv

Note: that the file does not need to be in a separate directory, though if you choose to put it in it’s own directory with subtitles etc. The directory needs to be named the same as the file, so in this case the directory would be “The Avengers (2012)

TV Shows Are a bit different, in this case we need to look at the TVDB  for reference as to what we will be naming. So lets start off by searching for “The Goldbergs” we will get 2 options, 1 that ended in 1949, and another that’s still airing titled “The Goldbergs (2013)” So in our TV Shows Directory we want to create a Directory Called “The Goldbergs (2013)”  now if we had the first 3 seasons, we would need 3 sub directories, named Season 01, Season 02, Season 03 respectively. Lastly lets discuss the actual video file, and lets just say we have the pilot episode (1st) we would name this something such as:

goldbergs.S01E01.Pilot Episode.mp4

The Bold text has to be exactly that and must hold to that convention, the text to the right or left of the periods can be whatever you want, this file as you may have guessed will also be placed in the “Season 01” directory. 

Note: if you have season Specials they will be placed in the Season 00 directory, and labeled as text.S00EXX.More Text.mp4, you can get the specifics of how you should name each episode from The TVDB

Music scanned by Plex uses LastFM I believe to scrape Audio files, though I have found it doesn’t do all that great of a job. The encoded ID tags take priority making this a bit different than simply changing the name of the Audio file. I won’t go too much into detail on this topic, I suggest looking for a youtube vid or tutorial on how to use a free program titled MP3Tag. Keep the ID Tags to a consistent convention scheme and Plex shouldn’t have any troubles ensuring you are consistent on Artist Names Matching on every file with Album Names following suit.       

Now with everything installed, lets go ahead and bookmark all of those links, making the applications easier to access, I personally use the bookmarks bar specifically for this purpose as such:

As Sonarr, Radarr, & Lidarr are all forks of each other and the user front end is essentially the same (Lidarr has some Exceptions) we will cover the configuration in depth here

Categories: Home Server


Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *