This guide was written using FreeNAS i386 0.69 and VirtualBox 3.2.4 r62467. The steps involved should all work on the latest version of FreeNAS, but your mileage may vary.
This guide has been written for users with no knowledge of BSD and who don't have or necessarily know how to use SSH. If there is something in this guide that is unclear please correct it. This guide assumes you know what Sabnzbd is. If not, why are you trying to install it?
You will need about 500MB free on the OS partition (
/) as the Python install requires around 500MB of temporary disk space. The final usage after this procedure will be about 150MB. You will also need your FreeNAS server configured with a static IP (not DHCP) to use Sabnzbd.
1. Install the following packages. In the Web GUI go to System → Packages and click the
+. Add each of the listed packages using the interface here. Because of their dependencies you will need to add them in the order below. An archive of all the required packages can be downloaded here.1) If the addition of a package is successful you should see something like the image on the right.
2. Create a new user to run Sabnzbd. It's a security risk to run Sabnzbd as root, which is what most tutorials advise you to do. Using the Web GUI go to Access → Users and Groups and add a new user called sabuser. Set their primary group as admin, home directory as
/home/sabuserand check give full shell access to user. Make sure you click the Apply Changes button after this to create the user.
3. Allow the new user to write to the temporary directory. When you upload an NZB file via the web interface, Sabnzbd saves the NZB to
/tmpwhile working with it. Using the Web GUI go to Advanced → Command. Enter
chmod o+w /tmpand click the Execute button. If all goes well this command will return nothing.
4. Run Sabnzbd once to generate the configuration settings. Using the Web GUI go to Advanced → Command. Enter the command
su - sabuser -c "/usr/local/bin/SABnzbd.py -d -f /home/sabuser/.sabnzbd/sabnzbd.ini". This should return nothing as shown below.
Now we need to stop the Sabnzbd process that's running in the background. Using the command interface run the command
ps aux | grep sabuserand note the process ID in the second field on the line beginning with sabuser.
Next run the command
kill pid, replacing pid with the ID you noted in the output of
ps aux | grep sabuser. If all goes well this will return nothing.
5. Edit the Sabnzbd configuration file to insert your server's IP. Using the Web GUI go to Advanced → File Editor and load the file
/home/sabuser/.sabnzbd/sabnzbd.ini. Locate the line the reads ”
host = localhost” and change this to read ”
host = IP” where IP is your server's IP address. In my example, my server is 10.2.64.251. Click the Save button after you have made this change.
6. Add a PostInit command to start Sabnzbd. Using the Web GUI go to System → Advanced → Command Scripts. Add a PostInit command that does
su - sabuser -c "/usr/local/bin/SABnzbd.py -d -f /home/sabuser/.sabnzbd/sabnzbd.ini"as shown in the screenshot.2)
7. Start Sabnzbd. To do this you can either restart your FreeNAS server (which will trigger the PostInit command) or go to Advanced → Command and execute
su - sabuser -c "/usr/local/bin/SABnzbd.py -d -f /home/sabuser/.sabnzbd/sabnzbd.ini"again.
And you're done! You can access the web interface for Sabnzbd at http://IP:8080/sabnzbd where IP is your server's IP address. You can make any other changes to the Sabnzbd configuration through this interface.