Https Setup for influxdb docker image

I am trying to setup https with influx docker image. I followed steps given in documentation here: and generated certs, stored them at required location and added that location to influxdb.conf. Now it is unable to find the file, so I wanted to check if influxdb container would be able to get these certs from local machine where infludb docker is running or they have to be stored inside the container along with influxdb?


You should mount docker volume with local directory which contain Your certficate, lets say that you have Your certificate files (certificate.pem or certificate.crt and certificate.key) under “/opt/ssl” then You should mount volume like this:
-v /opt/ssl/:/etc/ssl/

And of course don’t forget to set environment variables for InfluxDB, something like:

1 Like

Even after mounting the volume I get an error:
run: open server: open service: open /etc/ssl/influxdb-selfsigned.crt: no such file or directory,

I ran the command:
docker run -p 8086:8086 -v /etc/ssl:/etc/ssl containerID

and was using dockerfile from here:


Does Your local directory /etc/ssl contains influxdb-selfsigned.crt and .key?

docker run -p 8086:8086 -v /etc/ssl:/etc/ssl -e INFLUXDB_HTTP_HTTPS_ENABLED=true -e INFLUXDB_HTTP_HTTPS_CERTIFICATE=/etc/ssl/influxdb-selfsigned.crt -e INFLUXDB_HTTP_HTTPS_PRIVATE_KEY=/etc/ssl/influxdb-selfsigned.key containerID