Using OpenMediaVault to build a NAS that runs Plex, CouchPotato & SickRage with a safe Transmission downloader behind a PIA VPN.
In this post I’m going to explain how I turned my NAS server into a automatically movie and tv show downloading Plex streamer, downloading everything through a safe Private Internet Access VPN.
Let’s start with the hardware.
Hardware is important, especially when using Plex to stream to multiple clients. Your CPU needs to be able to transcode several (equal to number of clients) streams at a time.
Here’s what I used.
- 4GB DDR3 RAM
- MSI H81I
- Samsung 840 EVO 120GB SSD
- WD Red 3TB NAS HDD
As OS I’ll be using OpenMediaVault. For those of you who already know FreeNAS, this is basically the same but running on a version of Debian instead of FreeBSD.
I used OMV because I only have 1 hard drive, FreeNAS is designed to work with ZFS for which you should use multiple drives.
Since I only have 1 drive, I won’t be going into backups to much, just know it’s perfectly possible with OMV.
OMV is basically a web interface for your server, allowing you to control all sorts of settings and install plugins (packages). The most part of these plugins install without any hassle, however getting some advanced plugins up and running stable can require some extra effort.
To get the full package of plugins in OMV you will need to install OMV Extras. This is a seperate repo containing a lot of plugins, including CouchPotato, SickRage and VirtualBox.
Follow the steps here to install: http://forums.openmediavault.org/index.php/Thread/5549-OMV-Extras-org-Plugin/
The CouchPotato Plugin is pretty easy to install. Just install the plugin and enable it in the settings.
I personally prefer SickRage over SickBeard so that’s what I’m going to install, you can use SickBeard if you want.
The proper SickRage repo has moved however and has not been changed in the OMV Plugin. So you will need to add a new Fork using this repo: https://github.com/SickRage/SickRage.git
After you do that, select the new repo, use the master branch and enable the plugin. Setting up SickRage is not something I’m going to explain here.
To download our torrents I’m going to set up a VirtualBox virtual machine. Why do the extra effort? Simply because running a VPN on my main machine can interfere with the remote accessibility of my other services (mainly Plex).
You could set up some advanced routing, however I’m just going for a VM.
Install the Virtualbox plugin and access phpVirtualbox.
Create a new VM with a bridged network port, say 512MB ram, 2GB HDD and install Debian with only SSH enabled.
To enable shared folders we need to install Guest Additions. Follow these steps.
Installing Guest Additions
apt-get install build-essential module-assistant
sudo apt-get install --reinstall linux-image-$(uname -r)
mkdir -p /mnt/disk
mount -o loop /usr/share/virtualbox/VBoxGuestAdditions.iso /mnt/disk/
If this gives you an error, try this method: http://virtualboxes.org/doc/installing-guest-additions-on-debian/
Create a Auto Mount shared folder in phpVirtualBox. Reboot your VM and you should find /media/sf_Foldername.
To give Transmission permission to it later, do this:
usermod -a -G vboxsf debian-transmission
Of course you need to install Transmission first.
Install Transmission behind a PIA VPN
To set up Transmission to start only when connected to a VPN, use the guide here: http://www.htpcguides.com/remote-access-transmission-torrent-behind-vpn-linux/
I highly recommend using Private Internet Access.
Please do not use upstart, but use /etc/rc.local for stability purposes.