Categories
Articles Windows Windows Server

Running Prometheus as a Service Using NSSM on Windows Server

In this guide, we will walk you through the process of running Prometheus as a service on Windows Server using NSSM (Non-Sucking Service Manager). Running Prometheus as a service allows you to automatically start and run it in the background smoothly. Here are the details on how to do it:

1.Preparing Prometheus

First and foremost, you need to configure Prometheus to work appropriately on Windows Server. Download the latest version of Prometheus from the official website and complete the configuration steps as instructed.

2.Downloading and Preparing NSSM

Download NSSM (Non-Sucking Service Manager) from the official website and extract it to a directory. NSSM is a tool that helps you turn your applications into Windows services.

NSSM download

3.Creating and Configuring a Service with NSSM

  • Open a command prompt as an administrator.

  • Navigate to the directory where NSSM is located.
  • Use the following command to create a new service:

4.Configure the following settings in the opened window:

  • Application: Path to the Prometheus executable file.
  • AppParameters: Path to the Prometheus configuration file.
  • Startup directory: Directory where the Prometheus executable is located.
  • Shutdown action: Select the action to be taken when the service is stopped (e.g., “Ignore”).
  • You can configure other settings as needed.

5.Starting and Monitoring the Service

  • Use the following command to start the service created by NSSM:

1.Installing Other Programs Using NSSM

NSSM is a versatile tool that allows you to convert various applications, not just services like Prometheus, into Windows services. Here are some tips on how to install other programs as services using NSSM:

2.Preparing the Program

Firstly, ensure that the program you intend to install is ready to function in the Windows environment. Make sure you’ve fulfilled the program’s requirements and configurations properly.

3.Creating a Service with NSSM

To create a new service using NSSM, open a command prompt as an administrator. Navigate to the directory where NSSM is located, and use the following command to create a new service:

Configuring the Service

In the opened window, configure the following settings:

  • Application: Path to the program’s executable file.
  • AppParameters: Add any additional parameters required by the program.
  • Startup directory: Directory where the program’s executable is located.
  • Shutdown action: Select the action to be taken when the service is stopped (e.g., “Ignore”).

You can explore other customization options and adjust them according to your needs.

4.Starting and Monitoring the Service

Use the following command to start the service:

Your new program should now be running as a service. Make sure the program functions as expected.

This method allows you to easily manage various applications as Windows services using NSSM. NSSM provides effective and straightforward service management capabilities.


If you have any questions or details you would like to add, feel free to write me.

Leave a Reply

Your email address will not be published. Required fields are marked *