Installing Pihole with Docker on Synology NAS DSM6

or “start your pi-hole”
  1. Using Cloudflare for DDNS with LetsEncrypt for TLS Certs — medium story
  2. Configured macvlan networking for Docker — medium story

Other Hot-takes

  1. Started here — anything Scott can do, I can probably do in time x 3, and less well:
  2. This Docker script was hugely helpful —
  3. Docker-compose .env files made my service repeatable (and pretty)
  4. Tony Lawrence’s blog was my starter-for-ten
  5. This thread on pi-hole cleared up a few blurry bits (especially around networking)



docker-compose index
echo "alias piup='sudo docker-compose up -d pihole'" >> ~/.bashrc

.env (Docker environment vars)

Pihole Service Config

pihole docker-compose file
  1. /etc/localtime to keep time in sync
  2. pihole-configs for my pihole configs
  3. dnsmasq.d for my dnsmasq.d config
  4. external.conf is my https configuration for the pihole web interface #OPTIONAL (see below)
  5. $(CERTHOME) maps my LetsEncrypt cert directory into pihole so I can add it into external.conf (above)

Configuring the HTTPS Interface

$ sudo cat /usr/local/share/${DOMAINNAME}/${DOMAINNAME}.key \
/usr/local/share/${DOMAINNAME}/${DOMAINNAME}.cer | \
sudo tee /usr/local/share/${DOMAINNAME}/${DOMAINNAME}.combined.pem

Spinning it up

Updating Gravity

docker exec pihole pihole updateGravity




Is this bio too short? Or is it just the right length?

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Concealed Public Cloud Costs and How to Avoid Them

Testing in Agile World

Agile Project Management: Best Practices and Methodologies

Implicit none and carry on

Run Crash Simulations on SyncHPC: Radioss

The DevTools that Changed my Life

Introducing G|Code’s Change Makers: Mariamawit Loulseged

CS371g Summer 2020: Abu-Zayd Abdullah

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


Is this bio too short? Or is it just the right length?

More from Medium

Evaluating Docker Desktop 4.6’s new VirtioFS file sync on macOS

VirtioFS accelerated directory sharing in Docker Desktop 4.6

Enabling SSL on PostgreSQL

Setup Apache Hadoop on local Ubuntu System

Indefinitely Long-Lived AWS Sessions Using aws-vault and docker-compose: The Guide I Wish I’d Had