SABnzbd

Wiki

SABnzbd as a Windows Service

It's possible to install SABnzbd as a real Windows Service.

The Windows executable is SABnzbd-service.exe, the other EXE files do not have service support.1

Service management

Note that you need administrative rights when you make any change to the services,
although SABnzbd itself will run fine when in restricted user mode.

For the meaning of the various options required during service installation, see "command-line-parameters"

Installing the service

SABnzbd-service.exe -f <path> install

The -f parameter is required. When running as a service, SABnzbd will be in "daemon" mode
and will not get the INI-file location from the user profile.
You can add extra parameters, but any parameter you set here will block you from
making changes in the configuration through the Web-UI.
So, if you use -s host:port, SABnzbd will always use that as server address, disregarding what's in the INI file.
Parameters like -b (start browser) will be ignored.

Updating the service

SABnzbd-service.exe -f <path> update

Works the same as "install", but should be used to change settings.

Removing the service

SABnzbd-service.exe remove

Removes the service altogether.

Start and Stop

net start SABnzbd
net stop SABnzbnd
net stop SABHelper

Use the Windows Service Manager to start and stop (command line or GUI).
It's probably best to start in "Automatic" mode.
On Windows 7 and Server2008 you can best use "Automatic (delayed)".
Note that SABHelper must be stopped separately, after SABnzbd is stopped.
Please note that you must have installed the SABHelper service first (see below), otherwise the SABnzbd will not start.
When installed, the SABHelper service will be started when the SABnzbd service starts.

Helper Service

Because a Windows Service cannot restart itself, we created the SABHelper service.
It is controlled in the same way as SABnzbd-service.exe, only it needs no additional parameters.
The service SABHelper will be created.
Note that this service (unlike SABnzbd) needs to be run as "Local System" or as another account with administrative privileges.

SABnzbd-helper.exe install
SABnzbd-helper.exe remove
SABnzbd-helper.exe update
SABnzbd-helper.exe start
SABnzbd-helper.exe stop

Restrictions

Running as a service does pose some restrictions.

  • The SABHelper Service must run as "Local System" or any account that has administrative privileges.
  • By default the service runs as "Local System". This allows full access to the internal harddisk, but not to network shares.
  • If you need network shares, you should tell the Service Manager to use an appropriate user account.
  • When using network shares, you must use network (UNC) paths ("\\server\share") instead of drive letters ("p:\").
  • Use only local drives for the admin, log and incomplete folders (par2 does not support UNC)
  • The Windows firewall will not warn you that it blocks SABnzbd-service.exe, you will have to add it to the exception list yourself.
  • You can upgrade SABnzbd without changing the service registrations, but you do need to stop both services first
  • Upgrading without changing service registration only works when you install at the same location
  • The Tray-menu (0.7.0+) will not be shown (a Service cannot do this)