# Any info on elasticsearch as a windows service?

**URL:** <https://discuss.elastic.co/t/any-info-on-elasticsearch-as-a-windows-service/4561>\
**Category:** Elasticsearch\
**Created:** [June 6, 2011, 9:45pm UTC](https://discuss.elastic.co/t/any-info-on-elasticsearch-as-a-windows-service/4561 "2011-06-06T21:45:15Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![otrWalter](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/otrwalter/32/3215_2.png) [@otrWalter](https://discuss.elastic.co/u/otrWalter)\
**Post date:** [June 6, 2011, 9:45pm UTC](https://discuss.elastic.co/t/any-info-on-elasticsearch-as-a-windows-service/4561/1 "2011-06-06T21:45:15Z")

</div>

Anyone have any idea how to make elasticsearch run as a windows service?

Thank you

Walter

---

<div class="post-metadata">

**Author:** ![Karussell1](https://avatars.discourse-cdn.com/v4/letter/k/50afbb/32.png) [@Karussell1](https://discuss.elastic.co/u/Karussell1)\
**Post date:** [June 6, 2011, 10:26pm UTC](https://discuss.elastic.co/t/any-info-on-elasticsearch-as-a-windows-service/4561/2 "2011-06-06T22:26:13Z")

</div>

Did you follow the generic approach? Or what difficulties did you  
encounter?

> <https://stackoverflow.com/questions/68113/how-to-create-a-windows-service-from-java-app>

On Jun 6, 11:45 pm, otrWalter [otrwal...@gmail.com](mailto:otrwal...@gmail.com) wrote:

> Anyone have any idea how to make elasticsearch run as a windows service?
> 
> Thank you
> 
> Walter

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [June 6, 2011, 10:39pm UTC](https://discuss.elastic.co/t/any-info-on-elasticsearch-as-a-windows-service/4561/3 "2011-06-06T22:39:58Z")

</div>

There is also the service wrapper effort going on: [GitHub - elastic/elasticsearch-servicewrapper: A service wrapper on top of elasticsearch](https://github.com/elasticsearch/elasticsearch-servicewrapper), which should allow to install elasticsearch "as a windows service".. Also, there is a windows installation project in github, but not properly online to find it...

On Tuesday, June 7, 2011 at 1:26 AM, Karussell wrote:

> Did you follow the generic approach? Or what difficulties did you  
> encounter?
> 
> [How to create a windows service from java app - Stack Overflow](http://stackoverflow.com/questions/68113/how-to-create-a-windows-service-from-java-app)
> 
> On Jun 6, 11:45 pm, otrWalter \<[otrwal...@gmail.com](mailto:otrwal...@gmail.com) ([http://gmail.com](http://gmail.com))\> wrote:
> 
> > Anyone have any idea how to make elasticsearch run as a windows service?
> > 
> > Thank you
> > 
> > Walter

---

<div class="post-metadata">

**Author:** ![Rui\_Lopes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rui_lopes/32/2310_2.png) [@Rui\_Lopes](https://discuss.elastic.co/u/Rui_Lopes)\
**Post date:** [June 6, 2011, 11:07pm UTC](https://discuss.elastic.co/t/any-info-on-elasticsearch-as-a-windows-service/4561/4 "2011-06-06T23:07:32Z")

</div>

On Mon, Jun 6, 2011 at 23:39, Shay Banon [shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com) wrote:

> There is also the service wrapper effort going  
> on: [GitHub - elastic/elasticsearch-servicewrapper: A service wrapper on top of elasticsearch](https://github.com/elasticsearch/elasticsearch-servicewrapper), which  
> should allow to install elasticsearch "as a windows service".. Also, there  
> is a windows installation project in github, but not properly online to find  
> it...

Its at [GitHub - rgl/elasticsearch-setup: elasticsearch oss installer for windows.](https://github.com/rgl/elasticsearch-setup)

Best regards,  
Rui Lopes

> On Tuesday, June 7, 2011 at 1:26 AM, Karussell wrote:
> 
> Did you follow the generic approach? Or what difficulties did you  
> encounter?
> 
> [How to create a windows service from java app - Stack Overflow](http://stackoverflow.com/questions/68113/how-to-create-a-windows-service-from-java-app)
> 
> On Jun 6, 11:45 pm, otrWalter [otrwal...@gmail.com](mailto:otrwal...@gmail.com) wrote:
> 
> Anyone have any idea how to make elasticsearch run as a windows service?
> 
> Thank you
> 
> Walter

---

<div class="post-metadata">

**Author:** ![Walter\_Torres](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/walter_torres/32/3212_2.png) [@Walter\_Torres](https://discuss.elastic.co/u/Walter_Torres)\
**Post date:** [June 7, 2011, 12:11am UTC](https://discuss.elastic.co/t/any-info-on-elasticsearch-as-a-windows-service/4561/5 "2011-06-07T00:11:04Z")

</div>

Did not try any approach.

I don't know Java, don't know where to begin.

I followed your link, which led me to many others. Many way over my head.

After about 2 hours of trying this "app" and that "app, I settled on "\*  
WinRun4J\*"

I got the sample piece to run. But I am stumped on getting \*elasticsearch \*to  
run.

The CONFIG file asks for a class. The sample has this line:

_service.class=org.boris.winrun4j.test.ServiceTest_

Not knowing Java, as I said, I don't know what to put here.

The config has this, as its example...

service.class=org.boris.winrun4j.test.ServiceTest  
service.id=ServiceTest  
service.name=WinRun4J Test Service  
service.description=An example service using WinRun4J.

I did this (not) much

service.class=????  
service.id=????  
service.name=ElasticSearch  
service.description=ElasticSearch as a Windows Service.

can you help me finish this config file settings?

Thank you

Walter

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 7, 2011, 1:31am UTC](https://discuss.elastic.co/t/any-info-on-elasticsearch-as-a-windows-service/4561/6 "2011-06-07T01:31:01Z")

</div>

I suggest

> service.class=org.elasticsearch.bootstrap.Elasticsearch  
> service.id=elasticsearch

Have a look at [https://github.com/elasticsearch/elasticsearch/blob/master/bin/elasticsearch.bat](https://github.com/elasticsearch/elasticsearch/blob/master/bin/elasticsearch.bat)

to find more params (such as classpath and memory settings)

Hope this could help  
David 😉

Le 7 juin 2011 à 02:11, Walter Torres [walter@torres.ws](mailto:walter@torres.ws) a écrit :

> Did not try any approach.
> 
> I don't know Java, don't know where to begin.
> 
> I followed your link, which led me to many others. Many way over my head.
> 
> After about 2 hours of trying this "app" and that "app, I settled on "WinRun4J"
> 
> I got the sample piece to run. But I am stumped on getting elasticsearch to run.
> 
> The CONFIG file asks for a class. The sample has this line:
> 
> service.class=org.boris.winrun4j.test.ServiceTest
> 
> Not knowing Java, as I said, I don't know what to put here.
> 
> The config has this, as its example...
> 
> service.class=org.boris.winrun4j.test.ServiceTest  
> service.id=ServiceTest  
> service.name=WinRun4J Test Service  
> service.description=An example service using WinRun4J.
> 
> I did this (not) much
> 
> service.class=????  
> service.id=????  
> service.name=Elasticsearch  
> service.description=Elasticsearch as a Windows Service.
> 
> can you help me finish this config file settings?
> 
> Thank you
> 
> Walter

---

<div class="post-metadata">

**Author:** ![Rui\_Lopes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rui_lopes/32/2310_2.png) [@Rui\_Lopes](https://discuss.elastic.co/u/Rui_Lopes)\
**Post date:** [June 7, 2011, 8:27am UTC](https://discuss.elastic.co/t/any-info-on-elasticsearch-as-a-windows-service/4561/7 "2011-06-07T08:27:08Z")

</div>

On Tue, Jun 7, 2011 at 01:11, Walter Torres [walter@torres.ws](mailto:walter@torres.ws) wrote:

> Did not try any approach.  
> I don't know Java, don't know where to begin.  
> I followed your link, which led me to many others. Many way over my head.

It should have been strait-forward ☹

At [GitHub - rgl/elasticsearch-setup: elasticsearch oss installer for windows.](https://github.com/rgl/elasticsearch-setup) click the Downloads  
button and download  
[https://github.com/downloads/rgl/elasticsearch-setup/elasticsearch-0.16.2-setup-64-bit.exe](https://github.com/downloads/rgl/elasticsearch-setup/elasticsearch-0.16.2-setup-64-bit.exe)  
Then run it to install elasticsearch, manually start the elasticsearch  
service (like a regular service), and browse to  
[http://localhost:9200/\_cluster/state](http://localhost:9200/_cluster/state)

If you don't have java installed, the setup will tell you to download  
it from [http://www.java.com/getjava/](http://www.java.com/getjava/) and from there just click the  
Download button.

Thats it.

Where exactly did you get lost?

Best regards,  
Rui Lopes

PS: You might also want to read  
[http://blog.ruilopes.com/post/3345958088/from-zero-to-elasticsearch-in-a-jiffy](http://blog.ruilopes.com/post/3345958088/from-zero-to-elasticsearch-in-a-jiffy)  
(I did that before creating the installer/setup though, so you can  
ignore the first part that talks about starting elasticsearch).

---

<div class="post-metadata">

**Author:** ![CaptainCodeman\_2](https://avatars.discourse-cdn.com/v4/letter/c/4af34b/32.png) [@CaptainCodeman\_2](https://discuss.elastic.co/u/CaptainCodeman_2)\
**Post date:** [June 7, 2011, 7:44pm UTC](https://discuss.elastic.co/t/any-info-on-elasticsearch-as-a-windows-service/4561/8 "2011-06-07T19:44:56Z")

</div>

I had good success using the Apache Commons Daemon or 'procrun'.

I've done a write-up of it here:

> **[Running ElasticSearch as a Service on Windows 2008 x64](https://www.captaincodeman.com/elasticsearch-windows-service-2008-x64)**

- Simon

On Jun 6, 6:11 pm, Walter Torres [wal...@torres.ws](mailto:wal...@torres.ws) wrote:

> Did not try any approach.
> 
> I don't know Java, don't know where to begin.
> 
> I followed your link, which led me to many others. Many way over my head.
> 
> After about 2 hours of trying this "app" and that "app, I settled on "\*  
> WinRun4J\*"
> 
> I got the sample piece to run. But I am stumped on getting \*elasticsearch \*to  
> run.
> 
> The CONFIG file asks for a class. The sample has this line:
> 
> _service.class=org.boris.winrun4j.test.ServiceTest_
> 
> Not knowing Java, as I said, I don't know what to put here.
> 
> The config has this, as its example...
> 
> service.class=org.boris.winrun4j.test.ServiceTest  
> service.id=ServiceTest  
> service.name=WinRun4J Test Service  
> service.description=An example service using WinRun4J.
> 
> I did this (not) much
> 
> service.class=????  
> service.id=????  
> service.name=Elasticsearch  
> service.description=Elasticsearch as a Windows Service.
> 
> can you help me finish this config file settings?
> 
> Thank you
> 
> Walter

---

<div class="post-metadata">

**Author:** ![fashionalwallet](https://avatars.discourse-cdn.com/v4/letter/f/839c29/32.png) [@fashionalwallet](https://discuss.elastic.co/u/fashionalwallet)\
**Post date:** [June 10, 2011, 12:30am UTC](https://discuss.elastic.co/t/any-info-on-elasticsearch-as-a-windows-service/4561/9 "2011-06-10T00:30:34Z")

</div>

- deleted -

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 4:04am UTC](https://discuss.elastic.co/t/any-info-on-elasticsearch-as-a-windows-service/4561/10 "2017-07-06T04:04:06Z")

</div>


