User Tools

Site Tools


hw:synology:container:pihole

This is an old revision of the document!


  1. Install “Container Manager” via Synology “Package Center”
  2. Add your current DNS server to “Control Panel→Network→General”. Check “Manually Configure DNS Server” and add your preferfed DNS server
  3. Go to the “File Station” and open the docker folder. Inside the docker folder, create one new folder and name it pihole. Follow the instructions in the image below. Note: only lowercase, not uppercase letters.
  4. Now create two new folders inside the pihole folder that you previously created at STEP 4 and name them dnsmasq.d and pihole. Follow the instructions in the image below. Note: only lowercase, not uppercase letters.
  5. Go to “Control Panel→Task Scheduler→Create→Scheduled Task→User-defined script”
  6. Once you click on User-defined script a new window will open.
  7. Tab “General” - In the Task field type in “Install Pi-hole“. Uncheck “Enabled” option. Select root User.
  8. Tab “Schedule” - Select Run on the following date then select “Do not repeat“.
  9. Tab “Task Settings” - Check “Send run details by email“, add your email then copy paste the code below in the Run command area. After that click OK.
docker run -d --name Pi-Hole \
  --security-opt no-new-privileges=false \
  -v /volume1/docker/pihole/dnsmasq.d:/etc/dnsmasq.d:rw \
  -v /volume1/docker/pihole/pihole:/etc/pihole:rw \
  -e FTLCONF_webserver_api_password="YourPassword" \
  -e FTLCONF_webserver_port=8080 \
  -e TZ=Europe/Zagreb \
  -e FTLCONF_dns_listeningMode=all \
  -e DNSMASQ_USER=pihole \
  -e PIHOLE_UID=1026 \
  -e PIHOLE_GID=100 \
  --cap-add SYS_TIME \
  --cap-add SYS_NICE \
  --restart on-failure:5 \
  --net=host \
  pihole/pihole
  1. Set your password to “FTLCONF_webserver_api_password”
  2. Set your time zone to “TZ”
  3. Set your UID to “PIHOLE_UID” (how to find my UID and GID ?)
  4. Set your GID to “PIHOLE_GID” (how to find my UID and GID ?)
  5. Press “OK” and “Submit” with your DSM Password
  6. Select your “Install Pi-hole” tast and click on “Run” Tab
  7. Confirm and wait a few seconds / minutes. It will depend on your Internet speed connection.
  8. Now open your browser and type in http://Synology-ip-address:8080/admin/login Type in the Password (FTLCONF_webserver_api_password) that you have previously created. Click Log in.
  9. Ypu are in !
hw/synology/container/pihole.1752664197.txt.gz · Last modified: 2025/07/16 11:09 by rplecko