How to Install Sonarr on Ubuntu Server Latest

Sonarr is a tool used for automating and organizing TV show downloads. It simplifies the search and download process and provides a user-friendly interface for keeping track of your favourite TV shows. Sonarr runs on Windows, macOS, Linux and Docker.

In this tutorial, we will be demonstrating how to install Sonarr on an Ubuntu Server Latest. Here are the simple steps you need to follow:

Step 1: Update the Server

Before we proceed with the installation, we need to make sure that we are working with the latest version of the Ubuntu Server.

sudo apt-get update
sudo apt-get upgrade

Step 2: Install Mono

Sonarr requires the .NET Framework to run. Installing Mono, a run-time environment that is compatible with .NET, will allow Sonarr to run on the Ubuntu Server.

sudo apt-get install mono-complete

Step 3: Add the Sonarr Repository

To install Sonarr, we need to add the Sonarr repository to Ubuntu. Open the terminal and type the following command:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0xA236C58F409091A18ACA53CBEBFF6B99D9B78493
sudo echo "deb http://download.sonarr.tv/apt/debian master main" | sudo tee /etc/apt/sources.list.d/sonarr.list

Step 4: Update the System and Install Sonarr

After adding the Sonarr repository to Ubuntu, we need to update the system and install Sonarr by running the following command:

sudo apt-get update
sudo apt-get install nzbdrone

Step 5: Start Sonarr

The installation is now complete, and to start Sonarr, run the following command:

mono --debug /opt/NzbDrone/NzbDrone.exe

Step 6: Open Sonarr on Your Web Browser

Once Sonarr has started, open your web browser and type in http://localhost:8989 in the address bar. This will take you to the Sonarr interface, where you can add your favorite TV shows and start downloading.

Step 7: Run Sonarr on Startup

If you want Sonarr to start automatically every time your Ubuntu Server starts, then you need to create a startup script in the /etc/init.d/ directory:

sudo nano /etc/init.d/sonarr

Copy and paste the following code:

#!/bin/sh
### BEGIN INIT INFO
# Provides:          sonarr
# Required-Start:    $local_fs $remote_fs $network $syslog
# Required-Stop:     $local_fs $remote_fs $network $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Starts Sonarr daemon
# Description:       Starts the Sonarr daemon
### END INIT INFO
 
case $1 in
  start)
    echo "Starting Sonarr"
    sudo -u username mono /opt/NzbDrone/NzbDrone.exe
    ;;
  stop)
    echo "Stopping Sonarr"
    sudo killall mono
    ;;
  *)
    echo "Usage: /etc/init.d/sonarr {start|stop}"
    exit 1
    ;;
esac
exit 0

Replace "username" with your Ubuntu username. Save the file and make it executable.

sudo chmod +x /etc/init.d/sonarr

Finally, run the following command to update the system and enable Sonarr to start on boot:

sudo update-rc.d sonarr defaults

Conclusion

By following these simple steps, you can easily install and set up Sonarr on an Ubuntu Server Latest. Once it's up and running, you can use the user-friendly web interface and automate the download and organization of your favorite TV shows. Happy streaming!

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!