Pi-hole

What is it?
Pi-hole is a network-wide DNS sinkhole that blocks ads/trackers at DNS level. It runs its own DNS resolver (FTL/DNSMasq) and provides a web UI for lists, stats, and client control.

Why I use it

  • Kill ads/telemetry for every device without browser plugins
  • Central place to allow/deny domains and see what’s chatting
  • Tiny resource footprint; “set it and forget it”

Deploy with Portainer (Web editor)
Stacks → Add stackWeb editor → paste → Deploy.

Links

services:
  pihole:
    image: pihole/pihole:latest
    container_name: pihole
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      - "7300:80/tcp"        # Pi-hole admin on :7300
    environment:
      TZ: "Europe/London"
      DNSMASQ_LISTENING: "all"                 # accept LAN queries
      FTLCONF_dns_reply_host_IPv4: "192.168.0.30"
      FTLCONF_dns_reply_host_force4: "true"
      FTLCONF_misc_etc_dnsmasq_d: "true"       # load files from /etc/dnsmasq.d
      FTLCONF_dns_upstreams: "1.1.1.1;1.0.0.1" # set upstreams here (or via UI)
    volumes:
      - "/opt/homelab/data/pihole/etc-pihole:/etc/pihole"
      - "/opt/homelab/data/pihole/etc-dnsmasq.d:/etc/dnsmasq.d"
    restart: unless-stopped
    networks:
      - homelab

networks:
  homelab:
    external: true
YAML