Last updated on 28th February 2021
This is the first part of a series showing you how to setup Usenet Automation using Docker on a Synology NAS.
I have been using the Synology community packages for quite some time as they were convenient to install from package manager but with recent iterations of DSM these packages quite often fail to install or even run, and its never clear what low level system changes they are making. So now that Docker is available for most Intel based Diskstation’s I decided to jump ship.
In this first guide I will take you through getting SABnzbd up and running within Docker.
What is Docker?
Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications, these application are distributed as Containers.
What is a Container?
A container is kind of what it says on the box, it contains everything that is required to run a particular application. you simply download a pre packaged image someone has already built and it will run within Docker, this means it makes no changes to your system and can easily be backed up if you even need to move it elsewhere.
Onto the Guide
This guide makes some assumptions that you have a general knowledge of the DSM interface and how to do the basics.
What I will be covering
- Installing Docker
- Getting PGID and PUID
- Downloading the Images
- Setting up Sabnzbd
First things first you need to head into Package Center and search for Docker.
When you first open docker you will be asked if you want to read the help guides, you can choose if you want to do this. You will then be greeted by the overview tab, this will give you some overall usage stats for CPU and Memory on any containers running.
Before we proceed any further with downloading and installing containers we need to make sure any shares we have are setup and ready.
Setting up a Docker User and Obtaining the PGID and PUID
In previous versions of this guide we used your default admin account for each container, this is not very secure so please now follow the separate setup guide and then head back here
Downloading the Image
Open up Docker within DSM and navigate to the ‘Registry’ tab and search for SABNzbd
Click on the image made by Linux|Server.io as this will always be kept up to date. Click on Download. You will receive a pop up ensure you select ‘latest’ and press OK
After a few seconds the image will begin downloading this can be tracked in the ‘image’ tab, once the download has completed you will get a system message and the little blue animation to the right will stop.
Setting up SABnzbd
Now we have our image downloaded we are ready to start setting up, click on ‘Launch’ in the section at the top of the window. This doesn’t actually launch the app the wording is a little misleading, it essentially launches the settings.
The initial screen you are greeted with allows you to change the container name and resource restrictions, In this case I am leaving this all at its default.
Click on Advanced Settings, on the first screen you see enable auto restart as this will mean SABNZBD will automatically start up if you ever reboot your NAS.
The port settings are extremely important, do not leave them to Auto as you will have to look up the port number every single time the container is restarted and it will screw with all your other containers as they will not be able to talk to each other.
You will often find some containers want to use some of the default ports already required for DSM and it’s other applications. I tend to use slightly different port mappings to ensure there are no clashes (DSM will warn you if there is a clash)
Local Port = 8000
Container Port = 8080 (SAB’s Non SSL Port)
Local Port = 9000
Container Port = 9090 (SAB’s SSL Port)
Then click on volumes, we are now going to set up the shares we want to mount. SABNzbd only needs access to two folders.
Under the ‘Docker’ share on your Diskstation create a folder called ‘sabnzbd’ this is important as your configuration files will be stored here. We do the same thing for all the other guides.
And then also add your downloads folder, this can be where ever you want to download your files. It should look like the screenshot below.
Environment Variables (PGID, PUID and Timezone)
Next we are going to setup a couple of Environment variables this is the user details we took note of earlier in the guide, this allows the Docker image to have the right access to the shares we just added. In addition we are also required to set the timezone for the container you can find a list of zones on wikipedia https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
In the environment tab enter the details as shown in the screenshot, but change them to whatever yours were noted as.
Click OK and this will take you back to the summary screen we saw earlier.
Once you have entered all the details click OK to go back to the summary screen press Next, we are ready to roll, tick the ‘Run this container….’ box and hit apply. after a few seconds you will see the container running in the container tab. open up a browser window and enter the IP address of your NAS followed by the port number used for the Non SSL port.
You should see the SAB wizard so you can start to configure as you normally would.
If you have any questions please feel free to comment below.