Difference between revisions of "SABnzbd"

From ArchWiki
Jump to: navigation, search
(Added: "SABnzbd redirects to localhost on remonte access when only https is enabled" + fix)
(Starting SABnzbd as user: Mention config file)
 
(57 intermediate revisions by 15 users not shown)
Line 1: Line 1:
[[Category:Internet Applications]]
+
[[Category:Internet applications]]
SABnzbd is an Open Source Binary Newsreader written in Python.
+
SABnzbd is an open-source binary newsreader written in Python.
  
''It's totally free, incredibly easy to use, and works practically everywhere. SABnzbd makes Usenet as simple and streamlined as possible by automating everything we can. All you have to do is add an .nzb. SABnzbd takes over from there, where it will be automatically downloaded, verified, repaired, extracted and filed away with zero human interaction.''
+
From [http://sabnzbd.org/ sabnzbd.org]:
 +
:It's totally free, incredibly easy to use, and works practically everywhere. SABnzbd makes Usenet as simple and streamlined as possible by automating everything we can. All you have to do is add an .nzb. SABnzbd takes over from there, where it will be automatically downloaded, verified, repaired, extracted and filed away with zero human interaction.
  
 
== Installation ==
 
== Installation ==
Install {{AUR|sabnzbd}} from the [[Arch User Repository]].
 
  
== Configuration ==
+
Install the {{AUR|sabnzbd}} or {{AUR|sabnzbd-git}} package.
=== systemd ===
+
SABnzbd comes with a system service file, this can be used to control the daemon as follows:
+
#systemctl {start,stop,enable,disable} sabnzbd.service
+
  
{{ic|start}} and {{ic|stop}} are direct, {{ic|enable}} and {{ic|disable}} configure automatic starting of the service during boot. For more information, refer to the [[Systemd]] article.
+
== Usage  ==
 +
SABnzbd is able to run globally (settings apply to all users) and locally (per user settings). The way of setting up SABnzbd depends on the way it is intended to be used. A local configuration may prove more useful on a desktop system when used by several people simultaneously.
  
It is recommended to run through the initial setup wizard after starting the service by going to 127.0.0.1:8080 in your favourite web-browser. This initial setup should be enough to get SABnzbd working correctly for regular users. Users wanting HTTPS access are recommended to read further on in [https://wiki.archlinux.org/index.php/SABnzbd#enabling_https enabling https].
+
If SABnzbd is started for the first time, the webinterface will present a setup wizard for configuring UI language and a single news server.
  
=== enabling https ===
+
Further configuration can be done from within the UI (adding additional servers, setting folder paths etc.) or by editing {{ic|sabnzbd.ini}}.
enabling https is a threefold process:
+
  
* edit {{ic|/opt/sabnzbd/sabnzbd.ini}} and set '''enable_https''' to {{ic|1}}
+
=== Using systemd ===
 +
Both {{AUR|sabnzbd}} and {{AUR|sabnzbd-git}} provide a [[systemd]] service, create the [[user]] and [[group]] {{ic|sabnzbd}}, and use {{ic|/opt/sabnzbd/sabnzbd.ini}} for configuration.
  
* copy {{ic|/usr/lib/systemd/system/sabnzbd.service}} to {{ic|/etc/systemd/system/}} then edit it and set '''PIDFile''' to {{ic|/run/sabnzbd/sabnzbd-9090.pid}}
+
Add users to the {{ic|sabnzbd}} [[group]] to allow access to SABnzbd files.
  
* reload systemd with {{ic|# systemctl --system daemon-reload}}
+
=== Starting SABnzbd as user ===
 +
Running {{ic|$ sabnzbd}}, without any further configuration, results in two processes owned by the launching user: {{ic|/usr/bin/sabnzbd}} and {{ic|/opt/sabnzbd/SABnzbd.py -f /home/'''user'''/.sabnzbd.ini}}.
  
You should now be able to start sabnzbd with SSL support.
+
Append the {{ic|-d}} parameter to start SABnzbd as [[daemon]]:
  
=== using a custom port ===
+
$ sabnzbd -d
Using a custom port is similar to using https:
+
  
* edit {{ic|/opt/sabnzbd/sabnzbd.ini}} and set '''port''' in '''[misc]''' section to the port you wish to use.
+
Use {{ic|~/sabnzbd.ini/sabnzbd.ini}} for configuration.
  
* copy {{ic|/usr/lib/systemd/system/sabnzbd.service}} to {{ic|/etc/systemd/system/}} then edit it and set '''PIDFile''' to {{ic|/run/sabnzbd/sabnzbd-''yourport''.pid}} where ''yourport'' is the same as set in the first step.
+
=== Stopping SABnzbd ===
 +
SABnzbd can be easily shutdown in the web-interface or the [[systemd]] {{ic|sabnzbd}} unit.
  
* edit {{ic|/etc/conf.d/sabnzbd_systemd}} and set '''SABNZBD_PORT''' to the port set in the first step.
+
It is also possible to shutdown a running (remote) SABnzbd client using the provided API:
  
* reload systemd with {{ic|# systemctl --system daemon-reload}}
+
$ curl "http(s)://host:port/sabnzbd/api?mode=shutdown&apikey=API-key"
  
You should now be able to start sabnzbd with a custom port.
+
=== Accessing the web-interface ===
  
== Troubleshooting ==
+
{{Tip|
=== systemd times out when starting SABnzbd with https enabled ===
+
*SABnzbd can only be accessed on the running computer. Change {{ic|1=host = 127.0.0.1}} in {{ic|/opt/sabnzbd/sabnzbd.ini}} to {{ic|1=host = 0.0.0.0}} (or the host IP-address) to allow access from another computer.
When faced with the following:
+
*SABnzbd listens on port {{ic|8080}}. Change {{ic|1=port = 8080}} in {{ic|sabnzbd.ini}} to the preferred port.
[user@host ~]$ sudo systemctl start sabnzbd.service
+
}}
Job failed. See system journal and 'systemctl status' for details.
+
+
[user@host ~]$ sudo systemctl status sabnzbd.service
+
sabnzbd.service - SABnzbd binary newsreader
+
  Loaded: loaded (/usr/lib/systemd/system/sabnzbd.service; disabled)
+
  Active: failed (Result: timeout) since Tue, 25 Sep 2012 20:10:47 +0200; 9s ago
+
  CGroup: name=systemd:/system/sabnzbd.service
+
  
It's likely that you've forgotten to edit {{ic|sabnzbd.service}} to reflect the proper PID file as mentioned in [https://wiki.archlinux.org/index.php/SABnzbd#enabling_https enabling https].
+
After starting SABnzbd, access the web-interface by browsing to http://127.0.0.1:8080.
  
=== SABnzbd redirects to localhost on remonte access when only https is enabled ===
+
== Tips and tricks ==
This strange issue seems to appear, when you have no https port configured (so it will use the configured http port for http) and your {{ic|/etc/conf.d/sabnzbd[_systemd]}} says
+
SABNZBD_PROTOCOL=https
+
instead of:
+
SABNZBD_PROTOCOL=http
+
  
You might need to restart your clientside browser.
+
=== Enable SSL-support for news servers ===
 +
Install {{pkg|python2-pyopenssl}} to enable SSL support for news servers.
 +
 
 +
The usage of SSL connections is recommend (if supported by the news server):
 +
*Transmission of data from the server to the NNTP client is encrypted, protecting your privacy.
 +
*Decreasing the chance of throttling NNTP traffic by the ISP.
 +
 
 +
== See also ==
  
== External Links ==
 
 
* [http://sabnzbd.org/ SABnzbd homepage]
 
* [http://sabnzbd.org/ SABnzbd homepage]
 
* [http://wiki.sabnzbd.org/ SABnzbd wiki]
 
* [http://wiki.sabnzbd.org/ SABnzbd wiki]

Latest revision as of 22:28, 22 December 2016

SABnzbd is an open-source binary newsreader written in Python.

From sabnzbd.org:

It's totally free, incredibly easy to use, and works practically everywhere. SABnzbd makes Usenet as simple and streamlined as possible by automating everything we can. All you have to do is add an .nzb. SABnzbd takes over from there, where it will be automatically downloaded, verified, repaired, extracted and filed away with zero human interaction.

Installation

Install the sabnzbdAUR or sabnzbd-gitAUR package.

Usage

SABnzbd is able to run globally (settings apply to all users) and locally (per user settings). The way of setting up SABnzbd depends on the way it is intended to be used. A local configuration may prove more useful on a desktop system when used by several people simultaneously.

If SABnzbd is started for the first time, the webinterface will present a setup wizard for configuring UI language and a single news server.

Further configuration can be done from within the UI (adding additional servers, setting folder paths etc.) or by editing sabnzbd.ini.

Using systemd

Both sabnzbdAUR and sabnzbd-gitAUR provide a systemd service, create the user and group sabnzbd, and use /opt/sabnzbd/sabnzbd.ini for configuration.

Add users to the sabnzbd group to allow access to SABnzbd files.

Starting SABnzbd as user

Running $ sabnzbd, without any further configuration, results in two processes owned by the launching user: /usr/bin/sabnzbd and /opt/sabnzbd/SABnzbd.py -f /home/user/.sabnzbd.ini.

Append the -d parameter to start SABnzbd as daemon:

$ sabnzbd -d

Use ~/sabnzbd.ini/sabnzbd.ini for configuration.

Stopping SABnzbd

SABnzbd can be easily shutdown in the web-interface or the systemd sabnzbd unit.

It is also possible to shutdown a running (remote) SABnzbd client using the provided API:

$ curl "http(s)://host:port/sabnzbd/api?mode=shutdown&apikey=API-key"

Accessing the web-interface

Tip:
  • SABnzbd can only be accessed on the running computer. Change host = 127.0.0.1 in /opt/sabnzbd/sabnzbd.ini to host = 0.0.0.0 (or the host IP-address) to allow access from another computer.
  • SABnzbd listens on port 8080. Change port = 8080 in sabnzbd.ini to the preferred port.

After starting SABnzbd, access the web-interface by browsing to http://127.0.0.1:8080.

Tips and tricks

Enable SSL-support for news servers

Install python2-pyopenssl to enable SSL support for news servers.

The usage of SSL connections is recommend (if supported by the news server):

  • Transmission of data from the server to the NNTP client is encrypted, protecting your privacy.
  • Decreasing the chance of throttling NNTP traffic by the ISP.

See also