mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-26 01:45:54 +03:00
[GH-ISSUE #1206] Pihole with nginx-proxy-manager #983
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#983
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 @samad20 on GitHub (Jun 26, 2021).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1206
Since port 80 and 443 is reserved for Nginx, how can i install pi hole on docker?
@bpycinski commented on GitHub (Jun 28, 2021):
There is no problem at all. Just map the port to anything other, e.g. 8080 See my docker-compose, it works very well:
But you can even get rid of publishing port 80. Just use npm to forward
pihole.mydomain.comtopihole:80.@scottpageindysoft commented on GitHub (Jul 22, 2021):
I run the same on my network, and the solution above is correct.
Have your router point 80 and 443 to NPM, then have NPM reverse proxy to all other sites, including PiHole web interface, internally
I've had zero issues with this, and I run 80 sites exposed through NPM.
All other internal sites can use any other port that doesn't conflict with others.
@asyba commented on GitHub (Jul 23, 2021):
what about using only for lan local? for example if I want to access some service with a NPM domain name example.service to 192.168.1.100:8989 ?
I have pihole and NPM docker compose, but going to example.service is not happening nothing.
@BenJule commented on GitHub (Oct 23, 2022):
i get an ERR_CONNECTION_TIMED_OUT in my browser!
Nginx-Proxy-Manager
ip a
Pi-Hole:
ip a
@valyrian84 commented on GitHub (Mar 11, 2023):
I have a similar setup and not sure why but all other containers are accessible, except my Pihole.
I get HTTP ERROR 404.
The frustration is killing me. :)
@bmmmm commented on GitHub (Mar 11, 2023):
@valyrian84 , if you want help, you need to provide more information about your concrete case.
Such as providing your configuration / docker-compose from the relevant services and describe the situation/issue/ use case/ how you access it, with your own words.
Looking forward to help you 😊
@valyrian84 commented on GitHub (Mar 11, 2023):
@bmmmm Absolutely. Here you go -
I have a few containers which includes a pihole instance and a nginx proxy manager instance and a few more.
I also run an UDM which is default-gateway to all the various VLANs and subnets that I have in the network. The Internet connection is directly to the UDM. I have ports 80-81, 443 forwarded to Nginx host in UDM.
I have also registered a few FQDNs in DuckDNS and I can see that I am able to resolve and PING from the internet fine.

I have added the FQDNs in the environment variables in my local DuckDNS container.
I have proxy hosts set in my Nginx Proxy for the target on the right host port for PiHole its set to the correct port which for me is 1010 which translates to 80 for the container. But I am not able to access it neither from inside or outside.
Local access using IP Address and port works fine.
I even removed SSL for the host to see if becomes accessible but it showed same results.
Note - I am able to access other containers from public internet fine with the same setup and configurations.
@bmmmm commented on GitHub (Mar 11, 2023):
@valyrian84 - I haven't prepared an answer yet. in the last picture you expose your domain. just because you masqueraded it before ;)
What I think ^^:
The machine is in your local network, right?
I assume that UDM is your router, right?
screenshot from the browser:
404 because you enter via port 80 (http) and you might have no webserver running on your pihole on port 80.
telnet screenshot:
you want to enter your network (router) on port 1010, but as you mentioned before, you only opened 80,81 and 443.
If this device is in your local network, I wouldn't expose port 81 to the internet.
Feel free to correct me if I misunderstood your setup :)
@valyrian84 commented on GitHub (Mar 11, 2023):
@bmmmm Thanks for pointing out my naivety. The snippet has now been removed.
Coming back to the topic, my pihole is running on a Pi (along with other containers). The host port of 1010 is mapped to Pihole container's 80.
As for the NPM config, I only have 80 and 443 opened in the NPM. The NPM is redirecting the incoming requests to actual hosting inside ports (1010 in the case of Pihole) based off the FQ URL.
I hope I was able to clarify your queries.
@crispybegs commented on GitHub (Apr 8, 2023):
did you ever work this out? trying to find out how to do it myself at the moment
@github-actions[bot] commented on GitHub (Mar 9, 2024):
Issue is now considered stale. If you want to keep it open, please comment 👍
@flyingoctopus commented on GitHub (Oct 18, 2024):
👍
@github-actions[bot] commented on GitHub (Jun 20, 2025):
Issue is now considered stale. If you want to keep it open, please comment 👍