Running a service using NSSM (Windows)

The easiest way to install services written in Python on a Windows machine is to use Non-Sucking Service Manager (NSSM). NSSM provides a simple way to wrap a specific executable (the main python.exe file, in this case), along with arguments (the testdaemon.py script), and make them available as a Windows service. Starting NSSM with nssm install provides a window with all of the fields needed for basic service setup, as follows:

Once the Install service button is clicked, the service is available in the Windows Services manager, where its Startup Type can be altered, if needed, along with all of the ...

Get Hands-On Software Engineering with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.