Get your NAS fully automated with SABnzbd

Alright. Time to go old-school (unfortunately). I promise this will be one of the few overly complicated posts I’ll ever write here – but in order to install the Usenet clientSABnzbd on our NAS this is what we need to go through. This is what Linux is like – amazingly user-friendly. Bah, in terms of usability you should only consider Linux when there are no alternatives, at least if you want a simple life. However, as long as you can copy paste this should be perfectly ok and easy enough. So without further ado, here goes SABnzbd part 2, installing it on a ReadyNAS. And remember Ford Prefect in the Hitchiker’s Guide to the Galaxy: Don’t Panic.

First off, dealing with a Netgear NAS a useful tool for your computer is going to be the Netgear RAIDar. With it you will be able to see all ReadyNAS devices on your network, and you can use it to launch the ReadyNAS FrontView (if you can’t find it from your browser). As an owner of a ReadyNAS you may already have the Netgear RAIDar and/or know how to get to the FrontView but if not I suggest you download the RAIDar and practice by finding your NAS on the network, open the NAS FrontView and change your admin password.

Secondly we need to prepare the ReadyNAS for SABnzbd by first installing a couple of things aswell as activating some additional features. But let’s start with instructions as to how to install a BIN file on your NAS. Open the FrontView, go to System, click Update and browse for your downloaded bin file you wish to install. Perform the system update, and the feature is installed on your NAS (see screenshots below).

IMPORTANT! Verify that the BIN file you have downloaded is actually for your model of ReadyNAS (let’s say you have a Duo, or an NV+). Just like when building stuff – measure twice, cut once. And again Google will help you solve problems like this.

Now that you know how to install BINs let’s look at what you need to be able to actually install stuff. First off you need to enable SSH (Secure Shell) on your NAS which is done through the ToggleSSH addon. SSH is off by default on your NAS and you need to activate it.

So, go here and click the link for your ReadyNAS model and firmware (called RAIDiator), scroll down to ToggleSSH and download it. Install the BIN as described above.

Moving on, not only do you need SSH you also need root access on your NAS. This is done through the addon EnableRootSSH. If that is to technical for you, imagine it like rooting your Android smartphone, or jailbreaking your iPhone – almost the same thing. Download the correct BIN file for the EnableRootSSH add-on for your ReadyNAS device and install it from the FrontView using the above procedure.

Go here and click the link for your ReadyNAS model and firmware (called RAIDiator), scroll down to EnableRootSSH and download it. Install the addon on your NAS.

With the EnableRootSSH add-on you can now remote login to the ReadyNAS RAIDiator shell as a root user. Initial password for root will be the same as the current FrontView admin password. Please keep in mind that NETGEAR may deny support if you’ve enabled root access (ah yes… whatever). In not so technical terms this means you can now login to your NAS and have full access to everything. Let’s get back to that in a bit.

Another BIN we need to install is the APT – Advanced Packaging Tool – which is a fancy word for a Linux tool to make installations easier. This is infact the tool you will use to install SABnzbd on your NAS. So find and download the APT BIN from the internet and upload it through the FrontView. You will now be able to run the standard command ‘apt-get‘ to download and install packages for everything you need.

Again, go here and click the link for your ReadyNAS model and firmware (called RAIDiator), scroll down to APT, download and install on your NAS.

Ok, so thirdly – it is now time to put all of this together and start running commands on your ReadyNAS to install SABnzbd, our Usenet client of choice. You will need to SSH into your NAS so that you can type and run commands in a terminal window. Easiest way to do this is to download and start Putty. The user will be ‘root’ and the password the same as your admin password to the FrontView. The address will be the network IP of your NAS (for example obtained with RAIDar). Once you have the session up and running it will look like a standard command line promtp, and it’s time to run some commands.

Please note that some packages that you get using the wget command may not be tye latest available builds. This here will work for you, but if you want the latest packages just google for versions and replace the http-syntax below with the appropriate addresses.

