Home Random Sh17cast Forums

Ubuntu: hellanzb for easy downloading from newsgroups

Saturday, December 1, 2007


This guide is written for Ubuntu or any debian-based distro of Linux; Mainly because I’m lazy and decided to use apt-get.
I’m also not going to explain newsgroups or .nzb files in general right now. I might write a follow-up for that later. I do however recommend the use of Giganews.

  • One: I get a small discount if you use my referral to sign up.
  • Two: It’s only $20 for the first month with unlimited download, 20 connections, and SSL.
  • Three: It’s the best usenet provider I’ve found so far and is able to max out my connection. Way faster than BitTorrent.

Update:   Astraweb is offering a special.    $11/mo for the life of your account.   I’ve been using them for several months with no complaints.    If you’re looking for the best deal, you may want to try Astraweb.

Hellanzb preview 1

What is HellaNZB?

Here’s a description straight from their website:

hellanzb is a Python application designed for *nix environments that retrieves nzb files and fully processes them. The goal being to make getting files from Usenet (e.g.: Giganews Newsgroups) as hands-free as possible. Once fully installed, all thats required is moving an nzb file to the queue directory. The rest; fetching, par-checking, un-raring, etc. is taken care of by hellanzb.

Installation of HellaNZB

  1. Open a terminal or connect to your server using SSH.
  2. Use apt-get to install the prereqs :
    sudo apt-get install rar unrar par2 python-dev python-twisted python-pyopenssl wget tar screen
  3. Download hellanzb and extract it. (Check the website to get the latest version)
    cd ~ ;
    wget http://www.hellanzb.com/distfiles/hellanzb-0.13.tar.gz ;
    tar xvf hellanzb*tar.gz ;
    cd hellanzb-0.13
  4. Install it (requires root access)
    sudo python setup.py install
  5. Copy the configuration file
    sudo cp /usr/etc/hellanzb.conf.sample /usr/etc/hellanzb.conf
  6. Edit the configuration file (replace vim with editor of choice)
    sudo vim /usr/etc/hellanzb.conf

    1. Make sure you configure the server information in the .conf file.  It’s pretty self explanatory and gives examples.
    2. If you’re planning to use SSL; make sure you enable the SSL option and change the port from 119 to 443.
    3. Set the PREFIX dir to something like /home/username/ or /mnt/storage/hellanzb/
  7. That’s it.  You can download a .nzb file and put it in PREFIX_DIR/nzb/daemon.queue/ and if hellanzb is running, it will automatically start processing the .nzb file and then download its contents.   Start hellanzb like this:
  8. Once it finishes downloading a file.  It’ll check to make sure it’s all there and repair it using PAR if it needs to, then unrar it and copy the extracted content to PREFIX_DIR/usenet. It’ll also delete the .rar and .par files once it’s done with them.

Make Hellanzb startup on boot as an init script

I found this init.d script on the ubuntu forums that basically starts hellanzb in a screen session at boot.

  1. Download my slightly modified init.d script
    wget https://www.thesh17.com/wp/wp-content/uploads/2007/12/hellanzb ;
  2. Copy and chmod the script
    sudo cp hellanzb /etc/init.d/hellanzb
    sudo chmod +x /etc/init.d/hellanzb
  3. Set it to run on boot
    sudo update-rc.d hellanzb defaults
  4. Edit the init.d script to run hellanzb as your user(IMPORTANT)
    sudo vim /etc/init.d/hellanzb

    1. Change HELLAUSER=yourusernametorunhellanzbas to reflect your username.
  5. Start hellanzb to see if it all worked
    sudo /etc/init.d/hellanzb start

Alternate Method to start on boot

If you get any errors. Just add this line inside /etc/rc.local and change $HELLAUSER to whatever your username is.

su -c '/usr/bin/screen -S hellanzb -d -m /usr/bin/python /usr/bin/hellanzb > /dev/null 2> /dev/null' $HELLAUSER

Now then.  You should be all set.  Just use SFTP or one of the web interfaces to hellanzb and download .nzb files into the queue folder.

Discover and Share
posted by johntash at 6:49 pm  


  1. Just an FYI, using the .deb installer on Ubuntu 8.10 server hellanzb is no called in the same manner ‘hellanzb.py”. I simply removed that section from the screen -S call to look like this:
    ‘su -c ‘/usr/bin/screen -S $NAME -d -m hellanzb > /dev/null 2> /dev/null’ $HELLAUSER’

    The error you get with the original script is ‘screen is terminating’ and nothing else…

    Thanks for the script, it works great with a slight mod 😛

    Comment by l1ltw1st — January 9, 2009 @ 10:50 am

  2. Awesome script. Nicely done!
    .-= Hank´s last blog ..DDWRT WPA2 AES Repeater Bridge Setup =-.

    Comment by Hank — July 6, 2009 @ 12:09 am

  3. Actually, there’s another slight issue – the screen starts in the foreground. I fixed that with the following line:

    su -c ‘/usr/bin/screen -d -m -S $NAME -d -m /usr/bin/python /usr/bin/hellanzb >/dev/null 2>&1’ $HELLAUSER

    The -d and -m switches to screen don’t attach the terminal to the screen that spawns. This is much more init-scripty. Cheers!
    .-= Hank´s last blog ..DDWRT WPA2 AES Repeater Bridge Setup =-.

    Comment by Hank — July 6, 2009 @ 12:12 am

  4. Thanks for the tip, hank! And l1ltw1st, I modified the post to take out the .py but never saved it. My bad.

    @hank: I was about to update the init script, but then I realized the -d and -m switches are already there 😉
    The command you posted lists them twice actually. They were after the -S switch

    Comment by johntash — July 16, 2009 @ 2:02 pm

  5. Hi, Thx for the great howto.

    But i have one problem and i hope you can help me. I connect to the Zussawebpage but i can´t upload all nzb files some work other don´t work. I get the error message Check permission on the directory. But the permission are correct because the other file works without any problems. Is there an file size limit because the file is 3 mb big, if i edit the file and remove some entries it works. New file size 800kb.

    Comment by Christian — July 22, 2009 @ 2:35 pm

  6. @Christian: I haven’t messed around much with Zussaweb, but you may need to change some php settings to increase the file upload size or something along those lines. Are you running this on your own server/computer or remotely? If there’s a file size limit, I’m assuming it’s due to how your php.ini is configured

    Comment by johntash — July 30, 2009 @ 12:00 am

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

31 queries. 0.123 seconds.
Copyright © 2007-2010 http://www.thesh17.com