# Cant access kibana over https

**URL:** <https://discuss.elastic.co/t/cant-access-kibana-over-https/312924>\
**Category:** Kibana\
**Tags:** docker\
**Created:** [August 25, 2022, 1:27pm UTC](https://discuss.elastic.co/t/cant-access-kibana-over-https/312924 "2022-08-25T13:27:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cihady](https://avatars.discourse-cdn.com/v4/letter/c/8797f3/32.png) [@cihady](https://discuss.elastic.co/u/cihady)\
**Post date:** [August 25, 2022, 1:27pm UTC](https://discuss.elastic.co/t/cant-access-kibana-over-https/312924/1 "2022-08-25T13:27:50Z")

</div>

I am using docker-compose file below. I believe, I set all the necessary options for https but when I try to connect kibana over https I cant reach but I can over http. Do you have any idea,  
What is wrong with my configurations.

```auto
version: '2.2'

services:

  elasticsearch:
    image: elastic:7.9.2
    container_name: elasticsearch
    environment:
      - node.name=elasticsearch
      - discovery.seed_hosts=elasticsearch
      - cluster.initial_master_nodes=elasticsearch
      - cluster.name=docker-cluster
      - network.host=0.0.0.0
      - "ES_JAVA_OPTS=-Xms4g -Xmx4g"
      - ELASTIC_PASSWORD=1@123
      - path.logs=/usr/share/elasticsearch/logs
      - xpack.security.enabled=true
      - xpack.security.http.ssl.keystore.path=elastic-certificates.p12
      - xpack.security.http.ssl.truststore.path=elastic-certificates.p12
      - xpack.security.http.ssl.client_authentication=optional
      - xpack.security.transport.ssl.enabled=true
    volumes:
      - /home/elasticsearch/data:/usr/share/elasticsearch/data
      - /home/elasticsearch/logs:/usr/share/elasticsearch/logs
      - /home/elasticsearch/config/elastic-certificates.p12:/usr/share/elasticsearch/config/elastic-certificates.p12
      - /home/elasticsearch/config/elastic-stack-ca.p12:/usr/share/elasticsearch/config/elastic-stack-ca.p12
    user : "1000:1000"
    ulimits:
      memlock:
        soft: -1
        hard: -1
      nofile:
        soft: "65536"
        hard: "65536"
    ports:
      - 9200:9200
      - 9300:9300

  kibana:
    image: kibana:7.9.2
    container_name: kibana
    environment:
            - ELASTICSEARCH_URL="https://elasticsearch:9200"
            - ELASTICSEARCH_USERNAME=elastic
            - ELASTICSEARCH_PASSWORD=1@123
            - server.ssl.enabled=true
            - server.ssl.certificate=ca.crt
            - server.ssl.key=ca.key

    ports:
      - 5601:5601
    depends_on:
      - elasticsearch
    volumes:
      - /home/elasticsearch/config/newfile.crt.pem:/usr/share/kibana/config/ca.crt
      - /home/elasticsearch/config/newfile.key.pem:/usr/share/kibana/config/ca.key

```

---

<div class="post-metadata">

**Author:** ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)\
**Post date:** [September 6, 2022, 12:58pm UTC](https://discuss.elastic.co/t/cant-access-kibana-over-https/312924/2 "2022-09-06T12:58:36Z")

</div>

I think you need to translate your environment variables into capitals and separated by underscores. From the [docs](https://www.elastic.co/guide/en/kibana/8.4/docker.html#environment-variable-config):

> For compatibility with container orchestration systems, these environment variables are written in all capitals, with underscores as word separators. The helper translates these names to valid Kibana setting names.

---

<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:** [October 4, 2022, 12:59pm UTC](https://discuss.elastic.co/t/cant-access-kibana-over-https/312924/3 "2022-10-04T12:59:17Z")

</div>

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