|
| 1 | +# Pi-hole as an encrypted resolver for your clients. |
| 2 | +# |
| 3 | +# FTL answers DNS-over-TLS (DoT), DNS-over-QUIC (DoQ) and DNS-over-HTTPS (DoH) |
| 4 | +# itself, so no proxy in front of the container is needed. All three are enabled |
| 5 | +# by default and use the same certificate as the web interface. |
| 6 | +# |
| 7 | +# More info at https://docs.pi-hole.net/ftldns/encrypted-dns/ |
| 8 | +services: |
| 9 | + pihole: |
| 10 | + container_name: pihole |
| 11 | + image: pihole/pihole:latest |
| 12 | + ports: |
| 13 | + # Plain DNS |
| 14 | + - "53:53/tcp" |
| 15 | + - "53:53/udp" |
| 16 | + # Web interface and API. The HTTPS port also serves DoH at /dns-query, and |
| 17 | + # HTTP/3 on the same port number over UDP |
| 18 | + - "80:80/tcp" |
| 19 | + - "443:443/tcp" |
| 20 | + - "443:443/udp" |
| 21 | + # DoT (TCP) and DoQ (UDP). Both use port 853, they do not collide |
| 22 | + - "853:853/tcp" |
| 23 | + - "853:853/udp" |
| 24 | + environment: |
| 25 | + TZ: 'Europe/London' |
| 26 | + FTLCONF_webserver_api_password: 'correct horse battery staple' |
| 27 | + # If using Docker's default `bridge` network setting the dns listening mode should be set to 'ALL' |
| 28 | + FTLCONF_dns_listeningMode: 'ALL' |
| 29 | + # The listeners are on by default. Set a port to move DoT/DoQ, or 0 to switch |
| 30 | + # them off - we recommend staying on 853, as that is the port clients try |
| 31 | + # first. DoH is a plain on/off switch, as it rides on the HTTPS port |
| 32 | + #FTLCONF_dns_dot: '853' |
| 33 | + #FTLCONF_dns_doq: '853' |
| 34 | + #FTLCONF_dns_doh: 'true' |
| 35 | + # Clients validate the certificate against the name they connect to. Set this |
| 36 | + # to the name your clients use, so the generated certificate matches it |
| 37 | + #FTLCONF_webserver_domain: 'pi.hole' |
| 38 | + volumes: |
| 39 | + - './etc-pihole:/etc/pihole' |
| 40 | + restart: unless-stopped |
0 commit comments