# How to use SSL LetsEncrypt in Kibana?

**URL:** https://discuss.elastic.co/t/how-to-use-ssl-letsencrypt-in-kibana/255446
**Category:** Kibana
**Tags:** elastic-stack-security
**Created:** [November 15, 2020, 7:41pm UTC](https://discuss.elastic.co/t/how-to-use-ssl-letsencrypt-in-kibana/255446 "2020-11-15T19:41:11Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![houmie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/houmie/32/78999_2.png) [@houmie](https://discuss.elastic.co/u/houmie)
#### Post date: [November 15, 2020, 7:41pm UTC](https://discuss.elastic.co/t/how-to-use-ssl-letsencrypt-in-kibana/255446/1 "2020-11-15T19:41:11Z")

</div>

Hello,

Kibana can't start and throw this permission error in journal:

```auto
{ Error: EACCES: permission denied, open '/etc/kibana/privkey.pem'

```

I'm using Let's encrypt to get the domain certified:

So all I did was creating a link in the Kibana directory, hoping the permissions should be fine:

```auto
ln -f -s /etc/letsencrypt/live/api-s2.app.net/cert.pem /etc/kibana/cert.pem
ln -f -s /etc/letsencrypt/live/api-s2.app.net/privkey.pem /etc/kibana/privkey.pem

```

**Kibana.yml**

```auto
server.port: 5009
server.host: "0.0.0.0"
elasticsearch.hosts: ["http://localhost:9999"]
elasticsearch.username: "kibana_system"
elasticsearch.password: "MyPasswrd"
xpack.security.encryptionKey: "tqSaBwqe76htDFzJkezFD7pvtXkKlYHU"
xpack.security.session.idleTimeout: "1h"
xpack.security.session.lifespan: "30d"
server.ssl.enabled: true
server.ssl.certificate: /etc/kibana/cert.pem
server.ssl.key: /etc/kibana/privkey.pem

```

The content of /etc/kibana is in below, so the permissions seem fine.

```auto
-rw-rw---- 1 root kibana 419 Nov 15 19:32 kibana.yml
lrwxrwxrwx 1 root kibana 51 Nov 15 19:32 privkey.pem -> /etc/letsencrypt/live/api-s2.app.net/privkey.pem
lrwxrwxrwx 1 root kibana 48 Nov 15 19:31 cert.pem -> /etc/letsencrypt/live/api-s2.app.net/cert.pem
-rw-r----- 1 root kibana 4883 Nov 15 13:55 kibana.org
-rw-r--r-- 1 root kibana 216 Nov 9 22:16 node.options

```

How can I solve this please?

UPDATE:  
In case someone is going to suggest this blog post: [https://www.elastic.co/blog/x-pack-security-for-elasticsearch-with-lets-encrypt-certificates](https://www.elastic.co/blog/x-pack-security-for-elasticsearch-with-lets-encrypt-certificates)

There is a problem that may have been missed. Let's Encrypt automatically updates the certificates every three month. Therefore it's best to link the files as I have shown above. Copying them as the blog suggests lasts only three month and expires then. This is not a good solution. Thanks

---

<div class="post-metadata">

### Author: ![houmie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/houmie/32/78999_2.png) [@houmie](https://discuss.elastic.co/u/houmie)
#### Post date: [November 19, 2020, 3:17pm UTC](https://discuss.elastic.co/t/how-to-use-ssl-letsencrypt-in-kibana/255446/2 "2020-11-19T15:17:00Z")

</div>

So there is no solution to this?

---

<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: [December 17, 2020, 3:17pm UTC](https://discuss.elastic.co/t/how-to-use-ssl-letsencrypt-in-kibana/255446/3 "2020-12-17T15:17:43Z")

</div>

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