let's encrypt cert for Pi-hole web Interface on top of DietPi Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
mcnahum
Posts: 11
Joined: Mon Oct 19, 2020 7:25 pm

let's encrypt cert for Pi-hole web Interface on top of DietPi

Post by mcnahum »

Hello,

I have Pi-hole on the top of DietPi on Rpi 3B+

all is working correctly.

my end goal is to do DOH with the Pi-hole but one of the pre-requisit for it it's to have a certificate on top of the web interface of Pi-hole

This article: https://discourse.pi-hole.net/t/enablin ... rface/5771 explain how to do, but before starting to mess my DietPi I'm curious to know if there is not already a way to automatically manage the certificates on DietPi?
And if not, what is the best way to do?
User avatar
Joulinar
Posts: 5619
Joined: Sat Nov 16, 2019 12:49 am

Re: let's encrypt cert for Pi-hole web Interface on top of DietPi

Post by Joulinar »

Simply use dietpi-letsencrypt to create SSL certificate on your web server

https://dietpi.com/docs/dietpi_tools/#d ... etsencrypt
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
mcnahum
Posts: 11
Joined: Mon Oct 19, 2020 7:25 pm

Re: let's encrypt cert for Pi-hole web Interface on top of DietPi

Post by mcnahum »

I was sure there is a all in one option .. I really love DietPi 8)
mcnahum
Posts: 11
Joined: Mon Oct 19, 2020 7:25 pm

Re: let's encrypt cert for Pi-hole web Interface on top of DietPi

Post by mcnahum »

just FYI, I had the same issue as described here:

and I fixed it by
  • running : certbot certonly --webroot -w /var/www/html
    That generated the certificate
and
  • after: dietpi-letsencrypt
    who discovered that I had a certificated and applied it
User avatar
Joulinar
Posts: 5619
Joined: Sat Nov 16, 2019 12:49 am

Re: let's encrypt cert for Pi-hole web Interface on top of DietPi

Post by Joulinar »

How did you install PiHole?

On a normal DietPi system web server root is /var/www/ and not /var/www/html

And you could use dietpi-letsencrypt right from the beginning
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
mcnahum
Posts: 11
Joined: Mon Oct 19, 2020 7:25 pm

Re: let's encrypt cert for Pi-hole web Interface on top of DietPi

Post by mcnahum »

Yes pi-hole was there before and the goal was to have a secure web-interface
User avatar
Joulinar
Posts: 5619
Joined: Sat Nov 16, 2019 12:49 am

Re: let's encrypt cert for Pi-hole web Interface on top of DietPi

Post by Joulinar »

Usually dietpi-letsencrypt should be working without creating certificate manually before.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
mcnahum
Posts: 11
Joined: Mon Oct 19, 2020 7:25 pm

Re: let's encrypt cert for Pi-hole web Interface on top of DietPi

Post by mcnahum »

I forgot the link ... same error as here: https://github.com/MichaIng/DietPi/issues/2814

this is why I thinked to do *certbot certonly --webroot -w /var/www/html* first
User avatar
Joulinar
Posts: 5619
Joined: Sat Nov 16, 2019 12:49 am

Re: let's encrypt cert for Pi-hole web Interface on top of DietPi

Post by Joulinar »

Still the question how did you install PiHole because it looks like you did not used dietpi-software or you used some repair function on PiHole. Because web server root is not /var/www/html on our systems. This is set if you would use PiHole own installer outside our tooling.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
mcnahum
Posts: 11
Joined: Mon Oct 19, 2020 7:25 pm

Re: let's encrypt cert for Pi-hole web Interface on top of DietPi

Post by mcnahum »

It was more a year ago and I did the install manually ( thanks to the history command I can see that)
Post Reply