Self-Signed SSL Certificate - How/Where?

I haven't been able to access https://pi.hole/admin. It gives a timeout error. http://pi.hole/admin works fine

I did notice that the announcement indicated:

"HTTPS support baked into FTL

You can, of course, use a reverse proxy to handle HTTPS for your web interface, but FTL can also handle HTTPS connections. You can provide your own certificates, but FTL will also generate a self signed one if none is provided."

I've checked pihole.toml, and my domain is set to "pi.hole", and port is set to "80,[::]:80,443s,[::]:443s"

Not sure where to find the SSL certificates with the embedded webserver, or how to provide my own certificate. Are there instructions for that yet? I'm only seeing for instructions for lighttpd.

This should be 80,[::]:80,443s,[::]:443s
(see the additional s)

The default should be correct:

Yes. Typo in my question. I'll edit. It's as you stated in my pihole.toml. (I've haven't figure out how to copy from an VM to the M.)

When starting FTL v6.0 for the first time, it should create a new self-signed certificate at

/etc/pihole/tls.pem

Do you see this file?


Please also check our /var/log/pihole/FTL.log for a line like

Generation of SSL/TLS certificate ... failed!

or

Created SSL/TLS certificate for ... at ...

or maybe even

Webserver SSL/TLS certificate ... not found or not readable!

I see tls.pem. Its contents are a key and then a certificate.

I do have "Created SSL/TLS certificate for pi.hole at [the location you gave]"

Grep shows four such instances.

This is fine, I see we are logging this incorrectly every time FTL restarts even if the file has been generated only on the first start. I will soon submit a small fix correcting this.

Back to your problem, how did you install pi-hole? Is it on a dedicated machine or maybe in a virtual environment or even a docker container? Maybe port 443 is simply not reachable from the client you are trying to get to your Pi-hole over TLS.

edit Correlated PR

https://github.com/pi-hole/FTL/pull/1657

Bingo. sudo ufw allow 443/tcp fixed it.

I'm running an Ubuntu 22.04 virtual machine inside Hyper-V on Windows 11.

And I also now see the helpful comments in pihole.toml regarding how to create a private .pem certificate and where to store it.

Thanks!