Initial Setup

Sonarr is a PVR for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new episodes of your favorite shows, grab, sort, and rename them. It can also be configured to automatically upgrade the quality of files already downloaded when a better quality format becomes available.

Major features include:

  • Complete content management. Naming conventions, metadata and episode management.
  • Compatible with all major download clients.
  • Full integration with other media apps for real time notifications and library refreshing
  • All in a beautiful UI with full SSL support.

You can view the application's repo here: https://github.com/Sonarr/Sonarr

In this section, we'll be setting up Sonarr for the first time. This guide assumes that this is your first time installing Sonarr, and you'll be storing your media locally, saving it to ~/media. We'll be doing the following:

  • Enabling automatic organization and adding a root Folder
  • Adding indexers
  • Connecting your download clients
  • Adding your first series

Enabling Automatic Organization

  • Access and log in to your Sonarr instance using the credentials you set during installation
  • Go to Settings
  • Make sure that advanced settings are set to Shown and click Media Management
  • Under Episode Naming section, check Rename Episodes
    • You can leave the rest of the options as-is. The defaults work well with Plex's naming scheme.
  • Under Importing section, make sure that Use hardlinks instead of copy is checked
    • Hardlinks effectively creates a file that points directly to your source file in the disk. You can do anything to this file without affecting your source file and vice versa. This is useful when you're seeding from torrents. This is to prevent having 2 copies of the same movie without affecting your files.

A note for fused, cloud mounts

If your root folder is located on a mount (e.g., using a rclone mount), you should set this above setting to No. Hardlinks do not work for mounts as they are different filesystems. Sonarr will resort to copying, which is prone to errors. For this, use an rclone VFS and MergerFS Setup

You can use clever manipluation to keep hardlinking with mergerfs, using Remote Path Mapping. We have a guide for that HERE

