Running Elastiscsearch as a Service on Windows

Windows users can configure Elasticsearch to run as a service to run in the background or start automatically at startup without any user interaction. Script service.bat” under “C:\elasticsearch-x.x.x\bin” folder which allows one to install, remove, manage or configure the service and potentially start and stop the service, all from the command-line.

c:\ELK\elasticsearch-x.x.x\bin>service.bat
Usage: service.bat install|remove|start|stop|manager

Script accepts one parameter followed by an optional one indicating the service id.

Action Comments
install Install Elasticsearch as a service
remove Remove the installed Elasticsearch service
start Start the Elasticsearch service
stop Stop the Elasticsearch service
manage Start a GUI for managing the installed service

Installing the service

C:\ELK\elasticsearch-x.x.x\bin>service.bat install Installing service : "elasticsearch-service-x64" Using JAVA_HOME (64-bit): "C:\Java\jdk1.7.0_72" The service 'elasticsearch-service-x64' has been installed.

ElasticSearch service

Using manager with service.bat

C:\ELK\elasticsearch-x.x.x\bin>service.bat manager
Succesfully started service manager for 'elasticsearch-service-x64'.

ElasticSearchService

Similarly start and stop with service.bat will start or stop Elasticsearch.

1 2 3 20
Let's Share
Exit mobile version