Tutorial: How to Install Sonarr on FreeBSD Latest
Sonarr is an open-source application that allows you to manage and download your TV shows automatically. In this tutorial, we will guide you on installing Sonarr on FreeBSD Latest.
Prerequisites
- A FreeBSD Latest server
- A sudo user
- A stable internet connection
Step 1: Update Packages and Install Dependencies
First, update the package repository of your server by running the following command:
sudo pkg update
After that, install the necessary packages and dependencies that Sonarr requires:
sudo pkg install -y mediainfo sqlite3 mono python
Step 2: Configure Firewall
Sonarr listens on port 8989 by default. Therefore, you need to allow incoming traffic for this port. You can do it by using the pf firewall.
Add the following rule to the /etc/pf.conf file:
pass in on $ext_if proto tcp from any to any port 8989
Then, reload the pf rules by running:
sudo pfctl -f /etc/pf.conf
Step 3: Download and Install Sonarr
Create a new directory where you will download Sonarr with the command:
sudo mkdir /opt/Sonarr
Download the latest version of Sonarr by executing:
sudo fetch https://download.sonarr.tv/v3/main/latest/NzbDrone.master.latest.linux.tar.gz -o /opt/Sonarr/NzbDrone.tar.gz
Extract the downloaded archive with:
sudo tar xfz /opt/Sonarr/NzbDrone.tar.gz -C /opt/Sonarr
Change the owner of the extracted files to your sudo user:
sudo chown -R your_sudo_user:wheel /opt/Sonarr/
Step 4: Test and Run Sonarr
Before running & testing Sonarr daemon, create a new dataset folder for storing files such as TV Shows.
sudo mkdir /mnt/Sonarr
sudo chown -R your_sudo_user:wheel /mnt/Sonarr
Start the Sonarr daemon for the first time :
mono /opt/Sonarr/NzbDrone.exe
In order to run Sonarr automatically, create a system-level service. Run these commands into the terminal:
sudo echo '#! /bin/sh' > /usr/local/etc/rc.d/sonarr
sudo echo 'mono /opt/Sonarr/NzbDrone.exe' >> /usr/local/etc/rc.d/sonarr
sudo chmod 555 /usr/local/etc/rc.d/sonarr
Finally, enable Sonarr to run automatically at boot time:
sudo sysrc sonarr_enable=YES
Conclusion
That's it! You have successfully installed Sonarr on FreeBSD Latest. You can now access the Sonarr web interface by pointing your web browser to http://your_server_ip:8989. Start adding and managing your TV show library with ease.