Code: sudo systemctl disable systemd-resolved.service sudo systemctl stop systemd-resolved.service

Code: sudo nano /etc/NetworkManager/NetworkManager.conf

Code: [main] plugins=ifupdown,keyfile dns=default

Code: sudo mv /etc/resolv.conf /etc/resolv.conf.bak sudo service network-manager restart

Code: sudo mkdir /opt/appdata/pihole sudo touch /opt/appdata/pihole/pihole.log

Code: sudo docker run -d \ --name pihole \ --restart=unless-stopped \ -p 53:53/tcp \ -p 53:53/udp \ -p 8182:80 \ -p 8183:443 \ -v /opt/appdata/pihole/pihole:/etc/pihole \ -v /opt/appdata/pihole/pihole.log:/var/log/pihole.log \ -v /opt/appdata/pihole/dnsmasq.d:/etc/dnsmasq.d \ -e ServerIP=Host IP \ -e ServerIPv6=Your IPv6 Address -e PROXY_LOCATION=pihole \ -e VIRTUAL_HOST=pihole.yourdomain.com \ -e VIRTUAL_PORT=80 \ -e TZ=YourTimeZone \ -e WEBPASSWORD=UserDefinedPassword \ -e PUID=1000 \ -e PGID=1000 \ -l "traefik.enable=true" \ -l "traefik.backend=hole" \ -l "traefik.port=80" \ -l "traefik.frontend.rule=Host:pihole.yourdomain.com,yourdomain.com" \ -l "traefik.frontend.priority=1" \ -l traefik.frontend.headers.SSLRedirect=true \ -l traefik.frontend.headers.STSSeconds=315360000 \ -l traefik.frontend.headers.browserXSSFilter=true \ -l traefik.frontend.headers.contentTypeNosniff=true \ -l traefik.frontend.headers.forceSTSHeader=true \ -l traefik.frontend.headers.SSLHost=yourdomain.com \ -l traefik.frontend.headers.STSIncludeSubdomains=true \ -l traefik.frontend.headers.STSPreload=true \ -l traefik.frontend.headers.frameDeny=true \ pihole/pihole:latest

Pi-Hole was originally engineered to be run on a raspberry pi and act as a DNS server capable of filtering unwanted ads across and entire network. I've bene using it for years but upon getting PlexGuide going I sought to take advantage of the pi-hole docker container. I've been running pi-hole on my local Ubuntu 18.04 LTS server for several weeks and have encountered no issues, other than an issue with Docker being able to properly route IPv6. Below are the steps I've taken to add Pi_hole to my server and work flawlessly with other PG apps.Disable Ubuntu's DNS resolverOpen network manager configuration using the following command for editingAdd dns=default under [main]Rename resolve.conf and restart network managerPrep Pi-Hole for IPv6 and perpetual loggingRun this command to find your host machine's IPv6 address: (ip -6 route get 2001:4860:4860::8888 | awk '{for(i=1;i<=NF;i++) if ($i=="src") print $(i+1)}')Run Pi-Hole with traefik supportThis is what's worked for my specific set up so it might not work for everyone. There is still the matter of setting your specific router to use your server as a DNS server. I currently use Google's DNS servers for my IPv4, however as I mentioned I believe Docker has limited functionality with IPv6 for containers.Another note is that Pi-Hole has to run as the top level domain app for traefik. I believe this is due to both Pi-Hole and traefik sharing port 80.I am also running traefik on the host network inside docker in order to provide support to containers not on the plexguide network. If anyone knows of a way to allow traefik access to host network containers without being on the host network itself I would appreciate knowing how.I understand this is probably a stretch to implement as it goes beyond the requirements of most pg apps, however for those wanting to implement this into their systems I highly recommend it.