Hi, can anyone please advise how to use a letsencrypt certificate alongside Grafana?
I am currently successfully running it is a Windows Service on Server 2012, though HTTP only. As I am deploying it to the cloud for customer access, I need HTTPS.
The config file only allows for a certificate path (nix system) rather than certificate store (windows).
Use something more in line with Windows (IIS?) as a reverse proxy? I do that on FreeBSD with Apache so I have a single SSL and Letsencrypt installation for all my public services. Grafana works well behind a proxy:
HTH,
Patrick
Could you please describe the steps what you have perform ?
Thanks
Install Apache 2.4
Install Dehydrated
Add your desired domain to Dehydrated’s domains.txt
Create an HTTP vhost similar to this:
<VirtualHost _default_:80>
Alias /.well-known/acme-challenge /usr/local/www/dehydrated
<Directory /usr/local/www/dehydrated>
Options None
AllowOverride None
Require all granted
</Directory>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge
RewriteRule (.+) https://%{HTTP_HOST}$1 [L,R=301]
</VirtualHost>
Run dehydrated -c -g
Create an SSL proxy vhost similar to this:
# https://grafana.com/docs/grafana/latest/installation/behind_proxy/
<VirtualHost *:443>
ServerName grafana.mydomain.com
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Require all granted
</Proxy>
<Location />
Require all granted
</Location>
ProxyPass / http://192.168.93.56:3000/
ProxyPassReverse / http://192.168.93.56:3000/
SSLEngine on
SSLCertificateFile "/usr/local/etc/dehydrated/certs/grafana.mydomain.com/cert.pem"
SSLCertificateChainFile "/usr/local/etc/dehydrated/certs/grafana.mydomain.com/chain.pem"
SSLCertificateKeyFile "/usr/local/etc/dehydrated/certs/grafana.mydomain.com/privkey.pem"
</VirtualHost>
Enjoy
Thanks for mentioning steps. But there is problem with installing Dehydrated. I have tried to search on google as well but nothing found that will usefull. it is so complicated to installing Dehydrated.
if you have some time could you please mention steps to install this as well.
Thanks for your help.
What is specifically complicated about
pkg install dehydrated
?
This is the only step needed to install. As I wrote I assume you are running FreeBSD. For some other Linux distribution use the appropriate package manager.
HTH,
Patrick
Ahh. I think, there is misunderstanding. I am running windows server 2016. Grafana is installed on windows servers.
But this issue fixed by ‘Running Grafana behind a reverse proxy’ . Now I can access Grafana with sub path.
Thanks for your help.