Install SABnzbd, Sonarr, Radarr, and Lidarr on CentOS 7

This post was last updated on June 21, 2018. Headphones guide removed, Lidarr guide added (finally out of beta!).

This post is for installing the automation applications for Usenet downloading on CentOS 7. In my previous guides written for CentOS 6, I was using SABnzbd, SickBeard, CouchPotatoServer, and Headphones. This time around, I am using Sonarr, Radarr, and Lidarr. Why? Well, development on these apps has surely surpassed SickBeard/SickRage, CouchPotatoServer, and Headphones.

With this guide, I'm creating a service account named usenet, which all of these services will be running as. In my setup, firewalld is disabled (systemctl disable firewalld.service && systemctl stop firewalld.service), and I have SELinux disabled (sed -i /etc/selinux/config -r -e 's/^SELINUX=.*/SELINUX=disabled/g'). If you disable firewalld and selinux, you do so at your own risk. It is not advisable to do either if your usenet downloader is directly accessible on the internet, so please use a reverse proxy or something similar! I have a very simple guide available for a Nginx Reverse Proxy build that can be found HERE.

Let's Get Started!

1.) prerequisites:
useradd -r usenet   # Create usenet service account
yum -y install epel-release   # Install EPEL repo

vi /etc/yum.repos.d/mono.repo   # Create mono repo
---
[mono]
name=mono for Centos 7 - Base
baseurl=http://download.mono-project.com/repo/centos/
failovermethod=priority
enabled=1
gpgcheck=0
---

rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF"   # GPG key for mono repo

yum -y install curl gcc gettext git libmediainfo libzen mediainfo mono-core mono-devel \
       mono-locale-extras p7zip par2cmdline python-configobj python-dbus python-devel \
       python-feedparser python-pip sqlite tar unzip wget   # Install Pre-reqs

yum -y install https://www.rpmfind.net/linux/rpmfusion/nonfree/el/updates/7/x86_64/u/unrar-5.4.5-1.el7.x86_64.rpm   # Install unrar
pip install pip --upgrade   # Update pip
pip install cheetah cryptography sabyenc --upgrade   # install python modules
yum -y update && reboot

Prereqs done; now lets install SAB!

2.) sabnzbd install:
mkdir -p /apps/data/.sabnzbd && cd /apps   # Create data dir for SABnzbd
git clone -b master https://github.com/sabnzbd/sabnzbd.git sabnzbd   # Download SABnzbd files
chown -R usenet:usenet /apps   # Change ownership of SABnzbd files
vi /etc/systemd/system/sabnzbd.service   # Create systemd service script file
---
[Unit]
Description=SABnzbd Daemon
After=syslog.target network.target

[Service]
Type=forking
User=usenet
Group=usenet
ExecStart=/usr/bin/python /apps/sabnzbd/SABnzbd.py --daemon --config-file=/apps/data/.sabnzbd/sabnzbd_config.ini -s 0.0.0.0
GuessMainPID=no

[Install]
WantedBy=multi-user.target
---

systemctl enable sabnzbd.service   # Set SABnzbd to start at system boot

SABnzbd is now installed, and set to run at boot. SABnzbd is not currently running, but will start running on port 8080 as the service is started (or system rebooted).

