# Xpack not loading correctly

**URL:** <https://discuss.elastic.co/t/xpack-not-loading-correctly/123664>\
**Category:** Elasticsearch\
**Created:** [March 13, 2018, 1:40am UTC](https://discuss.elastic.co/t/xpack-not-loading-correctly/123664 "2018-03-13T01:40:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DevT](https://avatars.discourse-cdn.com/v4/letter/d/e495f1/32.png) [@DevT](https://discuss.elastic.co/u/DevT)\
**Post date:** [March 13, 2018, 1:40am UTC](https://discuss.elastic.co/t/xpack-not-loading-correctly/123664/1 "2018-03-13T01:40:56Z")

</div>

Hello, I get these errors when I start Kibana. How do I "please set xpack.security.encryptionKey in kibana.yml"?

 ![kibana_error](https://us1.discourse-cdn.com/elastic/original/3X/0/e/0e682323742079b59e3a44a6fd6b37b9127ba08f.png)

---

<div class="post-metadata">

**Author:** ![ikakavas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ikakavas/32/34430_2.png) [@ikakavas](https://discuss.elastic.co/u/ikakavas)\
**Post date:** [March 13, 2018, 5:02am UTC](https://discuss.elastic.co/t/xpack-not-loading-correctly/123664/2 "2018-03-13T05:02:45Z")

</div>

Hi,

Please use text ( wrapped in `</>` ) when sharing log output, instead of screenshots. It makes it easier to go through it, search for it, etc.

The message you get regarding the `encryptionKey` is a warning. `encryptionKey` is used in order to encrypt the user's credentials before they're stored in a cookie. Kibana auto-generates a secure one for you, if you don't explicitly set it, which is fine from an encryption perspective, but inconvenient as every time you restart Kibana, a new one is generated and all existing cookies will thus get invalidated.

You can use any string ( longer than 32 chars ) as the`encryptionKey` but you want to make sure that it is random enough so that adversaries cannot guess it.

> [@DevT](#):
>
> How do I "please set xpack.security.encryptionKey in kibana.yml"?

You generate a 32 char string, then open kibana.yml and you add a line like the following:  
`xpack.security.encryptionKey: <The string your generated above>`

The `error` messages you have highlighted in the picture were thrown because for some milliseconds, Elasticsearch was not up and running yet, it was resolved and all Status messages turned to green below.

---

<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 10, 2018, 5:03am UTC](https://discuss.elastic.co/t/xpack-not-loading-correctly/123664/3 "2018-04-10T05:03:05Z")

</div>

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