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.
NOTE 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-to-ini> install
-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 to those parameters 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.
-b (start browser) will be ignored.
Updating the service
SABnzbd-service.exe -f <path-to-ini> update
Works the same as "install", but should be used to change settings.
Removing the service
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 higher you can best use
NOTE SABHelper must be stopped separately, after SABnzbd is stopped.
NOTE You must have installed the SABHelper service first (see below), otherwise SABnzbd will not start.
When installed, the SABHelper service will be started when the SABnzbd service starts.
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 automatically when installing the service.
NOTE 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
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 (
- 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)