# Kibana Install Error - should not run as root

**URL:** <https://discuss.elastic.co/t/kibana-install-error-should-not-run-as-root/220929>\
**Category:** Kibana\
**Created:** [February 25, 2020, 9:54pm UTC](https://discuss.elastic.co/t/kibana-install-error-should-not-run-as-root/220929 "2020-02-25T21:54:42Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Technolust](https://avatars.discourse-cdn.com/v4/letter/t/dbc845/32.png) [@Technolust](https://discuss.elastic.co/u/Technolust)\
**Post date:** [February 25, 2020, 9:54pm UTC](https://discuss.elastic.co/t/kibana-install-error-should-not-run-as-root/220929/1 "2020-02-25T21:54:42Z")

</div>

Elk Stack newbie here... When I install Kibana on Centos 8 I get an error on install saying that I should not run ./bin/kibana as root. Do I need to create a specific user called "Kibana" instead of running as sudo? When I run it as current user "elkstackadmin" I get errors that Babel could not write cache to file /kibana-7.6.0-linux-x86\_64/optimize/.babel\_register\_cache.json due to a permission issue. Cache is disabled...

Any insight on this would be extremely helpful.

Thanks,

Technolust

---

<div class="post-metadata">

**Author:** ![joshdover](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joshdover/32/42020_2.png) [@joshdover](https://discuss.elastic.co/u/joshdover)\
**Post date:** [February 25, 2020, 10:45pm UTC](https://discuss.elastic.co/t/kibana-install-error-should-not-run-as-root/220929/2 "2020-02-25T22:45:18Z")

</div>

You can either create a new user or give the elkstackadmin user ownership of the kibana installation, with `chown -R elkstackadmin /kibana-7.6.0-linux-x86_64`

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 25, 2020, 10:51pm UTC](https://discuss.elastic.co/t/kibana-install-error-should-not-run-as-root/220929/3 "2020-02-25T22:51:31Z")

</div>

You can - should - also use the RPM repo to install it, it'll create the user for you.

---

<div class="post-metadata">

**Author:** ![Technolust](https://avatars.discourse-cdn.com/v4/letter/t/dbc845/32.png) [@Technolust](https://discuss.elastic.co/u/Technolust)\
**Post date:** [February 26, 2020, 2:57pm UTC](https://discuss.elastic.co/t/kibana-install-error-should-not-run-as-root/220929/4 "2020-02-26T14:57:08Z")

</div>

Thanks Mark,

Are you referring to the method where you manually add the repo to yum.repos.d

Create a file called `kibana.repo` in the `/etc/yum.repos.d/`  
then sudo yum install kibana

or

the method where you download the rpm:

wget [https://artifacts.elastic.co/downloads/kibana/kibana-7.6.0-x86\_64.rpm](https://artifacts.elastic.co/downloads/kibana/kibana-7.6.0-x86_64.rpm)  
shasum -a 512 kibana-7.6.0-x86\_64.rpm  
sudo rpm --install kibana-7.6.0-x86\_64.rpm

Sorry the elastic site is not very clear on which method is best to use and super convoluted to try and figure out. I've pretty much built the server like 4 times now. "Thank the lord for VMWare!"

Joe

---

<div class="post-metadata">

**Author:** ![Technolust](https://avatars.discourse-cdn.com/v4/letter/t/dbc845/32.png) [@Technolust](https://discuss.elastic.co/u/Technolust)\
**Post date:** [February 26, 2020, 3:00pm UTC](https://discuss.elastic.co/t/kibana-install-error-should-not-run-as-root/220929/6 "2020-02-26T15:00:19Z")

</div>

I rebuilt the server last night but passed out before I coulds try this. Sine the elastic site isn't very clear on which way to install/configure should I use the (Add repo to yum.repos.d or download the rpm method). Which is best practice?

Technolust

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 26, 2020, 7:50pm UTC](https://discuss.elastic.co/t/kibana-install-error-should-not-run-as-root/220929/7 "2020-02-26T19:50:11Z")

</div>

We provide options so that people can pick what they prefer.

If you aren't sure, use the repos.

---

<div class="post-metadata">

**Author:** ![Technolust](https://avatars.discourse-cdn.com/v4/letter/t/dbc845/32.png) [@Technolust](https://discuss.elastic.co/u/Technolust)\
**Post date:** [February 26, 2020, 10:19pm UTC](https://discuss.elastic.co/t/kibana-install-error-should-not-run-as-root/220929/8 "2020-02-26T22:19:39Z")

</div>

Thanks Mark, I just wasn't sure if one way was better/standard over the other. I'm a newbie to ELK stack. I will try the method of manually adding the repos by creating a kibana user and installing under the kibana user.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 26, 2020, 10:28pm UTC](https://discuss.elastic.co/t/kibana-install-error-should-not-run-as-root/220929/9 "2020-02-26T22:28:52Z")

</div>

You need to add the repo as the root user. Then when you install the package from the repo it will create all the users it needs to run Kibana.

---

<div class="post-metadata">

**Author:** ![Technolust](https://avatars.discourse-cdn.com/v4/letter/t/dbc845/32.png) [@Technolust](https://discuss.elastic.co/u/Technolust)\
**Post date:** [February 27, 2020, 8:35pm UTC](https://discuss.elastic.co/t/kibana-install-error-should-not-run-as-root/220929/10 "2020-02-27T20:35:59Z")

</div>

Thanks Mark, I have elasticsearch and kibana installed. Next is to install metricbeats, do I need to install this on the same server or metricbeats goes on the clients?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 27, 2020, 10:15pm UTC](https://discuss.elastic.co/t/kibana-install-error-should-not-run-as-root/220929/11 "2020-02-27T22:15:29Z")

</div>

Depends what you are monitoring. If it's system metrics then you would want both, so you can monitor your clients and the Kibana host.

---

<div class="post-metadata">

**Author:** ![Technolust](https://avatars.discourse-cdn.com/v4/letter/t/dbc845/32.png) [@Technolust](https://discuss.elastic.co/u/Technolust)\
**Post date:** [February 27, 2020, 10:36pm UTC](https://discuss.elastic.co/t/kibana-install-error-should-not-run-as-root/220929/12 "2020-02-27T22:36:41Z")

</div>

Ok that makes sense because now I finally got Kibana loaded on firefox. Of course this is the local server to where elasticsearch, kibanan, and now metricbeats is installed. Gotta install logstash tonight or tomorrow.

---

<div class="post-metadata">

**Author:** ![Technolust](https://avatars.discourse-cdn.com/v4/letter/t/dbc845/32.png) [@Technolust](https://discuss.elastic.co/u/Technolust)\
**Post date:** [March 2, 2020, 1:48pm UTC](https://discuss.elastic.co/t/kibana-install-error-should-not-run-as-root/220929/13 "2020-03-02T13:48:45Z")

</div>

Mark,

Thank you for all the help. I was able to get this up and running finally. However, I'm getting high CPU from Java like 275% CPU when I run top. Not sure what could be causing it as the only thing that required Java was logstash and the only thing I have reporting from the ELK stack is the ELK stack server itself. Thoughts on what would be causing this and how to fix? Also should I be concerned?

Thanks,

Joe

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 2, 2020, 9:01pm UTC](https://discuss.elastic.co/t/kibana-install-error-should-not-run-as-root/220929/14 "2020-03-02T21:01:27Z")

</div>

Not sure sorry, checking the Logstash logs might help.

---

<div class="post-metadata">

**Author:** ![Technolust](https://avatars.discourse-cdn.com/v4/letter/t/dbc845/32.png) [@Technolust](https://discuss.elastic.co/u/Technolust)\
**Post date:** [March 3, 2020, 9:17pm UTC](https://discuss.elastic.co/t/kibana-install-error-should-not-run-as-root/220929/15 "2020-03-03T21:17:21Z")

</div>

Ok, that didn't helps. I will look through the other posts.

---

<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:** [March 31, 2020, 9:17pm UTC](https://discuss.elastic.co/t/kibana-install-error-should-not-run-as-root/220929/16 "2020-03-31T21:17:24Z")

</div>

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