# Logstash as a service on linux

**URL:** <https://discuss.elastic.co/t/logstash-as-a-service-on-linux/145128>\
**Category:** Logstash\
**Created:** [August 20, 2018, 9:56am UTC](https://discuss.elastic.co/t/logstash-as-a-service-on-linux/145128 "2018-08-20T09:56:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Goyal.vikas87](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@Goyal.vikas87](https://discuss.elastic.co/u/Goyal.vikas87)\
**Post date:** [August 20, 2018, 9:56am UTC](https://discuss.elastic.co/t/logstash-as-a-service-on-linux/145128/1 "2018-08-20T09:56:14Z")

</div>

Please help how we can execute logstash as a service on Linux (i have not installed logstash as packages and just extracted from tar file).

Also please help how we can stop logstash service. If multiple config files are running as a service then can we stop individual config file?

---

<div class="post-metadata">

**Author:** ![Rohlik](https://avatars.discourse-cdn.com/v4/letter/r/aeb1de/32.png) [@Rohlik](https://discuss.elastic.co/u/Rohlik)\
**Post date:** [August 20, 2018, 10:17am UTC](https://discuss.elastic.co/t/logstash-as-a-service-on-linux/145128/2 "2018-08-20T10:17:06Z")

</div>

What is the reason why you do not install Logstash as package? Everything is better with packages 😉

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [August 20, 2018, 12:25pm UTC](https://discuss.elastic.co/t/logstash-as-a-service-on-linux/145128/3 "2018-08-20T12:25:42Z")

</div>

> Please help how we can execute logstash as a service on Linux (i have not installed logstash as packages and just extracted from tar file).

This is mostly dependent on your Linux distribution and whether it uses SyvV init, Upstart, systemd, or something else. Setting up Logstash to run as a daemon isn't that much different from any other piece of software. If this isn't something you're familiar with I strongly suggest you install Logstash via a package manager.

> Also please help how we can stop logstash service. If multiple config files are running as a service then can we stop individual config file?

No, you'll have to stop the whole Logstash instance.

---

<div class="post-metadata">

**Author:** ![chitraj8](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chitraj8/32/42639_2.png) [@chitraj8](https://discuss.elastic.co/u/chitraj8)\
**Post date:** [August 23, 2018, 9:17pm UTC](https://discuss.elastic.co/t/logstash-as-a-service-on-linux/145128/4 "2018-08-23T21:17:50Z")

</div>

I tried to run rpm on centos7 box from elastic website, I do see there is NO systemd file being created.  
But instead it has created systemv file in /etc/init.d/logstash  
I did read some other posts here, and see that apparently there is no system-install as well in /bin directory of logstash to generate systemd file.

Can you please share your thoughts further?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [August 24, 2018, 6:04am UTC](https://discuss.elastic.co/t/logstash-as-a-service-on-linux/145128/5 "2018-08-24T06:04:08Z")

</div>

Judging by [https://github.com/elastic/logstash/issues/9403](https://github.com/elastic/logstash/issues/9403) it's because you don't have Java installed on the machine.

---

<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:** [September 21, 2018, 6:06am UTC](https://discuss.elastic.co/t/logstash-as-a-service-on-linux/145128/6 "2018-09-21T06:06:51Z")

</div>

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