mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-25 09:25:55 +03:00
[GH-ISSUE #904] NPM fails to start using Pihole dns in docker #763
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#763
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @pittbull on GitHub (Feb 18, 2021).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/904
Describe the bug
When starting docker app (2.7.2) using PiHole dns running in a separate container on the same host, the following is logged during startup:
If I add the 'dns' option to my docker-compose file and point it to 8.8.8.8 NPM loads without issues.
I have tried setting the same option to the various docker and physical ips, but they yield the same error.
I have several other containers, servers and clients that successfully use the Pihole container as their dns.
Any advise on this strange issue?
@Zerwin commented on GitHub (Mar 17, 2021):
Both PiHole and Nginx use the port 80 and 443, how did you work around that ? I don't think you can have the same ports in use for 2 containers on 1 host.
@SteveGBuck commented on GitHub (Mar 17, 2021):
@Zerwin, I use "expose" rather than "ports" in my pihole container config. Then let NPM proxy to pihole using the docker network. The only thing Im unsure of is that this is not blocking SSL based adverts which I'm looking at right now.
Here's my docker-compose.yml for pihole (but NPM uses the same external "proxy" network).
@Zerwin commented on GitHub (Mar 17, 2021):
From the PiHole docker hub site:
Port 443 is to provide a sinkhole for ads that use SSL. If only port 80 is used, then blocked HTTPS queries will fail to connect to port 443 and may cause long loading times. Rejecting 443 on your firewall can also serve this same purpose. Ubuntu firewall example: sudo ufw reject https
As you are only exposing port 443 it's never available to anything outside NPM and PiHole. You need to properly publish port 443 for this to work.
Overall I would suggest moving away from exposing ports and putting PiHole on a different VM/Server. You can still use docker there if you like. Exposing ports like you are now is probably also what is causing the original problem.
@SteveGBuck commented on GitHub (Mar 17, 2021):
@Zerwin I'm not the OP, but I have no issue starting up NPM and Pihole this way (i.e no port conflict) and at the moment Pihole looks like its working. But as you rightly point out Im not sure I've resolved the whole SSL sinkhole problem (I need to find a site that uses SSL adverts to test). I did also follow the instruction in the guides to set the default site in NPM to redirect to my pihole address - maybe this is addressing the SSL sinkhole problem?
@github-actions[bot] commented on GitHub (Mar 18, 2024):
Issue is now considered stale. If you want to keep it open, please comment 👍
@github-actions[bot] commented on GitHub (Apr 29, 2025):
Issue was closed due to inactivity.