After I have successfully installed InfluxDB V2 on my server I would like to use it with TLS encryption. I followed the related documentation.
Everything works fine if I start InfluxDB in the described way:
influxd --tls-cert="<path-to-crt>" --tls-key="<path-to-key>"
I can access the influxDB gui by calling https://servername:8086
But up to now I have started InfluxDB this way:
sudo systemctl start influxd
In my understanding this is the preferred way, though (to be honest) I’m not completely sure about the differences between both ways. Maybe someone can drop some words about the differences?
To enable the certificate I tried to add the following lines to my /etc/influxdb/config.toml
tls-cert = "/etc/influxdb/influxdb.crt"
tls-key = "/etc/influxdb/ifluxdb.key"
Both are links to the actual certificate-files. I used the same path in the direct call to influxd given above.
Now I can start influxdb but it is still accessible as http://servername:8086 and the https::// variant gives an error message.
Can someone help how to use encryption while starting influxdb via systemctl
?