Skip to content

Instantly share code, notes, and snippets.

@L0g4n
Created March 9, 2020 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save L0g4n/dbaf93cd0ae2e0cee812b05146199873 to your computer and use it in GitHub Desktop.
Save L0g4n/dbaf93cd0ae2e0cee812b05146199873 to your computer and use it in GitHub Desktop.
Pihole Docker Compose configuration
version: "3"
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
ports:
# port 53, 67 are for DHCP
- "53:53/tcp"
- "53:53/udp"
- "67:67/udp"
- "80:80/tcp"
- "443:443/tcp"
environment:
TZ: 'Europe/Berlin'
# WEBPASSWORD: 'set a secure password here or it will be random'
DNS1: "84.200.69.80" # dns.watch #1
DNS2: "84.200.70.40" # dns.watch #2
DNSSEC: "True"
ServerIP: "192.168.1.201" # ip address of this server
# Volumes store your data between container upgrades
volumes:
- './etc-pihole/:/etc/pihole/'
- './etc-dnsmasq.d/:/etc/dnsmasq.d/'
# run `touch ./var-log/pihole.log` first unless you like errors
- './var-log/pihole.log:/var/log/pihole.log'
dns: # upstream DNS servers
- "127.0.0.1"
- "84.200.69.80" # dns.watch #1
# Recommended but not required (DHCP needs NET_ADMIN)
cap_add:
- NET_ADMIN
restart: unless-stopped
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment