Raspberry Pi Usenet SickBeard Sabnzbd
Raspberry Pi - Newsgroups / Usenet, SickBeard, Headphones and Sabnzbd.
With the ever increasing cost of electricity I decided a few months ago that I wanted to only have one NAS running. I currently have two NAS (or Servers) running 24 hours a day 7 days a week 365 days a year.
But recently I discovered that I only need one NAS running and the Raspberry Pi could easily run what I want it to, with a fraction of the power consumed, so over the Christmas period I finally got around to setting up the Pi with the programs I want.
A little background as to why I have 2 servers running.
I bought a Readynas NV+ back in 2011 to serve my files, movies, tv shows, music, documents, backups and whatever else I needed it for, I had it running Sick Beard (the amazingly good TV series/season tracker), this ran ok on the box but was a little sluggish and when it was serving movies via DLNA (the Readynas uses miniDLNA) to my TV, it would sometimes grind to a halt and require reboots etc...
As we all know, reboots and grinding to a halt on any computer or NAS that has RAID arrays is not good, you risk the chance of losing data! Not good at all, that's the whole reason I got a 4 bay NAS, to protect my data and decided enough was enough and saw that HP had the N40L bare bones servers for sale for £200 each with £100 cashback! So a dual core server with 2Gb Ram, nice little case and PSU and 250Gb Hard drive for £100 quid, a bargain, so I bought 2.
I also bought 4 x 2Tb hard drives to act as the NAS storage and another 2.5" hard drive to boot from and store the operating system on. As the server has 4 external USB ports and 1 internal, it also has 5 SATA ports.
I actually needed 6 SATA ports, one for each of the 4 Raid drives, 1 for the 2.5" boot drive and 1 for the DVD/CD drive (or ODD drive - Optical Disk Drive)* so I bought a USB to Sata convertor, this was plugged in to the internal motherboard USB port. I did not want a cable coming from inside the unit to the back/front USB, this would looks stupid and could get damaged easily. This works really well.
* I have to mention this because at the time I was reading up on the layout of the system, I read that people on the forums were saying "HP had left some ODD screws in the N40L server's front door", people said that these were "odd screws". ODD means Optical Disk Drive. You screw these into the side of CD/DVD drive and they act as a runner so you can slide the drive in and out of the case. Can you think of a manufacturer actually giving you a few odd extra screws for nothing? Its like saying "before you seal up the box, lets throw a handful of screws in".
The N40L was to run Windows 2008 R2 with WAMP (Windows Apache MySQL and PHP). On this I ran NewzNab, an amazing program written in PHP that spiders and indexes the Newsgroups, collecting Movie, Music, TV Shows information and displaying it nicely with images and descriptions and ratings. Excellent! You could also setup SickBeard, Headphones and Sabnzbd to use it to find its sources. I love automation, once it was setup and running, it was great, not the fastest setup in the world but it worked well.
The thing was this server was running the programs and was connected to my previously mentioned ReadyNAS, so all files were downloaded into a temporary directory on the N40L, then once complete, repaired and unachieved it was copied to the ReadyNAS where it was indexed by the minidlna ready to be served up on my TV.Save money
So I realised that having all these disks spinning 24/7 is not good, yes you can setup profiled to save power by spinning down the disks if there is no activity or between 1am and 7am , spindown, but this is not ideal when running Raid arrays, I do have UPS battery backups, but it still uses power.Raspberry Pi - Headless
This is a nice little PC, I have it running Raspian, its small, fast and lots of potential and very low powered. You can run it on a mobile phone charger outputting 5volts at 700mA. Going back to my instrumentation training, this works out to only: 2 watts of power consumed.
Looking to the HP N40L Micro Server (also headless) I was using, this was using around 70watts. This is still a small amount of power and this includes the 5 spinning hard drives inside.
I have to mention that I have a USB pen drive mounted and configured with the correct ownership settings, this is only used as temporary storage as I wanted to reduce the read/writes to the SD card to preserve longevity of the card as it takes longer to setup and rebuild the SD card than it does to unplug a knackered USB and plug a new empty memory stick back in.
I have added the following software to the Raspberry Pi:
- SickBeard - Installed with Via Git
- Headphones - Installed with Git
- Sabnzbd - Installed with apt-get
- Par - Parity checker and repair tool
- UnRar - Need to un-archive the downloaded files
- Git - So I can download and update versions
- Python - Lots of software is written in Python
- CSF & LFD - Love this, great intrusion detection / firewall software.
- Sendmail - So the Pi can send me email reports and errors
I use Sendmail to rely through the mail through my SMTP mail host.
This is a handy how-to page: http://iqjar.com/jar/sending-emails-from-the-raspberry-pi/
There are some other bits and pieces that have also been installed, like libraries, Perl and others.
The load of the Pi when idling sits around: 0.15 | 0.11 | 0.13
When Sabnzbd is downloading, the load sits around 1.0 and when checking, repairing and unraring the load can peak up to 4.0. I have set Sabnzbd to pause the download while performing the said tasks.
I have also forced the Pi to run at 800Mhz, so moderate overclocking.
The Pi does have a heatsink on the main chip (RAM and CPU), the USB/Ethernet chip and the voltage regulator to counteract the overclocking and help make the chips last longer. I got these for free when I bought a plastic case for the Pi on eBay.
I have also opened a port in my modem so I can access the Pi from outside of my home network, to do this it should be noted that I have done the following:
- Removed the default "pi" login that is setup automatically in Raspian
- CHANGE YOUR PASSWORD using: pi$: passwd
Make sure to enter your current password first, then you enter your new password.
- I am using a non-standard SSH port to access the Pi
- Installed CSF (Config Server and Firewall) and configured
- Setup and configured LFD to allow certain IP addresses and ports for the news servers I use.
The only problem I encountered was when I installed CSF/LFD, SickBeard worked well, found a TV show, sent it to Sabnzbd, Sabnzbd downloaded the NZB file, created the directories on the USB stick all looked good, but it would not download anything. The Log files were empty, I could not see any issues anywhere, all looked good, but it just sat there, not downloading. I initially thought of USB read/write permissions but this was not the case. Fortunately I had installed Sendmail and set CSF/LFD to email me when and issue was detected, eventually I got an email from LFD saying that Sabnzbd was trying to connect to an external IP address on a certain port. This was an easy fix, just edited the correct files: /etc/csf/csf.allow add IP addresses and /etc/csf/csf.pignore add the program name here to stop the shower of emails from LDF. Also don't forget to open the ports for your programs, I use port 1111 for Sabnzbd, port 2222 for SickBeard and port 3333 for Headphones, so open these. I now access the web interface using: http://pi:1111 for example. I set the hostname to "pi", by default it is "raspberrypi", this should be accessible across your entire home network using this hostname "pi" as is mine.
If you would like more information, feel free to drop us an email or if you have any questions, let us know.
Also, if you would like us to setup this for you, we can do that also. Get in touch.