8.05 Securing Grafana with SSL certificate - MartinWong06/grafana GitHub Wiki

Using Let's Encrypt due to it's free.

It's require a valid domain and this document is for Ubuntu 20.02 LTS

Install certbot on your machine

Verify snap is installed.

sudo snap list

Update snap and ensure using latest version

sudo snap install core; sudo snap refresh core

Install classic certbot

sudo snap install --classic certbot

Prepare the command so that it can be executed from the command line

sudo ln -s /snap/bin/certbot /usr/bin/certbot

Install SSL certificate for your domain name.

Pre-requisite: Complete 8.04 Reverse Proxy Grafana with Nginx

Start the SSL implementation

sudo certbot --nginx

Enter the domain name that you want to secure in the prompts message.

SSL cert installation has been completed, you should be able visit your Grafana by using the url.

https://YOUR-DOMAIN-NAME

After this operation, certbot will change your Nginx configuration.

You can see the changes from the following path by using cat command

cat /etc/nginx/sites-enabled/YOUR-DOMAIN-NAME
⚠️ **GitHub.com Fallback** ⚠️