Dart

Beginnings Begin with a VM running Ubuntu 18.04. This will also probably work in any recent debian without much alteration. If you want to run on a non Debian-based distribution, that's probably fine as long as it has the minimum requirements met for each of the services. And you'll have to follow the script by hand.

VM Initial Setup

Add necessary PPAs

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-key adv --keyserver keyserver.ubuntu.com --recv-keys FDA5DFFC
echo "deb http://apt.sonarr.tv/ master main" | sudo tee /etc/apt/sources.list.d/sonarr.list
sudo apt-get update && sudo apt-get dist-upgrade -y

Install packages

sudo apt-get install -y mono-devel vim git openvpn sabnzbdplus python-sabyenc par2-tbb transmission-daemon

Define local subnets

Must be at least the one the machine is in

  • 192.168.0.0/24

Create dart directories

sudo mkdir -p /opt/dart
sudo mkdir -p /media/storage/incoming/transmission/complete
sudo mkdir -p /media/storage/incoming/transmission/incomplete

Disable IPv6 and IP Forwarding

cat << EOF | sudo tee /etc/sysctl.d/99-dart.conf
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv4.ip_forward = 0
EOF
sudo sysctl -p

Set-up iptables

Write file iptables_ifup_script to /etc/network/if-up.d/iptables
Generate from subnet list the list (sample: etc_iptables_save_sample) to /etc/iptables.save

Configure VPN

Install openvpn IPredator config to /etc/openvpn/ipredator.conf
Generate and install /etc/openvpn/ipredator.auth (sample: openvpn IPredator auth\\ sample Install openvpn dns up/down scripts

  1. openvpn ipredator dns up script to /etc/openvpn/ipredator_dns_up.sh
  2. openvpn ipredator dns down script to /etc/openvpn/ipredator_dns_down.sh
  3. openvpn ipredator cert to /etc/openvpn/config/IPredator.se.ca.crt
  4. openvpn ipredator key to /etc/openvpn/config/IPredator.se.ta.key

SabNZB

Add user

sudo useradd -r -d /opt/dart/sabnzb -m -N sabnzb

Edit settings

sudo sed -i -e 's/^USER=/USER=sabnzb/' /etc/default/sabnzbdplus

Transmission Daemon

Add user

sudo useradd -r -d /opt/dart/transmission -m -N transmission
sudo cp -r /var/lib/transmission-daemon/.config /opt/dart/transmission/
sudo chown -R transmission: /opt/dart/transmission/.config
sudo ln -s /opt/dart/transmission/.config/transmission-daemon /opt/dart/transmission/info
sudo chown root:users /etc/transmission-daemon
sudo chown transmission:users /etc/transmission-daemon/*

Edit settings

sudo sed -i -e 's/^CONFIG_DIR=.*/CONFIG_DIR="\/opt\/dart\/transmission\\info"/' /etc/default/transmission-daemon
sudo sed -i -e 's/^setuid debian-transmission/setuid transmission/' /etc/init/transmission-daemon.conf
sudo sed -i -e 's/^setgid debian-transmission/setgid users/' /etc/init/transmission-daemon.conf
sudo sed -i -e 's/"download-dir":.*/"download-dir": "\/media\/storage\/incoming\/transmission\/complete",/' /etc/transmission-daemon/settings.json
sudo sed -i -e 's/"incomplete-dir":.*/"incomplete-dir": "\/media\/storage\/incoming\/transmission\/incomplete",/' /etc/transmission-daemon/settings.json
sudo sed -i -e 's/"incomplete-dir-enabled":.*/"incomplete-dir-enabled": true,/' /etc/transmission-daemon/settings.json
sudo sed -i -e 's/"rpc-host-whitelist":.*/"rpc-host-whitelist": "127.0.0.1",/' /etc/transmission-daemon/settings.json

Get info
Parse rpc-password, rpc-port and rpc-url from /etc/transmission-daemon/settings.json

Sonarr

Add user

sudo useradd -r -d /opt/dart/sonarr -m -N sonarr

Set up service
Install Sonarr service file to /etc/systemd/system

systemctl enable sonarr.service

Update config in /opt/dart/sonarr/.config/NzbDrone/config.xml

Lidarr

Add user

sudo useradd -r -d /opt/dart/lidarr -m -N lidarr

Install

wget https://ci.appveyor.com/api/buildjobs/pqte2q546889w0yh/artifacts/Lidarr.develop.0.3.0.430.linux.tar.gz
tar -xzf Lidarr.develop.0.3.0.430.linux.tar.gz --director /opt/dart/lidarr/
chown -R lidarr: /opt/dart/lidarr/Lidarr

Set up service
Install Lidarr service file to /etc/systemd/system

systemctl enable lidarr.service

Update config in /opt/dart/lidarr/.config/NzbDrone/config.xml

Couchpotato

Page last modified on May 30, 2018