TrueNAS: Sonarr V3 Manual Install

Sonarr is a multi-platform app to search, download, and manage TV shows which has been updated to a new Sonarr V3 web user interface. TrueNAS only installs the V2 and this TrueNAS: Sonarr V3 Manual Install guide will help you install V3. Sonarr V3 is technically still in beta, but it runs well and is stable! If you don’t know what sonarr is, it automatically downloads TV shows via Usenet and BitTorrent. Sonarr can integrate directly into your media server setup and integrates directly with most modern download clients: uTorrent, Deluge, rTorrent, NZBGet, SABnzbd, qBittorrent, Transmission and many more. It will determine when an episode has been downloaded and move it to the correct media folder to be picked up by media servers such as Plex, Emby or Jellyfin. The project was inspired by other Usenet/BitTorrent movie downloaders such as SickRage.

Setting up Sonarr is a lot like setting up Radarr, and you can read the TrueNAS: Radarr Manual Install article to walk through also downloading your movies automatically. This TrueNAS: Sonarr V3 Manual Install article will show you how to install Sonarr V3 within an existing jail (e.g. with your OpenVPN connection and a torrent client which you setup by reading TrueNAS: Add VPN Connection to a Jail). If you want to install a previous version of Sonarr you can follow the TrueNAS: Sonarr Manual Install article.

This is part of my ongoing series of TrueNAS and FreeNAS setup, configuration and install articles.

Install Dependencies

Alright, so we will start off by going to the shell of the jail in which you want to install Sonarr V3. Once there, from the shell we will install (almost) all the dependencies with the following command:
pkg install mediainfo sqlite3 ca_root_nss curl llvm80 libiconv nano wget

Download Sonarr V3 and Mono

Now we will manually download a newer version of the final dependency, Mono, and then download a copy of Sonarr V3. To download these we will use the following commands:
mkdir /usr/local/share/download
cd /usr/local/share/download
fetch https://download.sonarr.tv/v3/phantom-develop/3.0.4.1033/Sonarr.phantom-develop.3.0.4.1033.linux.tar.gz -o /usr/local/share/download/
wget https://github.com/jailmanager/jailmanager.github.io/releases/download/v0.0.1/mono-6.8.0.105.txz

Install Mono Sonarr V3 and Mono

OK, now it’s time install both Mono and Sonarr. You can do so with the following commands:
cd /usr/local/share/download
pkg install -y mono-6.8.0.105.txz
ln -s /usr/local/bin/mono /usr/bin/mono
tar -xzvf /usr/local/share/download/Sonarr.phantom-develop.3.0.4.1033.linux.tar.gz -C /usr/local/share
mv /usr/local/share/Sonarr /usr/local/share/sonarr
mkdir /usr/local/etc/rc.d
nano /usr/local/etc/rc.d/sonarr

Paste the following into the file:

#!/bin/sh
# $FreeBSD$
#
# PROVIDE: sonarr
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# sonarr_enable: Set to YES to enable sonarr
# Default: NO
# sonarr_user: The user account used to run the sonarr daemon.
# This is optional, however do not specifically set this to an
# empty string as this will cause the daemon to run as root.
# Default: media
# sonarr_group: The group account used to run the sonarr daemon.
# This is optional, however do not specifically set this to an
# empty string as this will cause the daemon to run with group wheel.
# Default: media
# sonarr_data_dir: Directory where sonarr configuration
# data is stored.
# Default: /var/db/sonarr

. /etc/rc.subr

name=sonarr

rcvar=${name}_enable

load_rc_config $name

: ${sonarr_enable:=”NO”}

: ${sonarr_user:=”root”}

: ${sonarr_group:=”wheel”}

: ${sonarr_data_dir:=”/config”}

pidfile=”${sonarr_data_dir}/sonarr.pid”

command=”/usr/sbin/daemon”

procname=”/usr/local/bin/mono”

command_args=”-f ${procname} /usr/local/share/sonarr/Sonarr.exe –data=${sonarr_data_dir} –nobrowser”

start_precmd=sonarr_precmd

sonarr_precmd() {

if [ ! -d ${sonarr_data_dir} ]; then

install -d -o ${sonarr_user} -g ${sonarr_group} ${sonarr_data_dir}

fi

export XDG_CONFIG_HOME=${sonarr_data_dir}

}

run_rc_command “$1”

Due to the way the above displays on the website, several people have noted in the comments below that you may have to manually re-type all of the quotation marks (“) as they may not copy and paste across properly. I would also recommend using SSH to connect to your TrueNAS box, rather than the WebUI shell.

Now that that is done, fire off the following few commands to set securities and have Sonarr start when the jail boots:
chmod u+x /usr/local/etc/rc.d/sonarr
sysrc "sonarr_enable=YES"
service sonarr start

Done. Sonarr is up and running and will start each time the jail boots up.

Web Admin Config and Update

Alright, so to get up and running using your new Sonarr V3 installation, open the web admin portal by using a web browser and navigating to the local ip address of you jail (found by using the command ifconfig at the command prompt in the jail) followed by “:8989” (port 8989).

