How to add certificate for Grafana Windows

hello the community
There must be a tutorial but I spent hours looking without finding it.

I would like to use grafana with an https URL.
I have a certificate that I think I configure well in custom.ini but the service no longer starts when changing the protocol.

If you have an idea that will be great.

Protocol (http, https, h2, socket)
protocol = https

The ip address to bind to, empty will bind to all interfaces
http_addr =

The http port to use
http_port = 3000

The public facing domain name used to access grafana from a browser
domain = dashboard.xxx.fr

Redirect to correct domain if host header does not match domain
Prevents DNS rebinding attacks
enforce_domain = false

The full public facing url
root_url = %(protocol)s://%(domain)s:%(http_port)s/

Serve Grafana from subpath specified in `root_url` setting. By default it is set to `false` for compatibility reasons.
serve_from_sub_path = false

Log web requests
router_logging = false

the path relative working path
static_root_path = public

enable gzip
enable_gzip = false

https certs & key file
cert_file = C:\xxx\certificat\_.xxx.fr-crt.pem
cert_key = C:\xxx\certificat\_.xxx.fr-key.pem

Hi @sluchini,

Thanks for reporting this post. Yes, currently we do not have any blog post or documentation which describes how to add certificates in Grafana for Windows.

One main reason is that as there are so many ways to do this on Windows so one specific type of method may not be applicable to other users.

However, this question has been asked time n time again and users got also answers. I simply search in the forum and found many posts related to it:

https://community.grafana.com/search?q=grafana%20windows%20https

Also, found this video guide which explain how to setup SSL on Windows (you can skip out the other parts e.g. Alertmanager etc as you do not need it).

I hope this helps.

This also works well

1 Like

ok thank you there is something wrong because it is not working.
I’ll look.

that helped so much - thanks

1 Like