Last active
October 13, 2025 10:36
-
-
Save mrsimonemms/6489c3c506ca44e3a1f2c29f81792adf to your computer and use it in GitHub Desktop.
PiHole Docker Compose
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Save this file in a directory called "pihole". This will then create all the relevant | |
| # data directories under here. | |
| # | |
| # Run with "docker compose up -d" which will create it as a service so loads whenever | |
| # the machine reboots. | |
| # | |
| # More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/ | |
| services: | |
| pihole: | |
| container_name: pihole | |
| # Image from https://github.com/pi-hole/docker-pi-hole/pkgs/container/pihole | |
| image: ghcr.io/pi-hole/pihole:2025.08.0 | |
| ports: | |
| - "53:53/tcp" | |
| - "53:53/udp" | |
| - "80:80/tcp" | |
| environment: | |
| TZ: UTC | |
| FTLCONF_dns_listeningMode: all | |
| FTLCONF_webserver_port: "80" | |
| FTLCONF_PRIVACYLEVEL: "3" | |
| FTLCONF_dns_queryLogging: "false" | |
| # If an API password is required, uncomment the next line | |
| # FTLCONF_webserver_api_password: some-secure-password | |
| FTLCONF_webserver_interface_theme: default-darker | |
| # Use OpenDNS and Cloudflare in order | |
| FTLCONF_dns_upstreams: 208.67.222.222;1.1.1.1 | |
| restart: unless-stopped | |
| # Specify DNS to avoid getting trapped | |
| dns: | |
| - 208.67.222.222 | |
| - 1.1.1.1 | |
| volumes: | |
| - './etc-pihole:/etc/pihole' | |
| - './etc-dnsmasq.d:/etc/dnsmasq.d' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment