docker-pi-hole
docker-pi-hole copied to clipboard
Webserver RootPATH
After updating pihole, I was sad to discover that pihole is now running amok with its paths.
In addition to the /admin/ path, it now uses countless order paths under /api/, which is quite inconvenient if other applications are running on the web server in the /api path.
Please create an adjustable path pointer.
A subdomain for pihole as an alternative would be pointless.
Pi-hole's webserver is embedded (per https://pi-hole.net/blog/2025/02/18/introducing-pi-hole-v6/) If paths are conflicting, perhaps run it on a different port.
(see /etc/pihole/pihole.toml -> webserver.ports)
However, as you've posted this in the docker repo - I'm even more confused. What does your setup look like? (We have a template for issues for a very good reason, you know 😉 )
Changing the web server ports also makes no sense, since pihole runs behind an extensively configured reverse proxy and no other port may be opened to the outside
What does your docker compose look like?
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
ports:
#- "53:53/tcp"
- "10.0.13.4:1453:53/udp"
- "10.0.13.4:8090:80/tcp"
environment:
TZ: 'Europe/Amsterdam'
FTLCONF_webserver_api_password: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
FTLCONF_dns_listeningMode: 'all'
volumes:
- './etc-pihole:/etc/pihole'
cap_add:
- SYS_NICE
restart: unless-stopped
- "10.0.13.4:8090:80/tcp"
Right, OK - so presumably host networking here and you're mapping 8090 outside the container to 80 inside it.
Can you try setting the web interface port to listen on port 8090 inside the container with env var:
FTLCONF_webserver_ports: '8090'
And then changing your ports section to suit.
Note that there is a PR currently under review allowing prefacing. Would that work for your setup? You could then host Pi-hole under, e.g., www.example.com/pihole and both /api and /admin will be inside this prefix.
Have a look over at https://github.com/pi-hole/FTL/pull/2319, the referenced issue https://github.com/pi-hole/FTL/issues/2298 has an exemplary docker-compose.yml showing how it could be used with traefik as reverse proxy.
I have exactly the same issue in a K3s cluster with my pihole deployment's.
In the prev release i could manage the web root via env var
'VIRTUAL_HOST: <your.url.&.domain>/subpath'
Something like that var would be great in v6
This issue is stale because it has been open 30 days with no activity. Please comment or update this issue or it will be closed in 5 days.
Hey together,
i checked the issues https://github.com/pi-hole/FTL/pull/2319 & https://github.com/pi-hole/FTL/issues/2298 regarding the Webroot behind a reverse proxy.
But i don't get it running in my k3s cluster with a nginx ingress controller in front of it.
Is there maybee someone who could explain, how this option should be used?
webserver.paths.prefix
from https://github.com/pi-hole/FTL/pull/2319
In my current deployment i still use release pihole/pihole:2024.07.0.
dpl-pihole.yaml
[...]
containers:
- name: pihole
image: pihole/pihole:2024.07.0
imagePullPolicy: IfNotPresent
env:
- name: TZ
valueFrom:
configMapKeyRef:
name: pihole-1-env
key: TZ
- name: PIHOLE_DNS_
valueFrom:
configMapKeyRef:
name: pihole-1-env
key: PIHOLE_DNS_
- name: VIRTUAL_HOST
valueFrom:
configMapKeyRef:
name: pihole-1-env
key: VIRTUAL_HOST
[...]
config-pihole.yaml
[...]
---
apiVersion: v1
kind: ConfigMap
metadata:
name: pihole-1env
namespace: homelab
data:
TZ: Germany/Berlin
PIHOLE_DNS_: <upstream.dns.1>;<upstream.dns.2>
VIRTUAL_HOST: <your.domain.anything>/pihole
[...]
Thanks in advance
This issue is stale because it has been open 30 days with no activity. Please comment or update this issue or it will be closed in 5 days.
This issue is stale because it has been open 30 days with no activity. Please comment or update this issue or it will be closed in 5 days.
updated to v6 and wondering that i can no longer define an absolute uri for pihole. im running it on my local network in a subdir - serving all docker containers via dashboard. so domain.com/folderA/pihole and this seems no longer working :/
No one with a solution here?