Using InfluxDB with TLS encryption

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?

systemctl (with systemd) is the “standard” Linux-way for running and managing services. Since you’re using systemctl to start/stop/manage the influxd process, you should have a service configuration for InfluxDB where you can set the influxd tls-* option flags. See the install InfluxDB steps for Linux.

@Jason_Stirnaman thank you very much for your answer!

In the end it was easier as expected (as often, the problem sits in front of the computer :crazy_face:).
I have simply misspelled the name of the key-file, even visible in my 1st post (missing ‘n’ in influx).
I tried the instructions given in your link, but in the end having the right entry in the config.toml was all that is needed. Anyhow, I learned a lot about journalctl. I think it was worth the invested time to find the issue.