Your web interface will look something like this:

Sonnar V3 TrueNAS Install Setup
Sonnar V3 TrueNAS WebUI Admin

You can now begin the process of setting up Sonarr V3 to your liking. A few hints to help you along the way.

  1. You will need to disable certification. In the WebUI navigate to settings > general -> certificate validation -> disabled
  2. It’s almost certain the version you’ve downloaded from this guide is already out of date by the time you’ve read it. That’s alright. Once you’re on Sonarr V3, you can easily update to the latest version of Sonarr V3. You can do this through the web admin portal by navigating to systems -> updates

That’s it for this TrueNAS: Sonarr V3 Manual Install article! You should now be up and running with Sonarr V3! As always, thanks for those putting helpful comments for other below.

Happy Sonarrin’

~digiMoot

Sources:
https://www.reddit.com/r/sonarr/comments/eu8gi8/freenas_upgrade_sonarr_to_v3/
https://download.sonarr.tv/v3/phantom-develop/3.0.4.1033/Sonarr.phantom-develop.3.0.4.1033.linux.tar.gz

Liked it? Take a second to support digiMoot on Patreon!

24 thoughts on “TrueNAS: Sonarr V3 Manual Install

  1. Thanks for this wonderful tutorial. A belated Christmas present I suppose. I had a problem with starting the sonarr service with “service sonarr start”. This was due to copying and pasting your code into nano. I changed all the quote characters [“] in the code and that fixed the issue. I think it has something to do with your blog theme and the way it displays code. Happy Holidays!

      1. I also had to replace the [“] but also the [-] before the data and nobrowser got messed up too even though I used notepad and xfered it across. Weird.

  2. Hi there, wonderful tutorial. i was asking about to do this just a couple of days ago.
    i am having an entering the following command
    `tar -xzvf /usr/local/share/download/Sonarr.phantom-develop.3.0.3.644.linux.tar.gz -C /usr/local/share`
    “tar: Error opening archive: Failed to open ‘ /usr/local/share/download/sonarr.phantom-develop.3.0.3.644.linux.tar.gz”
    do you have any guidance on this?

  3. i think i have found something, not sure if it is the issue, but the fetch command for sonarr asks for a different version that you see:
    tar -xzvf /usr/local/share/download/Sonarr.phantom-develop.3.0.3.644.linux.tar.gz -C /usr/local/share`

  4. Really helpful guide everything is working with the exception of the restart function in the GUI.
    If I restart from the GUI I have to log into the shell and run service sonarr start

    Log file just shows the one line
    |Info|LifecycleService|Restart requested.

    Does exactly the same if restoring from a backup when it is due to restart the service just shuts down.

  5. Hi is anyone having an issue with running the “ln -s /usr/local/bin/mono /usr/bin/mono” command creating the symlink to the /usr/bin/ folder? I am getting this error:

    ln: /usr/bin/mono: Read-only file system

    If anyone has some insight I would GREATLY appreciate it!

    1. I figured it our if you are running version 12.2 of the jail you will get that error worked fine with jail version 12.1.

  6. Hello, I am having the same issue when I run “ln -s /usr/local/bin/mono /usr/bin/mono” ln: /usr/bin/mono: Read-only file system

  7. I can’t install mono-6.8.0.105.txz , it’s telling me I have a kernel version mismatch and I can’t find any info on a solution. How do I force it to ignore kernel version?
    Mine: 1103000
    Expected: 1104001

  8. First, this is an amazing tutorial, thank you.

    Anyone having this error? Jail on truenas 12 stable, jail is 12.2

    service sonarr start
    /usr/local/etc/rc.d/sonarr: ”/usr/local/bin/mono”: not found
    /usr/local/etc/rc.d/sonarr: unknown directive ‘“start”’.
    Usage: /usr/local/etc/rc.d/sonarr [fast|force|one|quiet](start|stop|restart|rcvar|enable|disable|delete|enabled|describe|extracommands|status|poll)

    I am assuming it is not starting, cause I cannot reach it in browser?

  9. Version 2 still works fine for me thought it would be nice to upgrade. I can get this to work with the version in the guide, however trying to use the latest version fails. Also I cannot get the service to auto start with the jail, I have sysrc “sonarr_enable=YES” set but have to type service sonarr start every time the jail starts. Also sonarr will not update it self. Any chance of getting an updated guide?

  10. Can’t get it started my error report:

    @transmission:~ # service sonarr start
    /usr/local/etc/rc.d/sonarr: ./etc/rc.subr: Permission denied
    /usr/local/etc/rc.d/sonarr: load_rc_config: not found

    I’m not sure whats up with the rc bit, perhaps it didn’t install correctly?
    Assistance would be appreciated!

      1. Your response beat me to it. I went back to square one and reaccomplished the 15th time worked like a charm!

        Thanks for getting back to me though!

Leave a Reply

Your email address will not be published. Required fields are marked *