# Accessing kibana over HTTPS

**URL:** https://discuss.elastic.co/t/accessing-kibana-over-https/227677
**Category:** Kibana
**Created:** [April 12, 2020, 2:18pm UTC](https://discuss.elastic.co/t/accessing-kibana-over-https/227677 "2020-04-12T14:18:08Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![lw24](https://avatars.discourse-cdn.com/v4/letter/l/4491bb/32.png) [@lw24](https://discuss.elastic.co/u/lw24)
#### Post date: [April 12, 2020, 2:18pm UTC](https://discuss.elastic.co/t/accessing-kibana-over-https/227677/1 "2020-04-12T14:18:09Z")

</div>

I have tried to follow the steps outlined under "Detections configuration and index privilege prerequisites"

I have modified elasticsearch.yml to be:

`network.host: 0.0.0.0`  
`http.port: 9200`  
`xpack.security.enabled: true`  
`xpack.security.transport.ssl.enabled: true`  
`xpack.security.transport.ssl.verification_mode: certificate`  
`xpack.security.transport.ssl.keystore.path: "/etc/elasticsearch/elastic-certificates.p12"`  
`xpack.security.transport.ssl.truststore.path: "/etc/elasticsearch/elastic-certificates.p12"`

`xpack.security.http.ssl.enabled: true`  
`xpack.security.http.ssl.keystore.path: "/etc/elasticsearch/http.p12"`

And have edited kibana.yml to be:

`elasticsearch.hosts: ["https://localhost:9200"]`  
`elasticsearch.username: "kibana"`  
`elasticsearch.password: "password"`  
`elasticsearch.ssl.certificateAuthorities: ["/etc/kibana/elasticsearch-ca.pem"]`  
`xpack.encryptedSavedObjects.encryptionKey: 'fhjskloppd678ehkdfdlproglsaeface'`

When I now try and connect to [https://IP:5601](https://IP:5601) I get "This site can't be reached".  
When I connect over [https://IP:9200](https://IP:9200) I get put my user and password in and get a JSON prinout.

Seems as if Kibana to Elasticsearch is encrypted but Kibana to browser is not working over https properly?

---

<div class="post-metadata">

### Author: ![rugenl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rugenl/32/12887_2.png) [@rugenl](https://discuss.elastic.co/u/rugenl)
#### Post date: [April 12, 2020, 4:51pm UTC](https://discuss.elastic.co/t/accessing-kibana-over-https/227677/2 "2020-04-12T16:51:10Z")

</div>

You would also need to configure and start Kibana, particularly [this section](https://www.elastic.co/guide/en/kibana/7.6/security-settings-kb.html) and the server.ssl.enabled option set to True.

Check for KIbana errors and "netstat -an | grep 5601" to see if Kibana is listening on the port.

---

<div class="post-metadata">

### Author: ![lw24](https://avatars.discourse-cdn.com/v4/letter/l/4491bb/32.png) [@lw24](https://discuss.elastic.co/u/lw24)
#### Post date: [April 13, 2020, 4:07pm UTC](https://discuss.elastic.co/t/accessing-kibana-over-https/227677/3 "2020-04-13T16:07:24Z")

</div>

I have added:

> server.ssl.enabled: true  
> server.ssl.certificate: "kibana-server.p12"  
> server.ssl.key: "kibana-server.p12"

to kibana.yml. The cert was generated using the elasticsearch CA I previously generated.

I have tried to check if kibana is listening on 5601, but it seems kibana isn't starting.

I get the following error:

> ● kibana.service - Kibana  
> Loaded: loaded (/etc/systemd/system/kibana.service; enabled; vendor preset: enabled)  
> Active: failed (Result: exit-code) since Mon 2020-04-13 08:55:39 PDT; 3min 43s ago  
> Process: 89150 ExecStart=/usr/share/kibana/bin/kibana -c /etc/kibana/kibana.yml (code=exited, status=1/FAILURE)  
> Main PID: 89150 (code=exited, status=1/FAILURE)  
> Apr 13 08:55:39 ubuntu systemd[1]: kibana.service: Service hold-off time over, scheduling r  
> Apr 13 08:55:39 ubuntu systemd[1]: kibana.service: Scheduled restart job, restart counter i  
> Apr 13 08:55:39 ubuntu systemd[1]: Stopped Kibana.  
> Apr 13 08:55:39 ubuntu systemd[1]: kibana.service: Start request repeated too quickly.  
> Apr 13 08:55:39 ubuntu systemd[1]: kibana.service: Failed with result 'exit-code'.  
> Apr 13 08:55:39 ubuntu systemd[1]: Failed to start Kibana.

I've tried looking in /var/log/kibana but that directory doesn't exist so don't know how best to troubleshoot from here.

Any help would be appreciated!

---

<div class="post-metadata">

### Author: ![rugenl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rugenl/32/12887_2.png) [@rugenl](https://discuss.elastic.co/u/rugenl)
#### Post date: [April 13, 2020, 4:09pm UTC](https://discuss.elastic.co/t/accessing-kibana-over-https/227677/4 "2020-04-13T16:09:44Z")

</div>

Kibana sometimes logs to /var/log/messages or you can start it from the command line to test.

---

<div class="post-metadata">

### Author: ![lw24](https://avatars.discourse-cdn.com/v4/letter/l/4491bb/32.png) [@lw24](https://discuss.elastic.co/u/lw24)
#### Post date: [April 13, 2020, 4:27pm UTC](https://discuss.elastic.co/t/accessing-kibana-over-https/227677/5 "2020-04-13T16:27:41Z")

</div>

I managed to find relevant logs with:

> sudo tail -n 100 /var/log/syslog

There were a bunch of issues I remedied:

In kibana.yml I had a line "elasticsearch.url: [..." which was erroring, it needs to be elasticsearch.hosts.

I had to provide it the full path to the ssl certificate and key, and give it permissions to these, though after doing so it now starts, but errors with:

> FATAL Error 0906D06C:PEM routines:PEM\_read\_bio:no start line

Apparently kibana can't read .p12 certs, so will need to generate ones in .pem format. Will report back on 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: [May 11, 2020, 4:27pm UTC](https://discuss.elastic.co/t/accessing-kibana-over-https/227677/6 "2020-05-11T16:27:54Z")

</div>

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