# Run Kibana in Linux as a service

**URL:** <https://discuss.elastic.co/t/run-kibana-in-linux-as-a-service/89105>\
**Category:** Kibana\
**Created:** [June 12, 2017, 8:18pm UTC](https://discuss.elastic.co/t/run-kibana-in-linux-as-a-service/89105 "2017-06-12T20:18:00Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevinc1029](https://avatars.discourse-cdn.com/v4/letter/k/41988e/32.png) [@kevinc1029](https://discuss.elastic.co/u/kevinc1029)\
**Post date:** [June 12, 2017, 8:18pm UTC](https://discuss.elastic.co/t/run-kibana-in-linux-as-a-service/89105/1 "2017-06-12T20:18:00Z")

</div>

I'm accessing a Linux VM through a terminal and I want to run Kibana as a service, so when I exit it will still be running.

What are the best ways to do this? Write a script?

---

<div class="post-metadata">

**Author:** ![Stacey\_Gammon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stacey_gammon/32/14025_2.png) [@Stacey\_Gammon](https://discuss.elastic.co/u/Stacey_Gammon)\
**Post date:** [June 12, 2017, 8:30pm UTC](https://discuss.elastic.co/t/run-kibana-in-linux-as-a-service/89105/2 "2017-06-12T20:30:05Z")

</div>

Your question looks similar to this past post, which may provide some helpful suggestions: [Running kibana as a service on Linux](https://discuss.elastic.co/t/running-kibana-as-a-service-on-linux/72021)

---

<div class="post-metadata">

**Author:** ![kevinc1029](https://avatars.discourse-cdn.com/v4/letter/k/41988e/32.png) [@kevinc1029](https://discuss.elastic.co/u/kevinc1029)\
**Post date:** [June 12, 2017, 8:34pm UTC](https://discuss.elastic.co/t/run-kibana-in-linux-as-a-service/89105/3 "2017-06-12T20:34:36Z")

</div>

I don't have root access to do `service start` so that's not an option to me.

---

<div class="post-metadata">

**Author:** ![weltenwort](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weltenwort/32/53885_2.png) [@weltenwort](https://discuss.elastic.co/u/weltenwort)\
**Post date:** [June 13, 2017, 7:30am UTC](https://discuss.elastic.co/t/run-kibana-in-linux-as-a-service/89105/4 "2017-06-13T07:30:26Z")

</div>

Usually a supervisor process (e.g. the init system) is used to reliably run any daemon for a long time. Without root permissions it is usually not possible to register new processes with the init system. If your linux distribution uses systemd as the init process and is configured to use lingering user sessions, you might be able to use that to avoid the need for root permissions.

Could you give us more details about your deployment environment and requirements?

---

<div class="post-metadata">

**Author:** ![kevinc1029](https://avatars.discourse-cdn.com/v4/letter/k/41988e/32.png) [@kevinc1029](https://discuss.elastic.co/u/kevinc1029)\
**Post date:** [June 13, 2017, 3:54pm UTC](https://discuss.elastic.co/t/run-kibana-in-linux-as-a-service/89105/5 "2017-06-13T15:54:06Z")

</div>

Linux machine in stage and uses sysvinit. I do not have root access and network access but I can transfer files to the machine.

I've set up the ELK stack and it runs, and I am able to set ElasticSearch and Filebeat to run as service. Just not sure how to do the same for Kibana-5.4.0-linux-x86\_64.

---

<div class="post-metadata">

**Author:** ![weltenwort](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weltenwort/32/53885_2.png) [@weltenwort](https://discuss.elastic.co/u/weltenwort)\
**Post date:** [June 13, 2017, 4:39pm UTC](https://discuss.elastic.co/t/run-kibana-in-linux-as-a-service/89105/6 "2017-06-13T16:39:11Z")

</div>

So you just want to start Kibana in the background. There is no built-in support for that, because there is the `nohup` posix tool, that does that. From a shell you should be able to just execute

```
$ nohup bin/kibana &

```

from the directory Kibana was unpacked into.

Alternatively you can use a tool like `screen` or `tmux` to create a long-lived shell session, that can be detached from.

I want to point out again, that this is **not** a recommended way of running any service reliably. The official `deb` or `rpm` packages provide init scripts and unit files for proper integration with some popular init systems and supervisors.

---

<div class="post-metadata">

**Author:** ![kevinc1029](https://avatars.discourse-cdn.com/v4/letter/k/41988e/32.png) [@kevinc1029](https://discuss.elastic.co/u/kevinc1029)\
**Post date:** [June 13, 2017, 5:14pm UTC](https://discuss.elastic.co/t/run-kibana-in-linux-as-a-service/89105/7 "2017-06-13T17:14:07Z")

</div>

Thanks. Don't `dep` or `rpm` packages requires root access to run or configure the files?

---

<div class="post-metadata">

**Author:** ![weltenwort](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weltenwort/32/53885_2.png) [@weltenwort](https://discuss.elastic.co/u/weltenwort)\
**Post date:** [June 13, 2017, 6:35pm UTC](https://discuss.elastic.co/t/run-kibana-in-linux-as-a-service/89105/8 "2017-06-13T18:35:28Z")

</div>

Yes, they do. And that is by design, because you don't want an unprivileged user to be able to modify the system in such a way that it might impact stability or security of the system overall.

---

<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 11, 2017, 6:35pm UTC](https://discuss.elastic.co/t/run-kibana-in-linux-as-a-service/89105/9 "2017-07-11T18:35:39Z")

</div>

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