1. Run commands
apt-get update
apt-get install libc6-dev
apt-get install gcc
apt-get install libtag1-dev
apt-get install uuid-dev
2. Prepare directory
mkdir /root/src
cd /root/src
3. Run commands
apt-get install unrar unzip
apt-get install par2 parchive
apt-get install gpp
apt-get install libssl-dev
apt-get install zlibc
apt-get install zlib1g-dev
4. Install Python 2.5
gzip -d Python-2.5.4.tgz
tar xf Python-2.5.4.tar
cd Python-2.5.4
./configure –build=sparc-linux
make -i install
cd ..
5. Install pysqlite
gzip -d -f pysqlite-2.5.6.tar.gz
tar xf pysqlite-2.5.6.tar
cd pysqlite-2.5.6
python build_static install
6. Configure Python to have an alias for sqlite3
from pysqlite2 import dbapi2 as sqlite3
cd ..
7. Install Cheetah 2.0.1
gzip –d Cheetah-2.0.1.tar.gz
tar xf Cheetah-2.0.1.tar
cd Cheetah-2.0.1
python2.5 install
cd ..
8. Install yenc
gzip –d yenc-0.3.tar.gz
tar xf yenc-0.3.tar
cd yenc-0.3
python2.5 install
cd ..
9. Install feedparser
mkdir feedparser-4.1
cd feedparser-4.1
unzip ../
python2.5 install
cd ..
10. Install pyOpenSSL-0.9
tar xvzf pyOpenSSL-0.9.tar.gz
cd pyOpenSSL-0.9
python2.5 install
cd ..
11. Install SABnzbd 0.5.2
gzip –d SABnzbd-0.5.2-src.tar.gz
tar xf SABnzbd-0.5.2-src.tar
cd SABnzbd-0.5.2
python2.5 –OO -v
cd ..
12. Create the script file /etc/init.d/sabnzbd
vi /etc/init.d/sabnzbd
press “i” (to go to edit mode)
enter the file as below:
Make sure you change the 192.168.x.x address to match your ReadyNAS IP.
case "$1" in
echo "Starting SABnzbd."
/usr/local/bin/python2.5 /root/src/SABnzbd-0.5.0Beta4/ -d -f /etc/SABnzbd/sabnzbd.ini
echo "Shutting down SABnzbd."
/usr/bin/wget -q --delete-after "http://192.168.x.x:7777/sabnzbd/api?mode=shutdown"
echo "Usage: $0 {start|stop}"
exit 1
exit 0
Press “Esc” (to exit edit mode)
Press “:wq” (to write the file and exit)
13. Add the script on startup
cd /etc/rc3.d/
ln -s /etc/init.d/sabnzbd S05sabnzbd
cd /etc/init.d/
chmod +x sabnzbd
./sabnzbd start
Sabnzbd should start fine return you to prompt with no errors.
14. Final steps
./sabnzbd stop

vi /etc/SABnzbd/sabnzbd.ini
This will start the Vi editor (same as above) – use “i” and “esc” to enter/exit edit mode, and “:wq” to save and quit
Add host IP – the IP of your NAS to the file
Change port if necessary – if say 8080 is already being used
Save the file. Note that these settings may vary depending on how you have setup your home network, your router, where you wish to access the web-gui, and so on. If you’ve got this far I’ll assume you’re savvy enough to fiddle with this yourself.
Finally start SABnzbd again.
./sabnzbd start

Using a browser open the IP address and port specified in the .ini config file, and there you have it. SABnzbd installed and ready for use.


