This page describes how to install NZBget on a Synology how-to NAS DSM 3.2, with NZBget you download content based on NZB files. Of sure you can use the precompiled SABnzbd package, but this package is know to be slow and not able to fill up the complete download speed of your ISP. With NZBget I can download @full 40Mbit line speed without a glitch.
Be sure your NAS is bootstrapped and you can run IPKG, more information could be found here.
Install the tools
- ipkg update
- ipkg install nzbget
- ipkg install nano (this is a easy config file editor, better usability than VI)
Copy the sample config file to the destination directory:
Now we need to change the config file with the correct parameters, please determine first where you want to locate the NZB files (like downloads and web GUI) i have chosen for /volume1/downloads/nzbget
# User name to use for authentication.
# Password to use for authentication.
# Maximal number of simultaneous connections to this server (0-999).
You should be able to start NZBget now via the terminal (note: web GUI not installed right now)
Your folder /volume1/downloads/nzbget should contain the following sub folders
“nzb” where the NZB files are uploaded via the web GUI or by automatic folder monitoring
“tmp” for NZBGET processes
“queue” for NZBGET processes
Check if everything is running, you can copy a (small) NZB file to the NZB dir and see if the server started downloading.
DiskStation> nzbget -L F
Server has no files queued for download
Current download rate: 0.0 KB/s
Session download rate: 4327.4 KB/s
Up time: 112:25:57
Download time: 01:17:46
Downloaded: 19718.46 MB
Threads running: 4
Server state: Stand-By
DiskStation> nzbget -s
Opens a console where you can see if the server is downloading, please note that you get always the error ERROR Binding socket failed for 127.0.0.1: ErrNo 98, Address already in use, because you started nzbget -D in deamon mode.
DiskStation> nzbget -Q
Stops the nzbget process
We just installed NZBget the download tool, but we like to extract (RAR) the downloaded content and if needed also PAR the files, therefore is a postscript needed. I use the default post processing script and it behave well for normal downloading.
The default post processing is already included in the nzbget download copy the files to the right location.
cp /opt/share/doc/nzbget/postprocess-example.sh /opt/sbin/postprocess.sh
cp /opt/share/doc/nzbget/postprocess-example.conf /opt/etc/postprocess.conf
nano /opt/etc/nzbget.conf and edit the following lines to specify where the post process.sh script could be found. Note that the postprocess config file is not referenced, this will be done via the nzbgetWEB gui.
Nzbget WEB interface installation
Download the nzbgetWEB interface from this link, this file contains web php-files should be placed in the web directory. Extract this files to /volume1/web/nzbgetweb after that you should be able to browse to http://<nasip>/nzbgetweb and see a website from nzbgetweb which contains a few errors.
Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/volume1/public/nzbget/dst) is not within the allowed path(s): in /volume1/web/nzbgetweb/functions.php on line 337
Notice: Directory /volume1/public/nzbget/dst does not exist. Check option “CheckSpaceDir” in /volume1/web/nzbgetweb/functions.php on line 338
Lets fix these errors and check the web server settings, login to the NAS via the normal DSM manager and open web-services check if enable web station is checked
We need to edit the open_basedir to allow nzbgetweb writing files (config and nzb uploads) check if the checkboxes are configured the same a in the picture below and add the following to the open_basedir line.
Add the following lines at the end, pay attention the “:” :/volume1/downloads/nzbget
All errors should be solved now, if you have still errors for some reason sometimes nzbget only works if you give them full rights (chmod 777) to the underlaying directories. Please try if this solves your errors:
chmod -R 777 /volume1/downloads/nzbget/nzb
chmod -R 777 /volume1/downloads/nzbget/queue
chmod -R 777 /volume1/downloads/nzbget/tmp
Now we should be able to open up the web server and access nzbget by http://<nasip>/nzbget
We only need to add a few configuration details under COMMUNICATION WITH NZBGET-SERVER
ServerStartCommand: /opt/bin/nzbget -D -c /opt/etc/nzbget.conf 2>&1
ServerStopCommand: /opt/bin/nzbget -Q -c /opt/etc/nzbget.conf 2>&1
NzbDir : /volume1/downloads/nzbget/nzb
We only need to add a few configuration details under COMMUNICATION OF POSTPROCESSING-SCRIPT
We only need to add a few configuration details under LOGIN-SCREEN
If you like you can set a username and password.
We only need to add a few configuration details under DISPLAY
We only need to add a few configuration details under INCOMMING NZBS
You can add config details for auto folder watching. If you download a lot of NZB files at the same time you can drop them in to the /volume1/downloads/nzbget/nzb directory where they would be automatically loaded. Please note that this “scan” does not allow your NAS to go in sleep mode. If you like to go your NAS into sleep mode, please refer to a attached USB stick where you will read the files from. The path where the USB stick is located should be added to the open_basedir config otherwise you will not be able to upload NZB files by the http GUI upload button.
NzbDirInterval= 0 disabled or 60 seconds to scan the DIR every minute.
We only need to add a few configuration details under POSTPROCESSING
/opt/sbin/postprocess.sh (should be already there from previous steps)
Start nzbget -D automatically after each reboot of your NAS
nano /opt/etc/init.d/S99nzbget.sh and past the following content into this file and press ctrl-o for writing
If you’re not able to upload the files with the “choose file & upload buttons” please check if the correct paths are included in the open_basedir config under web service in DSM
If you prefer your NAS sleeping you can disable the interval under INCOMMING NZB’s by setting 0
If you prefer your NAS sleeping and be able to upload multi NZB’s to the NZB watch DIR you should change 3 items:
COMMUNICATION WITH NZBGET-SERVER: change NzbDir to the new USB path
NZBGET-SERVER -> PATHS: change NzbDir to the new USB path
DSM Webservice -> open_basedir add the new USB path into the line so php is allowed to write uploaded files into the mentioned USB dir.
Usertip regarding postprocessing errors:
ERROR Post-Process: Configuration file /opt/sbin/postprocess-example.conf not found, exiting
So I opened: /opt/sbin/postprocess.sh (which we made through: cp /opt/share/doc/nzbget/postprocess-example.sh /opt/sbin/postprocess.sh ) and searched for postprocess-example.conf and found:
Changed it to: