Enable grafana https with encrypted certificate private key/crt files

Hi , we are trying to setup https in Grafana (in k8s) with certificate file using cert_file and cert_key configurations , but when the certificate files (.crt and .key) encrypted/ or password protected grafana deployment failed.

Error:-----------
t=2020-05-18T12:19:27+0000 lvl=info msg=“Stopped PluginManager” logger=server reason=“context canceled”
t=2020-05-18T12:19:27+0000 lvl=eror msg=“A service failed” logger=server err=“tls: failed to parse private key”
*t=2020-05-18T12:19:27+0000 lvl=eror msg=“Server shutdown” logger=server reason=“tls: failed to parse private key”

Do you have any idea about Grafana support for encrypted certificate private key/crt files in enabling https?
when we use certificate without password then it’s working fine.

Grafana doesn’t support encrypted certificates.
What would you expect Grafana to do when you try to start with encrypted certificates?

Thanks emiltullstedt , it was one of the customer request , as they used to work with encrypted certificates in their other processes.

I’m running into a similar problem with having an encrypted certificate private key. Could Grafana work like nginx where it is provided file with the password? I realize it isn’t ideal, but it could work at least.

HI there
if your key is protected with password try to decrypt it first and save as pem file
check below.

openssl rsa -in client_priv.key -out client_priv.pem

1 Like