13 thoughts on “Get your NAS fully automated with SABnzbd

    • Yes, in theory it should apply. Never worked with the x86 models so I can’t tell, but as long as you can access debian via ssh you should be able to apt-get install. Make sure you download the x86 versions of the addons (and not sparc), like enablerootssh. If you want a sabnzbd “proper addon” and don’t mind paying a dollar or two for it, you can get it from here (again different addons for pro/ultra/nvx than for example the duo).

      • Yes, after some further checking the x86 ReadyNAS should come pre-installed with APT, which means you need only to get root access via ssh and then go for it.

  1. very helpful! just got 0.7.3 installed on my readynas after waiting a few weeks for an official readynasxtra version to be released!

    FYI adding ln -s /etc/init.d/sabnzbd S05sabnzbd didnt seem to work for me. Used update-rc.d and sab starts/stops on boot now 🙂

  2. I have the Readynas Ultra, I followed steps 1,2 and 3 then installed Python2.7_2.7.3-rnx86-1.0.1.bin ( which includes Cheetah, Yenc, feedparser and openSSL) via frontview addons. Then installed SABnzbd_0.7.1-rnx86-0.7.4.bin again via frontview addons and all working perfect. How I don’t know, as I didn’t have a clue what I was doing, but I would not have attempted it if it was not for the above so thanks.

  3. Does this guide still work?
    I have tried it on my Readynas ultra 2 and seems like it can’t find the package

    • Not sure the packages would be exactly the same on newer platforms. If it is linux based however, it should be something like this.

      But you have bigger problems. There are no indexing sites that you can plugin anymore, even if you installed sabnzbd you wouldn’t be able to hook it up to anything.

  4. everything was going well (using new version of python, pysqlite), until I tried to run the pysqlite install.

    nas-EA-8B-F6:~/src/pysqlite-2.6.3# python build_static install
    running build_static
    running build_py
    running build_ext
    building ‘pysqlite2._sqlite’ extension
    gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DMODULE_NAME=”pysqlite2.dbapi2″ -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -I/usr/local/include/python2.7 -c src/module.c -o build/temp.linux-x86_64-2.7/src/module.o
    gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DMODULE_NAME=”pysqlite2.dbapi2″ -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -I/usr/local/include/python2.7 -c src/connection.c -o build/temp.linux-x86_64-2.7/src/connection.o
    gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DMODULE_NAME=”pysqlite2.dbapi2″ -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -I/usr/local/include/python2.7 -c src/cursor.c -o build/temp.linux-x86_64-2.7/src/cursor.o
    gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DMODULE_NAME=”pysqlite2.dbapi2″ -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -I/usr/local/include/python2.7 -c src/cache.c -o build/temp.linux-x86_64-2.7/src/cache.o
    gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DMODULE_NAME=”pysqlite2.dbapi2″ -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -I/usr/local/include/python2.7 -c src/microprotocols.c -o build/temp.linux-x86_64-2.7/src/microprotocols.o
    gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DMODULE_NAME=”pysqlite2.dbapi2″ -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -I/usr/local/include/python2.7 -c src/prepare_protocol.c -o build/temp.linux-x86_64-2.7/src/prepare_protocol.o
    gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DMODULE_NAME=”pysqlite2.dbapi2″ -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -I/usr/local/include/python2.7 -c src/statement.c -o build/temp.linux-x86_64-2.7/src/statement.o
    gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DMODULE_NAME=”pysqlite2.dbapi2″ -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -I/usr/local/include/python2.7 -c src/util.c -o build/temp.linux-x86_64-2.7/src/util.o
    gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DMODULE_NAME=”pysqlite2.dbapi2″ -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -I/usr/local/include/python2.7 -c src/row.c -o build/temp.linux-x86_64-2.7/src/row.o
    gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DMODULE_NAME=”pysqlite2.dbapi2″ -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -I/usr/local/include/python2.7 -c sqlite3.c -o build/temp.linux-x86_64-2.7/sqlite3.o
    gcc: sqlite3.c: No such file or directory
    gcc: no input files
    error: command ‘gcc’ failed with exit status 1

    Any thoughts?

    • I wouldn’t know, I’m not a linux person. I tend to google linux errors and try to troubleshoot fromthere.

      That said, I have to ask… why are you installing SABnzbd on your NAS? The index sites are mostly gone, newzbin and nzb matrix are gone, and with them any integration with SABnzbd. No more bookmark auto download. Essentially what you are doing to your NAS is like installing a new engine in a car that has no wheels. Unless I’m missing something there is no point?

      • first off thanks for the quick reply, I think I might be in the clear, as best I can tell, pysql is now include with python, I’ll know fairly soon.

        if you have my email, shoot me a note, I have a working setup if you are interested

      • Great! What index site do you use?

        SABnzbd is a newsreader, I was merely arguing the point of having it on the NAS when there is nothing really to connect it to…

  5. Hi bratnerd,

    I am using spotnet and get my nzb from there, is this okay to use on SABnzbd?

    I would be interested in the working setup of Jason.

    Could you send it to me since i do not have his e-mail adres

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s