1.4 KiB
1.4 KiB
Pi-hole DNS Blocker
This directory contains the docker-compose.yml for running a standalone Pi-hole DNS ad blocker.
Running with Podman Compose
To run this service using podman-compose:
- Navigate to this directory:
cd optimized/standalone/Pihole - Ensure you have replaced placeholder values like
WEBPASSWORDwith your actual secure password. - Ensure the necessary host directories for volumes (
./etc-pihole,./etc-dnsmasq.d) exist or create them. - Start the service:
podman-compose up -d
Running with Podman
Due to network_mode: host, this service shares the host's network namespace and directly uses the host's IP address.
podman run -d \
--name pihole \
--network host \
--restart unless-stopped \
-e TZ="America/Chicago" \
-e WEBPASSWORD="YOURSECUREPASSWORD" \
-e FTLCONF_webserver_enabled="true" \
-e FTLCONF_webserver_port="7300" \
-e WEB_BIND_ADDR="0.0.0.0" \
-e DNS1="127.0.0.1#5335" \
-e DNS2="0.0.0.0" \
-v ./etc-pihole:/etc/pihole \
-v ./etc-dnsmasq.d:/etc/dnsmasq.d \
pihole/pihole:latest
Notes
network_mode: hostis essential for Pi-hole to function correctly as a DNS server for your local network.- The
WEBPASSWORDenvironment variable is critical for securing your Pi-hole web interface. - Ensure the volume bind mounts (
./etc-pihole,./etc-dnsmasq.d) are pointing to correct and persistent locations on your host.