# pihole # racked the apu2s [![chassis](https://naumann.dev/uploads/images/gallery/2019-11/scaled-1680-/IMG_20191109_060143.jpg)](https://naumann.dev/uploads/images/gallery/2019-11/IMG_20191109_060143.jpg)These are my apu2 DNServers running pihole on docker with traefik 2.0, my `docker-compose.yml` evolved to this: ```bash version: '3' services: # traefik: container_name: traefik domainname: ${DOMAINNAME} image: traefik restart: unless-stopped command: --api.insecure=true --providers.docker --providers.docker.exposedbydefault=false --entrypoints.web.address=:80 #--providers.docker.defaultRule="Host(`${DOMAINNAME}`)" ports: - "80:80" - "443:443" - "8080:8080" volumes: - /var/run/docker.sock:/var/run/docker.sock networks: - default - discovery dns: - 192.168.1.254 pihole: container_name: pihole domainname: ${DOMAINNAME} image: pihole/pihole:latest dns: - 127.0.0.1 - 192.168.1.254 ports: - '0.0.0.0:53:53/tcp' - '0.0.0.0:53:53/udp' - '0.0.0.0:67:67/udp' volumes: - pihole:/etc/pihole/ - dnsmasq:/etc/dnsmasq.d/ environment: VIRTUAL_HOST: ${DOMAINNAME} TZ: ${TZ} WEBPASSWORD: 'usergo' DNS1: 192.168.1.254 DNS2: 'no' DNSSEC: 'False' DNS_BOGUS_PRIV: 'True' CONDITIONAL_FORWARDING: 'True' CONDITIONAL_FORWARDING_IP: 192.168.1.254 CONDITIONAL_FORWARDING_DOMAIN: 'home' restart: unless-stopped labels: - "traefik.enable=true" - "traefik.http.routers.pihole.rule=Host(`${DOMAINNAME}`)" - "traefik.http.routers.pihole.entrypoints=web" - "traefik.http.services.pihole.loadbalancer.server.port=80" networks: discovery: volumes: pihole: dnsmasq: ``` I am using an environment file in `/etc/environment` to keep the variables: ```bash PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games" PUID=1001 PGID=1001 TZ="Europe/Zurich" USERDIR="/home/cloud" DOMAINNAME="apu01.home" ``` [![mounted](https://naumann.dev/uploads/images/gallery/2019-11/scaled-1680-/IMG_20191109_060538.jpg)](https://naumann.dev/uploads/images/gallery/2019-11/IMG_20191109_060538.jpg)I use 192.168.1.254 as main DNServer, it is my OPNsense router running Unbound DNS. The router manages local DNS resolution and forwards WAN DNS requests to the configured Servers. Also it manages local queries to the Domain that I am hosting. # Case parts - the bare case ([326744](https://www.varia-store.com/de/produkt/35701-19-dualrack-system-konfigurator-fuer-pc-engines-apu4-boards-dual-slot.html)) - the power supplies (326747) - two fans ([SUN-HA40201V4-1](https://www.varia-store.com/de/produkt/34643-luefter-fuer-19-rackmount.html)) - two fan mounts ([311857](https://www.varia-store.com/de/produkt/30706-luefter-halterung-passend-fuer-das-varia-19-dual-rack-system.html)) I remounted my apus from the standard case to this one and you can not reuse the alu heat spreader you can get a new one ([APUCOOL](https://www.varia-store.com/de/produkt/29860-pc-engines-apucool-apu-kuehlaggregat.html)) The cables that come with (326744) include the socket that you still need to solder to the apu2, ensure you put it with right polarity. [reddit post](https://www.reddit.com/r/homelab/comments/dts7d7/racked_the_apu2/)