# HTTPS not working in Docker container

**URL:** <https://community.influxdata.com/t/https-not-working-in-docker-container/24621>\
**Category:** InfluxDB 2\
**Created:** [April 12, 2022, 11:29am UTC](https://community.influxdata.com/t/https-not-working-in-docker-container/24621 "2022-04-12T11:29:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hej](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/hej/32/9888_2.png) [@hej](https://community.influxdata.com/u/hej)\
**Post date:** [April 12, 2022, 11:29am UTC](https://community.influxdata.com/t/https-not-working-in-docker-container/24621/1 "2022-04-12T11:29:46Z")

</div>

Hi all,

I’m a newbie and I am trying to setup an InfluxDB 2.2 container with HTTPS.

- I have set INFLUXD\_TSL\_KEY and INFLUXD\_TSL\_CERT in Docker Compose.
- I have letsencrypt certs, the folder containing these files is mapped to “/etc/ssl/” in Docker Compose
- The certs are valid (used by other containers on same host / different port)
- HTTP works fine on port 8086, I can access the GUI and I can log in.
- HTTPS does not work:
  - firefox, safari and chrome all fail (ff for example says “SSL\_ERROR\_RX\_RECORD\_TOO\_LONG”)
  - `curl -v https://192.168.1.20:8086/api/v2/ping` fails with error “alert protocol version”.

- Using CLI, I can see the key and cert file under /etc/ssl/, hence Docker Compose mapping seems to work.

In the container logs, I do not see any error so far unfortunately.

Has anyone an idea what the issue could be?

---

<div class="post-metadata">

**Author:** ![Lisenet](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/lisenet/32/9891_2.png) [@Lisenet](https://community.influxdata.com/u/Lisenet)\
**Post date:** [April 12, 2022, 9:21pm UTC](https://community.influxdata.com/t/https-not-working-in-docker-container/24621/2 "2022-04-12T21:21:15Z")

</div>

You’ve a typo, the env variables are INFLUXD\_TLS\_CERT and INFLUXD\_TLS\_KEY.

---

<div class="post-metadata">

**Author:** ![hej](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/hej/32/9888_2.png) [@hej](https://community.influxdata.com/u/hej)\
**Post date:** [April 13, 2022, 5:11am UTC](https://community.influxdata.com/t/https-not-working-in-docker-container/24621/3 "2022-04-13T05:11:13Z")

</div>

noooooo… How did I miss this for hours. 🙈

Thanks!!
