# Systemd logstash service

**URL:** <https://discuss.elastic.co/t/systemd-logstash-service/125083>\
**Category:** Logstash\
**Created:** [March 21, 2018, 10:42pm UTC](https://discuss.elastic.co/t/systemd-logstash-service/125083 "2018-03-21T22:42:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dao](https://avatars.discourse-cdn.com/v4/letter/d/a6a055/32.png) [@dao](https://discuss.elastic.co/u/dao)\
**Post date:** [March 21, 2018, 10:42pm UTC](https://discuss.elastic.co/t/systemd-logstash-service/125083/1 "2018-03-21T22:42:27Z")

</div>

Hello, I am surprised that the deb package of logstash does not come with a systemd service.

Elasticsearch and kibana does.

Did I miss something? if it is not in the package, can you provide an official way to start, restart and stop logstash as a service?

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [March 21, 2018, 10:56pm UTC](https://discuss.elastic.co/t/systemd-logstash-service/125083/2 "2018-03-21T22:56:17Z")

</div>

Logstash automatically installs the correct startup script based on what your server uses. It uses `pleaserun` to auto-detect and install this. If your system uses systemd as its default startup method, it should have created a systemd unit file in `/etc/systemd/system/logstash.service`.

What OS are you using?

---

<div class="post-metadata">

**Author:** ![dao](https://avatars.discourse-cdn.com/v4/letter/d/a6a055/32.png) [@dao](https://discuss.elastic.co/u/dao)\
**Post date:** [March 22, 2018, 7:42am UTC](https://discuss.elastic.co/t/systemd-logstash-service/125083/3 "2018-03-22T07:42:01Z")

</div>

Hello

I am using debian 9,

I have installed the deb package logstash-6.2.3.deb

```auto
wilco@int:~$ ls /etc/systemd/system/logstash.service
ls: cannot access /etc/systemd/system/logstash.service: No such file or directory

```

---

<div class="post-metadata">

**Author:** ![dao](https://avatars.discourse-cdn.com/v4/letter/d/a6a055/32.png) [@dao](https://discuss.elastic.co/u/dao)\
**Post date:** [March 22, 2018, 8:52am UTC](https://discuss.elastic.co/t/systemd-logstash-service/125083/4 "2018-03-22T08:52:18Z")

</div>

Hello, the night has been fruitfull.

in fact, I had to run `/usr/share/logstash/bin/system-install` which I did not clearly see in the documentation.

I had also to change JAVACMD in `/etc/logstash/startup.options`.

it has generated the `/etc/systemd/system/logstash.service` file

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [March 22, 2018, 12:57pm UTC](https://discuss.elastic.co/t/systemd-logstash-service/125083/5 "2018-03-22T12:57:48Z")

</div>

Indeed. If you have multiple or separate Java instances, this must be set before `system-install` will work. Glad you figured it out.

---

<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:** [April 19, 2018, 12:58pm UTC](https://discuss.elastic.co/t/systemd-logstash-service/125083/6 "2018-04-19T12:58:02Z")

</div>

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