Grafana SSL – How to configure HTTPS
Here is a quick guide to configuring a self-signed SSL certificate in Grafana, allowing you to browse to:
What is Grafana?
Grafana and Prometheus will give you a great solution if you need monitoring dashboards.
Want to create your own TIG Stack?(Telegraf, InfluxDB and Grafana) – Check out this procedure
By default, SSL is not installed in the free, self-hosted community edition of Grafana. However, SSL is configured automatically for those who opt for the cloud version. To set up SSL on the self-hosted version, you will require sudo access to the
Here’s where you should look:
grafana.ini file, you’ll need to modify two key fields:
Step 1 – Create a Grafana SSL Certificate
For those on Red Hat Linux (or CentOS), follow the steps below. If you’re on a different Linux distribution, please refer to its specific documentation.
Execute the following command:
The expected output should appear as follows:
Step 2 – Generate a certificate signing request
From the command line, type:
The corresponding output will look something like this:
Step 3 – Output the certificate
Now from the command line, type:
After which, you’ll see this output:
Step 4 – Set certificate key file ownership
Run the following commands:
Step 5 – Transfer the certificate and key file to Grafana’s installation directory
Move files using:
Step 6 – Edit the Grafana.ini file
Open the file with:
Search for the #HTTP options and set the properties accordingly:
Once done, save and exit the file. Proceed by restarting the Grafana service:
Step 7 – Access via the server IP
Finally, when you navigate to the server’s IP address using a web browser, you’ll encounter a warning due to the Self Signed Certificate. The prompt will appear as follows:
Note: You will always have to accept this prompt (only once) unless you have purchased a Signed Certificate from a certificate authority vendor such as https://www.digicert.com/
Want to know how to put certs on a Grafana container and how to make a Grafana container HTTPS? Simply run
and follow the same procedure above.
That’s it; thanks for taking the time to read this article. if you have any questions or feedback, please write in the comment section below.
What to know more about Grafana SSL? Check out our other posts about it: