Introduction
Procedure
- Run:
apt -y install sabnzbdplus
- Edit /etc/default/sabnzbdplus and set:
USER=sabnzbdplus
- Determine a UID/GID pair in the range 100-999 (see SYS_{GID,UID}_{MIN,MAX} /etc/login.defs) that is available on the NZB server and all potential NFS clients.
- On the NZB server and all potential NFS clients create that user by running:
groupadd --system sabnzbdplus --gid <gid> useradd --system --gid sabnzbdplus --uid <uid> \ --home-dir /home/sabnzbdplus \ --create-home sabnzbdplus
or add the group and user to your centralised maps (e.g. LDAP).
- The account will be locked (presumably the default for a system account), which makes ssh impossible. We don’t want to unlock it because then it has no password. Instead run:
sed -ri 's/(sabnzbdplus):!:/\1:*:/' /etc/shadow
- Hopefully storage is available under /srv/nzb. If no then see the page that led you here. If yes run:
chown sabnzbdplus:sabnzbdplus /srv/nzb
- Start sabnzbdplus as follows:
su - sabnzbdplus sabnzbdplus
- Just leave the text browser asking its first question.
- From the host where your (normal) browser runs run (possibly as root if required):
ssh -gfNL 8080:localhost:8080 <host-where-sabnzbdplus-is-running>
- Visit http://localhost:8080/ and make the following settings:
- language: <preferred-language>
- server: news.abc.com (this is just to skip this question for the moment)
- General->SABnzbd Host: 0.0.0.0
- General->Launch Browser on Startup: no
- Folders->Temporary Download Folder: /srv/nzb/incomplete
- Folders->Completed Download Folder: /srv/nzb/complete
- Servers->Add Server->… (use SSL if possible)
- Switches->Queue->Direct unpack: OFF
- Switches->Post processing: Deobfurscate final filenames: YES
- Switches->Post processing->History retention: keep completed jobs maximum number of days; 7
- Notifications->Email Notification On Job Completion: always
- Notifications->Disk Full Notifications: yes
- Notifications->SMTP Server: …
- Notifications->Email Recipient: …
- Notifications->Email Sender: …
- Scheduling->Add Schedule->Resume: …
- Scheduling->Add Schedule->Pause: …
- Special->Host Whitelist: <unqualified-name-of-the-host-itself>,<fully-qualified-name-of-the-host-itself>
- Run:
rm -fr ~sabnzbdplus/Downloads
- Stop the server by killing the sabnzbdplus process.
- Finalise sabnzbdplus by stopping sabnzbdplus and then running:
systemctl enable sabnzbdplus reboot
- If there is a front-end webserver then have it proxy connections to the site:
- Note the port number specified in that sabnzbdplus listens on (probably 8080).
- See Configuring web services (revision 2).
- To allow download and cleanup access:
- Install an NFS server (for LXC containers: package unfs3 and install it).
- Add a suitable entry to /etc/exports and have the NFS server reload the file (how this is done depends on which NFS server you installed).
- Add a suitable entry to other systems’ /etc/fstab or automounter maps.
- Do a test download.