

Table of Contents
1. Overview
“In Windows operating systems, a Windows service is a computer program that operates in the background.” In our previous Spring Boot as Windows Service article, we have discussed spring boot as a windows services. In this article, we will discuss how to run elastic search instances as a service.
2. elasticsearch-service.bat
Elasticsearch can be installed on Windows as service using elasticsearch-service.bat
command file. command file also provides help of all the commands to easily use provided options. Just execute command file as below.
Let’s discuss each option with more details.
2.1 Install elastic search service
install option is used to install Elastic Search. Refer below example.
In above example, we have given ES_Service_1
as a SERVICE_ID. In local services, you will see installed service as Elasticsearch {version} (Service ID)
as below.
2.2 start elastic search service
start
option is used to start installed Elastic Search service in our example ES_Service_1
. Refer below example.
After starting Elastic Search services, Verify it using localhost:9200
. If everything is fine you will get ES cluster, version and other pieces of information as below.
2.3 stop elastic search service
stop
option of elasticsearch-service.bat
command file is used to stop elastic search services.
2.4 Remove elasticsearch service
We can remove installed ES services using remove
option as below.
3. Conclusion
In this article, we have discussed how to install, start, stop, remove and manage Elastic Search service using elasticsearch-service.bat
command file.
4. References
Refer below link for more details.