Install SABnzbd, Sonarr, CouchPotato, and Headphones on CentOS 7

This post was last updated on Mar 06, 2018. CouchPotatoServer guide removed, radarr guide updated.

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 the same applications, except that I am switching from SickBeard to Sonarr. Why? Well, development has slowed way down for SickBeard since the main dev has called it quits. SickBeard has always worked well for me, I tried SickRage for a while, and but once I really tested Sonarr it was an obvious choice.

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

yum -y install wget git par2cmdline p7zip unzip tar gcc python-feedparser python-configobj python-dbus python-devel python-pip   # Install Prereqs
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:
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 mediainfo libzen libmediainfo curl gettext mono-core mono-devel sqlite   # Additional pre-reqs for Sonarr
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.

yum -y install mono-locale-extras   # Necessary for Radarr
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.) headphones install:
mkdir -p /apps/data/.headphones && cd /apps   # Create data dir for Headphones
git clone https://github.com/rembo10/headphones.git headphones   # Download Headphones files
chown -R usenet:usenet /apps   # Change ownership of Headphones files
vi /etc/systemd/system/headphones.service   # Create systemd service script file
---
[Unit]
Description=Headphones Daemon
After=syslog.target network.target

[Service]
Type=forking
User=usenet
Group=usenet
ExecStart=/usr/bin/python /apps/headphones/Headphones.py --daemon --datadir=/apps/data/.headphones --config=/apps/data/.headphones/headphones_config.ini --quiet --nolaunch
GuessMainPID=no

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

systemctl enable headphones.service   # Set Headphones to start at system boot

Headphones is now installed, and set to run at boot. Headphones is not currently running, but will start running on port 8181 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, CouchPotatoServer, and Headphones 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