Plex, media management, and all the other fanciness
Hey all, sorry for the lack of updates in a while but life took over.
This article is a combination of a bunch of mini texts i had on my system and after seeing more and more streaming services popping up it was time to combine the all and publish it.
At some point i might add pictures to help walk you through it but in all reality it is decently straight forward.
Also: Big shout out to L34N for helping test and edit this article. It was a ton of work but it reads better and has way less errors now.
Enjoy!
Basics
This article walks you through how to install and configure the following services:
– sabnzbd
– NZBHydra2 (v 2.8.0)
– Lidarr (v .0.7.1.1381)
– Sonarr
– Radarr (v .0.2.0.1358
– LazyLibrarian
– Plex Media Server
– Tautulli
This was done on a fresh Ubuntu 18.04 install with an ip of 192.168.100.82
For storage, these are the paths i am using with a brief explanation:
– /storage/books : this will be used by LazyLibrarian after completed download in SABnzbd
– /storage/downloads
– /storage/downloads/complete
– /storage/downloads/incomplete : these will be used by SABnzbd as a temporary hold for completed and incomplete downloads before the respective services moves them to their permanent storage locations
– /storage/movies : this will be used by Radarr after completed download in SABnzbd
– /storage/music : this will be used by Lidarr after completed download in SABnzbd
– /storage/tv : this will be used by Sonarr after completed download in SABnzbd
If these are the paths that you want to use then add them with the command below. If they are not then you should add your storage now.
We should set these up by running these commands :
sudo mkdir -p /storage/books /storage/downloads /storage/movies /storage/music /storage/tv
sudo mkdir -p /storage/downloads/complete /storage/downloads/incomplete
For Usenet/newsgroup service :
Newsdemon (referral)
For Usenet/newsgroup indexing :
NZBfinder
**** The free tier will cap you at a small amount of searches per day. Be warned. ****
If you need help on these services start here:
SABnzbd
NZBHydra2
Lidarr
Sonarr
Radarr
LazyLibrarian
Plex
Tautulli
This article is Usenet / NZB based. For torrent support google is your friend.
Installing sabnzbd
Run these commands :
sudo addgroup sabnzbd
sudo adduser --system sabnzbd --ingroup sabnzbd
sudo getent group downloads || sudo groupadd downloads
sudo usermod -a -G downloads sabnzbd
sudo apt install software-properties-common unzip
sudo add-apt-repository multiverse
sudo add-apt-repository universe
sudo add-apt-repository multiverse
sudo add-apt-repository ppa:jcfp/nobetas
sudo add-apt-repository ppa:jcfp/sab-addons
sudo apt update
sudo apt-get dist-upgrade
sudo apt install sabnzbdplus python-sabyenc par2-tbb
Now we edit /etc/default/sabnzbdplus and set the required user to the user created above: USER=sabnzbd
also change “HOST=” to that machines ip (for sake of this article we will use 192.168.100.82):
HOST=192.168.100.82
set “PORT=” to 8080:
PORT=8080
Now load and start the daemon :
sudo systemctl daemon-reload
sudo systemctl start sabnzbdplus.service
Now test by going to http://192.168.100.82:8080
Configuring sabnzbd
First, make sure that the following paths are owned by sabnzbd:sabnzbd :
sudo chown -R sabnzbd:downloads /storage/downloads/incomplete
sudo chown -R sabnzbd:downloads /storage/downloads/complete
Open your browser to http://192.168.100.82:8080
This will open a quick start wizard. follow it entering this info for these windows :
– Server Details :
Input the info given to you from Newsdemon
– Completed Download Folder :
/storage/downloads/complete
– Temporary Download Folder :
/storage/downloads/incomplete
Now click the gear on the right
We are now going to add the categories by selecting the line that has the “+ Add” icon on the right:
for tv:
under Category add "tv"
under Folder/Path add "tv"
click "+Add"
for movies:
under Category add "movies"
under Folder/Path add "movies"
click "+Add"
for books:
under Category add "books"
under Folder/Path add "books"
click "+Add"
for music:
under Category add "music"
under Folder/Path add "music"
click "+Add"
for misc audio:
under Category add "audio"
under Folder/Path add "audio"
click "+Add"
Now one final setting to change
We now have to set permission to the temporary folder (the complete and incomplete paths) so that the other applications can pull files from them:
Click "Folders" on the top
under "User Folders" set "Permissions for completed downloads" to 777
Now click "Save Changes" on the bottom
At this point you have a standard SABnzbd install.
Installing NZBHydra2
Run these commands:
sudo addgroup hydra
sudo adduser --system hydra --ingroup hydra
sudo getent group downloads || sudo groupadd downloads
sudo usermod -a -G downloads hydra
sudo apt install openjdk-11-jre-headless
sudo mkdir /opt/nzbhydra2
cd /opt/nzbhydra2
sudo wget https://github.com/theotherp/nzbhydra2/releases/download/v2.8.0/nzbhydra2-2.8.0-linux.zip
sudo unzip nzbhydra2-2.8.0-linux.zip
sudo cp /opt/nzbhydra2/systemd/nzbhydra2.service /lib/systemd/system/nzbhydra2.service
sudo chown -R hydra:hydra /opt/nzbhydra2/
Now we will change the “User”, “Group”, “WorkingDirectory”, and “ExecStart” in /lib/systemd/system/nzbhydra2.service to:
User=hydra
Group=hydra
WorkingDirectory=/opt/nzbhydra2
ExecStart=/usr/bin/python /opt/nzbhydra2/nzbhydra2wrapper.py --nobrowser --datafolder /home/hydra/.nzbhydra2_data
Now we load and start the daemon:
sudo systemctl daemon-reload
sudo systemctl start nzbhydra2.service
Now test by going to http://192.168.100.82:5076/
Configuring NZBHydra2
Open your browser to http://192.168.100.82:5076
We will add a downloader now by selecting “Config” on the top and then selecting “Downloading”
Now Click “Add new downloader” then select SABnzbd and input these values:
Name : SABnzbd
URL : http://192.168.100.82:8080 (localhost will not work)
API Key : get this from SABnzbd under "General" / "Security"
Now click “Submit” then “Save”
We will now add an indexer by selecting “Config” on the top and then selecting “Indexers”
Now Click “Add new indexer” then select “Add custom newznab indexer” and input these values:
Input Name, Host, and API Key from https://nzbfinder.ws/
We just need the api key so you can remove "?apikey="
Under Categories select "Select all"
Now click “Submit” then “Save”
At this point you have a standard NZBHydra2 install.
Installing Lidar
Run these commands:
sudo addgroup lidarr
sudo adduser --system lidarr --ingroup lidarr
sudo getent group downloads || sudo groupadd downloads
sudo usermod -a -G downloads lidarr
sudo apt install gnupg ca-certificates
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update
sudo apt install mono-devel libchromaprint-tools
cd /opt/
sudo wget https://github.com/lidarr/Lidarr/releases/download/v0.7.1.1381/Lidarr.master.0.7.1.1381.linux.tar.gz
sudo tar -xzvf Lidarr.master.0.7.1.1381.linux.tar.gz
sudo chown -R lidarr:lidarr /opt/Lidarr/
Now we create the service file :
sudo vi /etc/systemd/system/lidarr.service
Insert this into that file :
[Unit]
Description=Lidarr Daemon
After=syslog.target network.target
[Service]
User=lidarr
Group=lidarr
Type=simple
ExecStart=/usr/bin/mono /opt/Lidarr/Lidarr.exe -nobrowser
TimeoutStopSec=20
KillMode=process
Restart=on-failure
[Install]
WantedBy=multi-user.target
Now we load and start the daemon:
sudo systemctl enable lidarr.service
sudo systemctl start lidarr.service
Now test by going to http://192.168.100.82:8686/
Configuring Lidarr
First, make sure that the following path is owned by lidarr:lidarr :
sudo chown -R lidarr:downloads /storage/music
Open your browser to http://192.168.100.82:8686/
Now we will add a root folder by selecting “Settings” on the left then selecting “Media Management”
Click “Add Root Folder” and select /storage/music
Now we will add an indexer by selecting “Settings” on the left then selecting “Indexers”
Click the large “+” select “Newznab” and input the info below:
Name : NZBHydra2
URL : http://192.168.100.82:5076
API Key : get this from NZBHydra2 under "Config" / "Main"
Now click “Test” then “Save”
Now we will add a download client by selecting “Settings” on the left then selecting “Download Clients”
Click the large “+” select “SABnzbd” and input the info below:
Name : SABnzbd
Host : 192.168.100.82
Port : 8080
API Key : get this from sabnzbd under "General" / "Security"
Now click “Test” then “Save”
At this point you have a standard Lidarr install.
Installing Sonarr
Run these commands:
sudo addgroup sonarr
sudo adduser --system sonarr --ingroup sonarr
sudo getent group downloads || sudo groupadd downloads
sudo usermod -a -G downloads sonarr
sudo apt install apt-transport-https
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0xA236C58F409091A18ACA53CBEBFF6B99D9B78493
echo "deb http://apt.sonarr.tv/ master main" | sudo tee /etc/apt/sources.list.d/sonarr.list
sudo apt update
sudo apt install nzbdrone
sudo chown -R sonarr:sonarr /opt/NzbDrone/
Now we create the service file :
sudo vi /lib/systemd/system/sonarr.service
Insert this into that file :
[Unit]
Description=Sonarr Daemon
After=network.target
[Service]
User=sonarr
Group=sonarr
Type=simple
ExecStart=/usr/bin/mono /opt/NzbDrone/NzbDrone.exe -nobrowser
TimeoutStopSec=20
KillMode=process
Restart=on-failure
[Install]
WantedBy=multi-user.target
Now we load and start the daemon:
sudo systemctl daemon-reload
sudo systemctl enable sonarr.service
sudo systemctl start sonarr.service
Now test by going to http://192.168.100.82:8989/
Configuring Sonarr
First, make sure that the following path is owned by sonarr:sonarr :
sudo chown -R sonarr:downloads /storage/tv
Open your browser to http://192.168.100.82:8989/
Now we will add an indexer by selecting “Settings” on the far top then selecting “Indexers”
Click the large “+” select “Newznab” and input the info below:
Name : NZBHydra2
URL : http://192.168.100.82:5076
API Key : get this from NZBHydra2 under "Config" / "Main"
Now click “Test” then “Save”
Now we will add a download client by selecting “Settings” on the far top then selecting “Download Client”
Click the large “+” select “SABnzbd” and input the info below:
Name : SABnzbd
Host : 192.168.100.82
Port : 8080
API Key : get this from sabnzbd under "General" / "Security"
Now click “Test” then “Save”
Now we will add a series so that we can add the path by clicking “Series” on the far top
Click “+Add Series” and type a name of a series
when the series pops up select the drop down under “Path” and select “Add a different path” and set that path to
/storage/tv
Now click the green check on the side
and now click the green magnifying glass to start series search / download
At this point you have a standard Sonarr install.
Installing Radarr
Run these commands:
sudo addgroup radarr
sudo adduser --system radarr --ingroup radarr
sudo getent group downloads || sudo groupadd downloads
sudo usermod -a -G downloads radarr
sudo apt install curl mediainfo sqlite3
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian jessie main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
cd /opt/
sudo wget https://github.com/Radarr/Radarr/releases/download/v0.2.0.1358/Radarr.develop.0.2.0.1358.linux.tar.gz
sudo tar -xzvf Radarr.develop.0.2.0.1358.linux.tar.gz
sudo chown -R radarr:radarr /opt/Radarr
Now we create the service file :
sudo vi /lib/systemd/system/radarr.service
Insert this into that file :
[Unit]
Description=Radarr Daemon
After=syslog.target network.target
[Service]
User=radarr
Group=radarr
Type=simple
ExecStart=/usr/bin/mono /opt/Radarr/Radarr.exe -nobrowser
TimeoutStopSec=20
KillMode=process
Restart=on-failure
[Install]
WantedBy=multi-user.target
Now we load and start the daemon:
sudo systemctl daemon-reload
sudo systemctl enable radarr.service
sudo systemctl start radarr.service
Now test by going to http://192.168.100.82:7878/
Configuring Radarr
First, make sure that the following path is owned by radarr:radarr :
sudo chown -R radarr:downloads /storage/movies
Open your browser to http://192.168.100.82:7878/
Now we will add an indexer by selecting “Settings” on the far top then selecting “Indexers”
Click the large “+” select “Newznab” and input the info below:
Name : NZBHydra2
URL : http://192.168.100.82:5076
API Key : get this from NZBHydra2 under "Config" / "Main"
Now click “Test” then “Save”
Now we will add a download client by selecting “Settings” on the far top then selecting “Download Client”
Click the large “+” select “SABnzbd” and input the info below:
Name : SABnzbd
Host : 192.168.100.82
Port : 8080
API Key : get this from sabnzbd under "General" / "Security"
Now click “Test” then “Save”
Now we will add a movie so that we can add the path by clicking “Movie” on the far top
Click “+Add Movies” and type a name of a series
when the series pops up select the drop down under “Path” and select “Add a different path” and set that path to
/storage/movies
Now click the green check on the side
and now click the green magnifying glass to start series search / download
At this point you have a standard Radarr install.
Installing LazyLibrarian
Run these commands:
sudo addgroup lazylibrarian
sudo adduser --system lazylibrarian --ingroup lazylibrarian
sudo getent group downloads || sudo groupadd downloads
sudo usermod -a -G downloads lazylibrarian
sudo apt install git-core
cd /opt/
sudo git clone https://github.com/DobyTang/LazyLibrarian.git
sudo chown -R lazylibrarian:lazylibrarian /opt/LazyLibrarian/
sudo cp /opt/LazyLibrarian/init/lazylibrarian.default /etc/default/lazylibrarian
Now we edit the default file:
sudo vi /etc/default/lazylibrarian
and change “RUN_AS” as shown below:
RUN_AS=lazylibrarian
Now we add and load the init file:
sudo cp /opt/LazyLibrarian/init/lazylibrarian.initd /etc/init.d/lazylibrarian
sudo chmod a+x /etc/init.d/lazylibrarian
sudo update-rc.d lazylibrarian defaults
sudo systemctl start lazylibrarian.service
Now test by going to http://192.168.100.82:5299/
Configuring LazyLibrarian
**** For LazyLibrarian to work you need to have a Goodreads API key which you will enter under “Config” –> “Importing” ****
First, make sure that the following path is owned by lazylibrarian:lazylibrarian :
sudo chown -R lazylibrarian:downloads /storage/books
Open your browser to http://192.168.100.82:5299/
Now we will add an indexer by selecting “Config” on the far top then selecting “Providers”
Under “Newznab Prviders” input the info below:
Name: NZBHydra2 (click the checkbox to the right)
Newznab URL #0: 192.168.100.82:5076
Newznab API #0: get this from NZBHydra2 under "Config" / "Main"
Now click “Test” then “Save changes” on the top
Now we will add a download client by selecting “Config” on the far top then selecting “Downloaders”
Click “Use Sabnzbd+” and input the info below:
SABnzbd Host: 192.168.100.82
SABnzbd Port: 8080
SABnzbd API Key: get this from sabnzbd under "General" / "Security"
SABnzbd Category: books
Now click “Test” then “Save changes” on the top
At this point you have a standard LazyLibrarian install.
Installing Plex Media Server
Download the deb package from :
https://www.plex.tv/media-server-downloads/
Run this command:
sudo dpkg -i plexmediaserver*.deb
Now test by going to http://192.168.100.82:32400/web/
Configuring Plex
Open your browser to http://192.168.100.82:32400/web
Follow the wizard until you get to “Organize Your Media” and follow the steps below:
Movies:
Click “Add Library” then click “Movies”
Name : Movies
Now click “NEXT” and click “BROWSE FOR MEDIA FOLDER” and select:
/storage/movies
Click “ADD LIBRARY”
TV Shows:
Click “Add Library” then click “TV Shows”
Name : TV Shows
Now click “NEXT” and click “BROWSE FOR MEDIA FOLDER” and select:
/storage/tv
Click “ADD LIBRARY”
Music:
Click “Add Library” then click “Music”
Name : Music
Now click “NEXT” and click “BROWSE FOR MEDIA FOLDER” and select:
/storage/music
Click “ADD LIBRARY”
Audio Books:
Click “Add Library” then click “Music”
Name : Audio Books
Now click “NEXT” and click “BROWSE FOR MEDIA FOLDER” and select:
/storage/books
Click “ADD LIBRARY”
Now to finish it up click “NEXT” then click “DONE”
At this point you have a standard Plex install.
Installing Tautulli
Run these commands:
sudo addgroup tautulli
sudo adduser --system tautulli --ingroup tautulli
sudo apt install python python-setuptools tzdata git-core
cd /opt/
sudo git clone https://github.com/Tautulli/Tautulli.git
sudo chown -R tautulli:tautulli Tautulli/
Now we create the service file:
sudo vi /lib/systemd/system/tautulli.service
Insert this into that file :
[Unit]
Description=Tautulli - Stats for Plex Media Server usage
Wants=network-online.target
After=network-online.target
[Service]
ExecStart=/opt/Tautulli/Tautulli.py --config /home/tautulli/Tautulli.ini --datadir /home/tautulli --quiet --daemon --nolaunch
GuessMainPID=no
Type=forking
User=tautulli
Group=tautulli
Restart=on-abnormal
RestartSec=5
StartLimitInterval=90
StartLimitBurst=3
[Install]
WantedBy=multi-user.target
Now we load and start the daemon:
sudo systemctl daemon-reload
sudo systemctl enable tautulli.service
sudo systemctl start tautulli.service
Now test by going to http://192.168.100.82:8181/
Configuring Tautulli
Open your browser to http://192.168.100.82:8181
Now follow the wizard
At this point you have a standard Tautulli install.
Final Notes
At this point you should have a fully working system running:
SABnzbd @ http://192.168.100.82:8080
NZBHydra2 @ http://192.168.100.82:5076
Lidarr @ http://192.168.100.82:8686
Sonarr @ http://192.168.100.82:8989
Radarr @ http://192.168.100.82:7878
LazyLibrarian @ http://192.168.100.82:5299
Plex @ https://app.plex.tv/desktop
Plex @ http://192.168.100.82:32400/web/
Tautulli @ http://192.168.100.82:8181
I would recommend setting usernames and passwords for all the services but for now just click around and get used to the settings and interfaces.
Enjoy!!
Leave a Reply