NZBGet

From NAS-Central Zyxel Wiki
Jump to: navigation, search

What it is

This is about installing NZBGet on a Medion Life P89626/P89630 aka NSA-212 (and possibly others).

I found NZBGet much faster than SABnzdb.

Installation Steps

Prerequisite: Get a working FFP-stick

See FFP-stick#How_to_install for the installation. FFP 0.7 works fine.

Note that the initial installation can take quite some time (30 mins). Reboot after it's finished.

You can check that it's done by telnet'ing into your NAS:

telnet nas-server

Once it's up, you should install and start SSH, and disable Telnet.

Download and install required packages

I use uwsiteloader to set up the package sources:

ssh root@nas-server
cd /home/root
wget http://wolf-u.li/u/441 -O /ffp/bin/uwsiteloader.sh
chmod a+x /ffp/bin/uwsiteloader.sh
uwsiteloader.sh

Select all sites. (Use up, down, tab, spacebar) Select yes when asked to update the list.

Use Slacker to install the packages:

slacker -i

Select those packages:

  • memiks:libsigc++
  • memiks:nzbget-0.8.0
  • memiks:par
  • memiks:par2cmdline
  • memiks:unrar
  • memiks:libxml2-2.9.1
  • memiks:libpar2-0.3

Configuration

Decide on those directories:

  • Configuration: I use /i-data/md0/thowi/nzbget/
  • Downloads: I use /i-data/md0/data/downloads/

Make sure those directories exist and are readable and writable by everybody. You may also want to set the permissions to 777 so that all users can read and write the downloaded files.

nzbget.conf

  • Copy /ffp/etc/nzbget.conf.example to your config dir.
  • Adjust all the paths at the beginning of the file,
  • Add your servers.
DaemonUserName=nobody
AppendCategoryDir=No
Server
ServerIp=0.0.0.0
ServerPort=XXXX
ServerPassword=XXXXXX
Performance tips
  • Don't use SSL, it eats CPU.
  • Don't use too many server connections, it might actually slow things down. I use 8.
# Faster writes.
DirectWrite=yes
WriteBufferSize=-1
# Faster timeouts.
ConnectionTimeout=10
# PAR check in the postprocess script. The NAS is too slow to do that in parallel anyway.
ParCheck=no
NzbCleanupDisk=yes
# Only log important stuff.
WarningTarget=none
InfoTarget=none
DetailTarget=none
DebugTarget=none
ProcessLogKind=detail
OutputMode=colored

If you have performance problems, or even notice the whole NAS to slow down, run top on the terminal and have a look at %id (CPU % idle) and %wa (CPU % waiting on I/O, i.e. disk read/write). While just downloading, the CPU should be at least 10% idle, and there should not be more than 20% I/O wait. When postprocessing/unpacking there might be more utilization, but you cannot do much about that. I recommend reducing the number of connections when the CPU is overloaded.

Postprocessing (e.g. unrar)
  • Copy /ffp/share/doc/nzbget/postprocess-example.conf and postprocess-example.sh to your config directory.
  • Adjust postprocess-example.conf to your needs. I just do Unrar and DeleteRarFiles.

In your nzbget.conf set:

PostProcess=XXXX-PATH/TO/YOUR-XXXX/postprocess.sh
# Don't download and postprocess at the same time. The NAS is too slow to do that in parallel.
PostPauseQueue=yes

Startup

For a test drive you can run:

/ffp/bin/nzbget -s -c /PATH/TO/YOUR/nzbget.conf

I use the NZBGet Chrome WebApp and Extension to connect to NABGet.

You can quit NZBGet by hitting Ctrl-C in the terminal.

Automatic startup on boot

Create a file /ffp/start/nzbget.sh with this content (adapt to your paths!):

#!/ffp/bin/sh

# PROVIDE: nzbget
# REQUIRE: LOGIN

/ffp/bin/nzbget -D -c /PATH/TO/YOUR/nzbget.conf

Make it executable:

chmod u+x /ffp/start/nzbget.sh

Speed

Without SSL I get ~5.5MB/sec, pretty much maxing out my connection.