nssm

Manage Windows Services with NSSM

  • 1 min

NSSM, or Non-Sucking Service Manager, is an open-source tool for service management on Windows operating systems.

The Windows services utility ‘services.msc’ provides basic functionalities for service management. But NSSM offers many additional options for managing services.

To use NSSM, we simply need to download the executable and place it in any folder on our hard drive. For ease of use, it’s convenient to have that location added to the PATH environment variable.

Now we can use NSSM. For example, it’s very easy to add an executable as a Windows service. To do this, we simply have to run,

nssm install

Whereis the name we want to give it.

nssm-screenshot

NSSM will open a window with all the options we can configure for the service. And there are quite a few. For example, we can specify startup parameters, the working directory, or the maximum allowed memory.

We can also specify a startup time window and a restart time window, meaning the service will only start or restart within those specified time periods.

We can edit an existing service by running

nssm edit

Or remove it

nssm remove

Furthermore, all configuration options are editable from the command line, which makes it useful to include as part of our development processes when we need to manage or configure Windows services.

NSSM is Open Source, and all the code and documentation is available on the project page https://nssm.cc/ and in its repository https://git.nssm.cc/nssm/nssm