How to run Logstash as a service on Windows


I'm configuring Logstash on windows server. And I need logstash to run as a service and not from command line. And I assume service is configured with an .exe file as binary and not other files like .bat or .ps1. How can we configure logstash to run as a service in Windows?


Use a service wrapper.

Please help me with the steps.

Use NSSM (

nssm install <servicename> <program> [<arguments>]

Example :

nssm.exe install logstash_service_x86  "c:/logstash/config/run_logstash_config.bat"

where run_logstash_config.bat is a windows batch file that run logstash against your config file with :

$logstash -f logstash_cofig.d

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.