# Run Kibana as Windows Service

**URL:** <https://discuss.elastic.co/t/run-kibana-as-windows-service/36527>\
**Category:** Kibana\
**Created:** [December 7, 2015, 11:54am UTC](https://discuss.elastic.co/t/run-kibana-as-windows-service/36527 "2015-12-07T11:54:36Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Landong.Zuo](https://avatars.discourse-cdn.com/v4/letter/l/43a26b/32.png) [@Landong.Zuo](https://discuss.elastic.co/u/Landong.Zuo)\
**Post date:** [December 7, 2015, 11:54am UTC](https://discuss.elastic.co/t/run-kibana-as-windows-service/36527/1 "2015-12-07T11:54:36Z")

</div>

Hi,

I've recently upgraded Kibana to 4.3.0 from 4.0.2 and set it up as a backend service for Windows 7 using the following command line:  
sc create "ElasticSearch-Kibana-4.3.0" binPath= "C:\experiment\kibana-4.3.0-windows\bin\kibana.bat" depend= "elasticsearch-service-x64"

However, the service does not start and following error is given :

"Windows could not start the ElasticSearch-Kibana-4.3.0 service on Local Computer.  
Error 1053: The service did not respond to the start or control request in a timely fashion. "

Although, Kibana is working fine if run from command line. Any idea why service is timed out during start up and how this can be fixed? this problem has never happened before with V4.0.2.

Thanks,

Landong Zuo

---

<div class="post-metadata">

**Author:** ![Joe\_Fleming](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joe_fleming/32/3561_2.png) [@Joe\_Fleming](https://discuss.elastic.co/u/Joe_Fleming)\
**Post date:** [December 9, 2015, 7:00pm UTC](https://discuss.elastic.co/t/run-kibana-as-windows-service/36527/2 "2015-12-09T19:00:10Z")

</div>

Stange. Maybe the startup script's timeout is too low? The process does take a few seconds to actually start.

Are you able to get any version of 4.2 to work? The underlying server logic between 4.0 and 4.3 is pretty different, but 4.2 and 4.3 are nearly identical.

---

<div class="post-metadata">

**Author:** ![druid](https://avatars.discourse-cdn.com/v4/letter/d/e0b2c6/32.png) [@druid](https://discuss.elastic.co/u/druid)\
**Post date:** [March 11, 2016, 8:37am UTC](https://discuss.elastic.co/t/run-kibana-as-windows-service/36527/4 "2016-03-11T08:37:33Z")

</div>

Hey, Landong  
Have you solved this problem?

---

<div class="post-metadata">

**Author:** ![Mark\_van\_der\_Harst](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@Mark\_van\_der\_Harst](https://discuss.elastic.co/u/Mark_van_der_Harst)\
**Post date:** [March 11, 2016, 9:01am UTC](https://discuss.elastic.co/t/run-kibana-as-windows-service/36527/5 "2016-03-11T09:01:26Z")

</div>

Hi Ivan,

What i did is sc.exe create "Kibana 4.3.1" binPath=  
"C:\Users\Administrator\Desktop\K4\bin\kibana.bat" in powershell and it  
seems to work. Windows told me the service start failed, but kibana was running  
anyways. After setting the service to start automatically, it even worked after  
rebooting the Windows machine.

Other users seem to use NSSM ([https://github.com/kirillkovalenko/nssm](https://github.com/kirillkovalenko/nssm)) for this, as described here [https://www.ulyaoth.net/resources/tutorial-install-logstash-and-kibana-on-a-windows-server.34/](https://www.ulyaoth.net/resources/tutorial-install-logstash-and-kibana-on-a-windows-server.34/)  
(in step 14). Sounded like it is more reliable like the "sc.exe create" approach, but  
would need a third party tool.

I spoke with Elasticsearch support about this and they agree that there is a need for Windows server users for a Kibana windows service. But when this will be available they couldn't tell.

---

<div class="post-metadata">

**Author:** ![Airn5475](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/airn5475/32/13757_2.png) [@Airn5475](https://discuss.elastic.co/u/Airn5475)\
**Post date:** [February 9, 2017, 2:29pm UTC](https://discuss.elastic.co/t/run-kibana-as-windows-service/36527/6 "2017-02-09T14:29:27Z")

</div>

Getting this issue with Kibana 5.1.1.

Joe, how do you change the startup script's timeout?

---

<div class="post-metadata">

**Author:** ![Joe\_Fleming](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joe_fleming/32/3561_2.png) [@Joe\_Fleming](https://discuss.elastic.co/u/Joe_Fleming)\
**Post date:** [February 10, 2017, 4:43pm UTC](https://discuss.elastic.co/t/run-kibana-as-windows-service/36527/7 "2017-02-10T16:43:50Z")

</div>

I was referring to the windows script startup time. The error message made it sound like the script didn't wait long enough for Kibana to start up. I don't really know anything about windows startup scripts though.

It's also possible that Kibana just isn't set up correctly to run as a Windows startup script. Based on what @Mark_van_der_Harst posted, it sounds like that is the case, and you'll have to use some tool to wrap Kibana and treat it as a service.

UPDATE: There's already an issue to track adding this feature to Kibana: [https://github.com/elastic/kibana/issues/6218](https://github.com/elastic/kibana/issues/6218)

---

<div class="post-metadata">

**Author:** ![vijaypalmanit](https://avatars.discourse-cdn.com/v4/letter/v/c77e96/32.png) [@vijaypalmanit](https://discuss.elastic.co/u/vijaypalmanit)\
**Post date:** [February 27, 2017, 11:30am UTC](https://discuss.elastic.co/t/run-kibana-as-windows-service/36527/8 "2017-02-27T11:30:28Z")

</div>

better try this :  
[Running Kibana as a service in Windows - ELK Stack](https://www.youtube.com/watch?v=L-0A2cqTn-w)

---

<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, 1:32pm UTC](https://discuss.elastic.co/t/run-kibana-as-windows-service/36527/9 "2017-07-06T13:32:58Z")

</div>


