# Pihole

Stuff about Pihole


# My pihole

Build notes about the Docker stack for my pihole.

# Storage

Running multiple replicas of this pihole stack requires a shared storage. The Synology NAS is providing a NFS share with root squashing set. All file ownership needs to be set to the "admin" account on the NAS for it to work properly.

# Compose File

version: "3.4"
services:
  dns:
    image: pihole/pihole:4.1
    dns:
      - 127.0.0.1
      - 1.1.1.1
    environment:
      - ServerIP=192.168.10.151
      - VIRTUAL_HOST=192.168.10.151
      - DNSMASQ_LISTENING=all
      - DNS1=1.1.1.1
      - DNS2=8.8.8.8
      - WEBPASSWORD=xxxxxxxxxxxx
    deploy:
      replicas: 3
      restart_policy:
        condition: any
      update_config:
        delay: 30s
        order: start-first
      placement:
        constraints: [node.role != manager]
    ports:
      - "80:80/tcp"
      - "443:443/tcp"
      - "53:53/tcp"
      - "53:53/udp"
    networks:
      - pinet
    volumes:
      - /mnt/srv/pihole/pihole/:/etc/pihole/
networks:
  pinet:

# Running

docker stack deploy -c docker-compose.yml pihole
Last Updated: 2021/03/31 12:28+00:00