Skip to content

Pi-hole in Container Manager on a Synology NAS

Last updated on 5 April 2025

Bridge Mode

Drop the compose below into your Project YAML section.

YAML
services:
  pihole:
    image: pihole/pihole:latest
    container_name: pihole-bridge
    cap_add:
      - CAP_NET_RAW
      - CAP_NET_BIND_SERVICE
      - CAP_CHOWN
      - CAP_SYS_NICE
      - CAP_SYS_TIME
    environment:
      - PIHOLE_UID=1234 #CHANGE_TO_YOUR_UID
      - PIHOLE_GID=65432 #CHANGE_TO_YOUR_GID
      - TZ=Europe/London #CHANGE_TO_YOUR_TZ
      - FTLCONF_webserver_api_password=YOURPASSWORD
      - FTLCONF_dns_listeningMode=all
      - DNSMASQ_USER=pihole
    volumes:
      - /volume1/docker/pihole:/etc/pihole
    ports:
      - 53:53/udp
      - 8000:80/tcp
      - 8443:443/tcp
    labels:
      - com.centurylinklabs.watchtower.enable=false
    restart: unless-stopped

We are now changing some settings to the YAML based on your User IDs and Timezone etc

SectionExplanation
PIHOLE_UID=This UID is the one you obtained when setting up your dockerlimited user in the earlier guide at the start of the page. This tells Pi-hole to run under this user rather than root and gives it access to the folders we created.
PIHOLE_GID=As per the above this line will be the GID you obtained earlier.
TZ=You will need to change this line to your own timezone code – you can find the correct list of ones to use on wikipedia.org/wiki/List_of_tz_database_time_zones
FTLCONF_webserver_
api_password=
Change this to the password you would like to use for the Web UI

You can now jump ahead to Page 5 for the final configuration.

Pages: 1 2 3 4 5

Published inAd-Blocking / DNS 7.2DockerSynology

208 Comments

    • Dr_Frankenstein Dr_Frankenstein

      Hey Matt – I have been a bit restricted time and bandwidth wise recently – It will come back just a matter of getting some time to setup and test locally

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

drfrankenstein.co.uk – writing Synology Docker Guides since 2016 – Join My Discord!