Add your media Root Folder

  • To add your Root Folders, select Add Root Folder also under Settings -> Media Management
  • This will bring up the File Browser window.
  • From here, navigate to your ~/media/TV Shows folder. Select homexx, then your username, then media, and in this case finally, the pre-created folder of TV Shows. Ex: ``/home/usbxdoc/media/TV Shows`. Then click OK.
    • This folder is generated upon receiving your slot. This is where you'll be saving your media.
  • Once that's done, click OK. You'll see the absolute path of the Root folder.
  • Click Save changes to save your changes

Adding indexers

  • Now click the Indexers tab (red box)
  • Add an indexer by clicking the big plus button (Blue box) and input what is asked on each indexer you wish.
    • Depending on the indexer, it'll ask for your account credentials or a passkey. Refer to your indexer/tracker for more information on what to put.
  • Once that's done, click save changes.

Adding Download Clients

  • Now, click the Download client tab
  • To add your preferred client, click the big + button, then select your preferred client.
  • Be sure to enable "Show Advanced settings" Using the Cog Icon in the top left-hand side to show URL Base Field

Torrent Clients

Deluge
Host: {username}.{servername}.usbx.me
Port: 443
URL Base: /deluge
Password: As configured in UCP under Deluge
Category: tv-sonarr
Add Paused: NO
Use SSL: YES
rTorrent
Host: {username}.{servername}.usbx.me
Port: 443
URL Path: /RPC2
Username: {username}
Password: As configured in UCP under ruTorrent
Category: tv-sonarr
Add Stopped: NO
Use SSL: YES
Transmission
Host: {username}.{servername}.usbx.me
Port: 443
Username: {username}
Password: As configured in UCP under Transmission
Category: tv-sonarr
Add Stopped: NO
Use SSL: YES

Usenet Clients

SABnzbd
Host: {username}.{servername}.usbx.me
Port: 443
URL Path: /sabnzbd
API Key: As obtained from SABnzbd
Username: {username}
Password: Configured during SABnzbd setup
Category: tv
Use SSL: YES
Nzbget
Host: {username}.{servername}.usbx.me
Port: 443
URL Path: /nzbget
Username: {nzbget username}
Password: {nzbget password}
Category: tv
Add Paused: NO
Use SSL: YES

Adding Your First Series

  • To add a series, click Series
  • Then click Add New Series
  • This page will be shown. Search and select the series that you wish to grab.
  • Once selected, you can change your preferred quality profile and the series type if you want to monitor the series for any new releases.
  • Once that's done, you can click the green button to add it to your Sonarr.
    • If you want to search for the series in your indexers immediately, check to start searching for missing episodes.

Ultra.cc support is unable to provide support for remote path mapping, this is due to the use of rclone/cloud storage. Be sure to follow every step carefully if you wish to use this function. Mis-configuration will result in deleted seed data and missing paths that will break your download client functions in {Radarr,Sonarr}, OR WORSE! .

Remote Path Mapping

In this guide, we'll be setting up Sonarr/Radarr to use the remote path mapping to enable instantaneous Media management and limit disk Input/Output. This guide assumes the following:

• You have a working Sonarr/Radarr

• You have a working Download client installed and running on your Ultra.cc Slot, that is connected to sonar/radarr

• Have MergerFS Mount setup and working correctly

• Have the rclone upload script included in the docs up and running.

Create Folder Structure

Both Sonarr and Radarr offer an option called remote path mapping. Think of this as a shortcut between a local path in this case your Ultra.cc Slot and a Remote path where downloads are stored for processing, this could be another server or a cloud mount, In our case we will be using a MergerFS mount as our remote path, this has the effect of instantaneous media management. So, the first steps are to create a download folder, we will create a Folder for both Torrent downloads and Usenet downloads Deluge/Torrent Clients

mkdir -p ~/Stuff/Local/Downloads/torrents/Deluge/ This could be changed at the end to rutorrent transmission or any other client you may be using Login via SSH to confirm your full download path.

cd ~/Stuff/Local/Downloads/torrents/Deluge

pwd

This will display a path like this /home3/usbdocs/Stuff/Local/Downloads/torrents/Deluge

Proceed to set your Torrent Client to the same download path as you’ve just created.

ensure your download client is linked to your sonar/radarr with similar settings to these

NZB Downloaders

Now lets make one for NZBdownloads in this case NZBget

mkdir -p ~/Stuff/Local/Downloads/usenet/Sonarr

mkdir -p ~/Stuff/Local/Downloads/usenet/Radarr

NZB downloaders work a little differently so your need to make Categories for both sonarr and radarr and point them to the respective folders like so

Login via SSH to confirm your full download path. cd ~/Stuff/Local/Downloads/usenet/Sonarr pwd This will display a path like this

/home3/usbdocs/Stuff/Local/Downloads/usenet/Sonarr For Radarr /home3/usbdocs/Stuff/Local/Downloads/usenet/Radarr Add these Categories to NZBget by navigating to the web UI, Click Settings at the top of the page and then Categories on the left hand side

Be sure to scroll to the bottom and save.

Edit Upload Bash Script

We now need to tell rclone to ignore our Downloads and only touch Stuff/Local. Be sure to follow this or your seeding torrent data will be removed.

Original script can be found here: https://raw.githubusercontent.com/ultraseedbox/UltraSeedbox-Scripts/master/MergerFS-Rclone/Upload%20Scripts/rclone-upload.sh

You need to add the --exclude "Downloads/**" \ flag

The original script will look like this:

#!/bin/bash

lock_file="$HOME/scripts/rclone-upload.lock"

trap 'rm -f "$lock_file"; exit 0' SIGINT SIGTERM
if [ -e "$lock_file" ]
then
    echo "Rclone upload script is already running."
    exit
else
    rm "$HOME"/scripts/rclone-upload.log
    touch "$lock_file"
    "$HOME"/bin/rclone move "$HOME"/Stuff/Local/ remote: \
        --config="$HOME"/.config/rclone/rclone.conf \
        --drive-chunk-size 64M \
        --tpslimit 5 \
        -vvv \
        --drive-stop-on-upload-limit \
        --delete-empty-src-dirs \
        --fast-list \
        --bwlimit=8M \
        --use-mmap \
        --transfers=2 \
        --checkers=4 \
        --log-file "$HOME"/scripts/rclone-upload.log
    rm -f "$lock_file"
    trap - SIGINT SIGTERM
    exit
fi

Just like the script above you can simply add --exclude "Downloads/**" \ under --config

[Unit]
Description=RClone Uploader

[Service]
Type=simple

ExecStart=%h/bin/rclone move %h/Stuff/Local/ gdrive: \
    --config=/home6/kbguides/.config/rclone/rclone.conf \
    --exclude "Downloads/**" \
    --drive-chunk-size 8M \
    --tpslimit 1 \
    --drive-acknowledge-abuse=true \
    -vvv \
    --delete-empty-src-dirs \
    --fast-list \
    --bwlimit=2M \
    --use-mmap \
    --transfers=1 \
    --checkers=1 \
    --drive-stop-on-upload-limit \
    --log-file /home6/kbguides/scripts/rclone-uploader.log
Restart=on-failure

[Install]
WantedBy=default.target

Configuring Sonarr/Radarr to use the remote mapping functions

Go to Settings => Download Clients

Scroll all the way down where you see Remote Path Mappings and click on the plus sign.

Torrents

Host: username.lwxxx.usbx.me from the drop down menu (Must be the same one as your download client)

Remote Path:/home/usbdocs/Stuff/Local/Downloads/torrents/Deluge (Path where torrent client is pointed)

Local Path:/home/usbdocs/MergerFS/Downloads/torrents/Deluge (path where Sonarr will look for downloads)

NZBdownloads

Host: username.lwxxx.usbx.me from the drop down menu (Must be the same one as your download client)

Remote Path:/home/usbdocs/Stuff/Local/Downloads/usenet/Sonarr (Path where usenet client is pointed)

Local Path:/home/usbdocs/MergerFS/Downloads/Downloads/usenet/Sonarr (path where Sonarr will look for downloads)

You only have to add the paths relevant to your use case if you do not use NZB's there is no need for the second path.

Enable Hardlinking in Media Management as pictured here:

Backing Up and Restoring Sonarr

In this section, we'll be showing you how to backup and restore Sonarr v3.

Backing Up Sonarr

  • Log into your Sonarr instance
  • In System -> Backup, click Backup Now. This will create a zip containing your Backup.
  • Click your newly created Backup to download it to your PC.

Restoring Sonarr

  • On your newly installed Sonarr instance, go to System -> Backup
  • Click Restore backup.
  • A window appears. Click Choose file and navigate to your Sonarr Backup.
  • Once selected, click Restore and wait for a few moments.
  • Go back to the UCP, then set a new password on Sonarr. Once it's set, log in again and check that all of your settings have been restored correctly.

Troubleshooting Information

Why is Sonarr down with application error 502? It won't come back!

If your Sonarr is reporting 502 and you have followed all the instructions on the error page (restarting, then upgrading if that fails), then something else is going on. All troubleshooting from here requires you to access your SSH terminal.

  • If you use mergerfs in conjunction with Sonarr or Radarr, first ensure your mono instance is not defunct with ps aux | grep defunct. If it's defunct, killing your mounts will release the process, and you will be able to restart Sonarr/Radarr. Rclone cloud mounts should not be used directly with any application. MergerFS should be used.
  • Have you been into the system settings of Sonarr recently and use a password manager? Your password manager may have auto-filled the port. The ports should not be modified as they are just the internal docker ports, and SSL is handled via nginx. Please check the ports in the applications config.xml with the following command:
cat .apps/sonarr/config.xml | grep Port

Sonarr output should look like this:

support@server:~$ cat .apps/sonarr/config.xml | grep Port
  <Port>8989</Port>
  <SslPort>9898</SslPort>

If they report other values, then use a text editor on config.xml and change to the port displayed above.