Hello there! In this three part guide I'll be showing you, how to setup your own automated media box (server)!

I've had to make three parts mainly due to how long the post was and also it would of been a bitch to load/render (plenty of screenshots, plenty of Mb's). Trust me I'm saving your bandwidth/data this way.

So what does an Automated Media Server do? This server in particular will be able to automatically search and download any requested or scheduled content and then organise and stream that via a slick piece of kit called Plex. A one stop shop for all your media and accessible through an app found on most devices (mobile, TV, PS, FireStick ...).

Let's break it down into three main parts and go into a little more detail of how this magic works ...

Part 1 - OS - An Overview then OS and Docker Setup
Part 2 - Download - Transmission, Sonarr and the Crew
Part 3 - Media - Setting up Plex, Tautulli and Ombi


Operating System

Linux

For this guide we'll be setting everything up using a headless Linux operating system, in this case Ubuntu Server 18.04 (many other flavours available). A headless system means you won't require a monitor to view or access the server (only for the initial install or if you're locked out). This saves up system resources by not loading a GUI environment and also gives you an opportunity to 'stash' the server away if you've building this using a desktop, laptop or Raspberry Pi. This may also need to be powered on 24/7 so with it being LAN'ed in and placed out the way is always a plus.

In regards to hardware specs for this setup, I'd recommend anything with at least 8GB RAM and plenty of space for storage. The more CPU and RAM the better. Like I mentioned before, try and install a headless OS on whatever machine to save on resources. This could become a bit of a rabbit hole so check out the official Plex Media Server system requirements here.

To save on time and (my) energy, I won't be documenting the OS setup side. You can check out one of my previous posts for a Raspberry Pi setup guide or how to install Bash (Ubuntu) on Windows 10 here.

Docker and Portainer

Attempting to manage all these components on a Linux machine can be quite a pain but to combat this we'll be using Docker to install and manage each piece. To quote someone else:

Docker is a tool  designed to make it easier to create, deploy, and run applications by  using containers. Containers allow a developer to package up an  application with all of the parts it needs, such as libraries and other  dependencies, and ship it all out as one package.

It's sort of virtualization but for software, not operating systems. Docker uses the same engine (OS - Linux) in any instance so it can easily be installed and moved onto any other Docker setup. Check out this 5 minute video below to learn more (and much better explained).

Alongside Docker we'll install Portainer (a container) which will provide a Web GUI to manage and view all of our Docker stuff, handy as fuck.

Portainer Site

Docker Site


Downloading

Transmission

To download content we'll need a BitTorrent download client such as Transmission. In this guide we will go over how to setup Transmission with OpenVPN to download securely over a VPN connection (VPN provider is required such as TorGuard, PIA etc. I would not proceed without one.).

Transmission Site

Sonarr/Radarr/Lidarr/LazyLibrarian

These platforms will automatically manage, search for TV (Sonarr), Film (Radarr), Music (Lidarr) and eBooks (LazyLibrarian). Once the content has been searched and added, they will first check which files are missing, search BitTorrent sites (indexes via Jackett) for the relevant/requested files and then send the torrent (Magnet link) to Transmission for download. Each time a new episode or film is available, it is automatically searched and downloaded.

Sonarr / Radarr / Lidarr / LazyLibrarian Site

Jackett

This handy app works alongside Sonarr/Radarr... to handle, manage and search BitTorrent indexes. When a show, film etc is requested, it'll use Jackett to search the predefined setup torrent sites (painfully manual process) for the torrent file. With Jackett you'll be able to add more indexes meaning more results!

Jackett Site


Media

Plex Media Server

Now we've got all this content, we'll need to manage and host it! Here is where Plex comes in. Another lazy copy and paste:

Plex Media Server (sometimes called PMS or PMS Software) is the back-end media server component of Plex. It organizes audio and visual content from personal media libraries and streams it to their player counterparts, either on the  same machine, the same local area network, or over the Internet.

Plex does an ace job at hosting and streaming your content also organising media to include extra data (metadata) such as trailers, ratings and reviews and more. Another bonus is you'll find a Plex app on almost any device such as Android, iOS, Xbox/PS and Smart TVS as well access via the Web UI.

Plex Site

Tautulli

Once you've have this awesome media server setup and Plex shared out to friends and family, you'll need something to keep an eye on your Plex stats. Introducing Tautulli (another Ctrl C + P):

Tautulli is a 3rd party application that you can run alongside your Plex Media Server to monitor activity and track various statistics. Most importantly, these statistics include what has been watched, who watched it, when and where they watched it, and how it was watched. The only thing missing is "why they watched it", but who am I to question your 42 plays of Frozen. All statistics are presented in a nice and clean interface with many tables and graphs, which makes it easy to brag about your server to everyone else.

Tautulli Site

Ombi

Ombi is a self-hosted web application that automatically gives your  shared Plex users the ability to request content by themselves!  Ombi can be linked to multiple TV Show, Movie and Music DVR tools to create a seamless end-to-end experience for your users.

With Ombi you can set yourself or trusted users 'pre-approval' access meaning it will automatically download anything requested. This should essentially be the last and only portal you'll need to access to request and download content once you've setup the server.

Ombi Site


Let's Get Started

So after reading all that are you still interested? Good stuff! Once you're ready to go on your Linux box, let's start with Docker ...

Docker and Portainer

To install and manage all these bits manually can potentially be a pain in the arse. Our solution is to use Docker to setup each part in a container and use Portainer as a lazy way out of command lining shit. First we'll need Docker ... Assuming you are ready to go on your Linux box, run the following commands:

It's always good practice to update your existing packages first:

sudo apt update

Next a few prerequisites:

sudo apt install apt-transport-https ca-certificates curl software-properties-common

Now add the GPG key for the official Docker repository to your system:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

Add the Docker repository to APT sources:

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"

Next, update the package database with the Docker packages from the newly added repository:

sudo apt update

Finally we can install Docker:

sudo apt install docker-ce

Lets check everything has installed correctly:

sudo systemctl status docker

Good stuff! How we've got Docker installed, lets copy and paste one last command to allow us to run docker commands with sudo ...

sudo usermod -aG docker ${USER}

Cool beans. Last step, run these next two commands to pull and install Portainer:

docker volume create portainer_data

docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer --restart unless-stopped

Magic! Now you should be able to access Portainer by going to http://YourIpAddress:9000. On your initial visit it will ask to setup an account and then finally select 'Local Environment' to complete the setup!

The only container in there will be Portainer itself but we've got plenty more to add in the next upcoming post!

Have a look around and get familiar with Docker/Portainer but if you're itching for some more action, make sure you check out the Docker Hub for tons of other containers. If your ready to crack on, check out Part 2 here!

P.S I've included some optional extras below if you're interested in more stats and features!


Optional: Glances Monitoring

As this setup and most of my others are 'headless' (no GUI, Desktop), it's always a bit tricky to keep tabs on performance when there's no obvious windows or dials to view on a screen. You could run commands to check on things like disk space etc but this is where Glances trumps supreme. Essentially it provides a one screen view of all your key stats either via your terminal or to a Web UI.

To install Glances, visit this site and scroll down to find the Glances Auto Install Script commands (and plenty more details).

$ curl -L https://bit.ly/glances | /bin/bash

or

$ wget -O- https://bit.ly/glances | /bin/bash

Once installed you can test either by running glances to view in your terminal or glances -w to start the web server, it then should give you an IP:Port to visit http://SERVER_IP:61208.

If you want to keep the web server option enable, you can amend the glances.service file ...

sudo nano /etc/systemd/system/glances.service

[Unit]
Description=GlancesAfter=network.target

[Service]
ExecStart=/usr/local/bin/glances -w
Restart=on-abort

[Install]
WantedBy=multi-user.target

Once saved, run the following to enable and then start the Glances service.

sudo systemctl enable glances.service
sudo systemctl start glances.service

Optional: Pushover Notification

Other optional extra should you choose is Pushover! Pushover is a service to receive instant push notifications on your phone or tablet from a variety of sources. In our case, we can use it to get notifications for when a torrent has been added to Transmission or when someone starts streaming a film for example.

Pushover can be setup and configured on nearly everything including Plex, Ombi, Transmission, Sonarr etc. For now we haven't got these bits setup so head over to Pushover and create an account and then pop back later.

...

Did you Remember to come back after everything is all setup? Sweet and congrats. It would take me too much time to go through each and every instance you can enable this in but here is the premise.

Once logged into Pushover you'll need two things. One is always constant and that's your User Key, found in the top right of your account screen.

The other requires you to create an Application Key for each service (Plex, Sonarr, Ombi...). To create a new Application Key scroll to the bottom and next to Your Applications click on Create an Application/API Token. In the next window, give it a name and icon (if you can be arsed) and then click Create. Boom, now we have our API Token/Key.

You'll find the Pushover setting/configuration in most of the services under something along the lines of Settings -> Notification. Once there, all you need is your User Key and the Application Token/Key for that specific setup and done. Most setups will allow a 'Test Message', give it a try.

Tautulli
Sonarr/Radarr...
Ombi