Let'sencrypt + DuckDNS + pihole

So, I thought I had a pretty basic set up, but it has been a nightmare, and I’m still not happy with the end result…

Starting with my router settings;

Ports;
53 udp/tcp
80 tcp
443 udp/tcp

All three pointing to my servers 192.168.1.ZZZ internal IP-adress.

Here is my docker compose file;

I then found a pihole conf file in the nginx folder (pihole.subfolder.conf.sample), so I renamed it to “pihole.subfolder.conf” and hoped that would be it…(that’s the only edit I have done).

It wasn’t.

Now the strange parts…

When trying YYYYYYYYYYYYY duckdns org I get redirected to the https, see below.

When trying h t t p s YYYYYYYYYYYYY duckdns org I get the default index.html under nginx/www/.
Comment : Normal I guess, as this is the index.html under nginx/www/.

When trying h t t p s YYYYYYYYYYYYY duckdns org /pihole I get:
“”[ERROR]: Unable to parse results from queryads.php: Unhandled error message (Invalid domain!)"
Comment : There is a work around, but next time i restart the docker it is of course back…(google the above message, I’m not allowed to enter more than two links in my first post…)

When trying h t t p s YYYYYYYYYYYYY duckdns org /pihole / admin I get
Yay - I get the pihole gui!
However, the stats look very strange
The only client being “localhost”, and nothing beeing blocked…?
Default settings for the pihole.

Ads are however blocked - (but not for my cell phone via wifi…?)

The docker container logs show some strange stuff too…

In short - Pihole is up, blocking ads for wired connections, not over wifi, and the stats seems very strange…Also, something seems wrong with the letsencrypt docker file.

Any help appreciated. Sorry for long first post. :slight_smile:

Pihole and Letsencypt logs;

First of all, you don’t need to open port 53 unless you want external clients using your local dns.

This is as expected

This is a pi-hole issue so not something we can help with.

Yep with the admin, you need to add the extra to the URL - regards to showing that it’s only local host, it sounds like you haven’t configured pihole correctly. you need to put it in between your clients and your routers dns so that it can look up your clients names. With your mobiles, I suspect this is also something similair. This is again something that can be helped with on the pihole forums.

Ok, yes, that makes sense - thanks.

The reason for my posting here, and not in the pihole forum, is the fact that the “pihole.subfolder.conf” - which I hoped for was a tested and proven solution, is part of the “letsencrypt” docker by linuxserver.io.
So it made sense posting here (but perhaps those setting are correct, and then I agree - it is a pihole issue).

The log from letsencrypt also shows some errors towards the end, which might interest whomever put that together.

Also, I was hoping that I wasn’t the first person to encounter this problem, as my goal seems pretty…average…

Thanks for you tips, regardless.

According to the issue here: https://github.com/pi-hole/docker-pi-hole/issues/224 with the error you were getting. It seems to be just a bug with pihole not redirecting properly due to it being in a docker container. From what you’ve told me, our subfolder config is working fine and it’s configuration issues within your network/pi-hole.

Ok, thanks for your help, I’ll head over there and hope that someone can help me. Regardsless, once again thanks for your time and input.