Pi-hole + dnscrypt for Raspberry Pi.
- Clone the repository
git clone https://github.com/xetxezarreta/piholecrypt.git
- Update docker-compose.yml as needed. See example below:
version: "3"
services:
dnscrypt:
container_name: dnscrypt
build: ./dnscrypt
networks:
pihole_net:
ipv4_address: 10.0.1.2
expose:
- "5300/udp"
- "5300/tcp"
dns:
- 1.1.1.1
volumes:
- ./dnscrypt/config:/opt/dnscrypt-proxy/config
restart: unless-stopped
pihole:
container_name: pihole
image: pihole/pihole:latest
networks:
pihole_net:
ipv4_address: 10.0.1.3
ports:
- "53:53/tcp"
- "53:53/udp"
- "80:80/tcp"
#- "67:67/udp" # Only required if you are using Pi-hole as your DHCP server.
environment:
TZ: "Europe/Madrid" # Set the timezone.
WEBPASSWORD: "admin" # Set a secure password here or it will be random.
QUERY_LOGGING: "false" # Enable or disable query logging.
DNS1: "10.0.1.2#5300" # Set pihole primary DNS server (dnscrypt-proxy).
DNS2: "no" # Set pihole secondary DNS server.
volumes:
- ./pihole/etc-pihole/:/etc/pihole/
- ./pihole/etc-dnsmasq.d/:/etc/dnsmasq.d/
dns:
- 1.1.1.1
restart: unless-stopped
depends_on:
- dnscrypt
networks:
pihole_net:
driver: bridge
ipam:
config:
- subnet: 10.0.1.0/24
- Run
docker-compose up -d
to build and start pi-hole and dnscrypt containers.
- Pull latest images.
docker-compose pull
- Upgrade running containers using latest images.
up
command automatically recreates container on image or configuration change.
docker-compose up -d