3.) sonarr install:
mkdir -p /apps/{data/.sonarr,sonarr} && cd /apps   # Create data dir for Sonarr
wget http://download.sonarr.tv/v2/master/mono/NzbDrone.master.tar.gz   # Download Sonarr files
tar -xvf NzbDrone.master.tar.gz   # Extract Sonarr (NzbDrone) files
mv NzbDrone/* sonarr/. && rm -rf NzbDrone*   # Move to sonarr folder, and cleanup after the download
chown -R usenet:usenet /apps   # Change ownership of Sonarr files
vi /etc/systemd/system/sonarr.service   # Create systemd service script file
---
[Unit]
Description=Sonarr Daemon
After=syslog.target network.target

[Service]
Type=simple
User=usenet
Group=usenet
ExecStart=/usr/bin/mono /apps/sonarr/NzbDrone.exe /data=/apps/data/.sonarr
Restart=always
RestartSec=15
TimeoutStopSec=20

[Install]
WantedBy=multi-user.target
---

ln -s /usr/lib64/libMonoPosixHelper.so /usr/lib/libMonoPosixHelper.so
systemctl enable sonarr.service   # Set Sonarr to start at system boot

Sonarr is now installed, and set to run at boot. Sonarr is not currently running, but will start running on port 8989 as the service is started (or systemctl rebooted).

4.) radarr install:

Recently there was a new project that has come to light. It's called Radarr, and is a fork of Sonarr but to deal with movies. Essentially it is a replacement for CouchPotatoServer. The install is very similar to Sonarr, so as long as you've installed Sonarr already, you'll have most of the pre-reqs. At this time, we will be installing the Develop branch.

mkdir -p /apps/{data/.radarr,radarr} && cd /apps   # Create data dir for Radarr
wget $( curl -s https://api.github.com/repos/Radarr/Radarr/releases | grep linux.tar.gz | grep browser_download_url | head -1 | cut -d \" -f 4 )   # Download Latest Radarr files
tar -xvf Radarr.develop.*.linux.tar.gz   # Extract Radarr files
mv Radarr/* radarr/. && rm -rf Radar*   # Move to radarr folder, and cleanup after the download
chown -R usenet:usenet /apps   # Change ownership of Radarr files
vi /etc/systemd/system/radarr.service   # Create systemd service script file
---
[Unit]
Description=Radarr Daemon
After=syslog.target network.target

[Service]
Type=simple
User=usenet
Group=usenet
ExecStart=/usr/bin/mono /apps/radarr/Radarr.exe /data=/apps/data/.radarr
Restart=always
RestartSec=15
TimeoutStopSec=20

[Install]
WantedBy=multi-user.target
---

systemctl enable radarr.service   # Set Sonarr to start at system boot

Radarr is now installed, and set to run at boot. Radarr is not currently running, but will start running on port 7878 as the service is started (or system rebooted).

5.) lidarr install:

This install is essentially a mirror of the radarr install.

mkdir -p /apps/{data/.lidarr,lidarr} && cd /apps   # Create data dir for Lidarr
wget $(curl -s https://api.github.com/repos/lidarr/Lidarr/releases | grep linux.tar.gz | grep browser_download_url | head -1 | cut -d \" -f 4 )
tar -xvf Lidarr.develop.*.linux.tar.gz
mv Lidarr/* lidarr/. && rm -rf Lidarr*
chown -R usenet:usenet /apps   # Change ownership of Headphones files
vi /etc/systemd/system/lidarr.service   # Create systemd service script file
---
[Unit]
Description=Lidarr Daemon
After=syslog.target network.target

[Service]
Type=simple
User=usenet
Group=usenet
ExecStart=/usr/bin/mono /apps/lidarr/Lidarr.exe /data=/apps/data/.lidarr
Restart=always
RestartSec=15
TimeoutStopSec=20

[Install]
WantedBy=multi-user.target
---

systemctl enable lidarr.service   # Set Lidarr to start at system boot

Lidarr is now installed, and set to run at boot. Lidarr is not currently running, but will start running on port 8686 as the service is started (or system rebooted).

6.) finish:

All that's left is a reboot!

systemctl reboot

Once your server boots, you'll have SABnzbd, Sonarr, Radarr, and Lidarr running at their designated ports (listed above). Go forth, configure, and download!

If you're having trouble accessing any of the webpages for these apps, make sure you have configured firewalld to allow access to the designated ports, or simply disable firewalld. In my setup, I have firewalld disabled, and use Nginx as a reverse proxy to access these services from the internet.

Leave me some feedback!


Related Posts


Share on: Twitter | Facebook | Google+ | Email


comments powered by Disqus