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
Verify snap is installed.
sudo snap listUpdate snap and ensure using latest version
sudo snap install core; sudo snap refresh coreInstall classic certbot
sudo snap install --classic certbotPrepare the command so that it can be executed from the command line
sudo ln -s /snap/bin/certbot /usr/bin/certbotPre-requisite: Complete 8.04 Reverse Proxy Grafana with Nginx
Start the SSL implementation
sudo certbot --nginxEnter 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-NAMEAfter 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