How do I install Pi-hole on a Synology NAS?


It’s one of the 2 commands in the autostart tutorial


Did the wget work? Doesn’t sound like it.


Seems to

I did this cmd : cd;wget

and got in bottom lines :

Connecting to (||:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 984 [text/plain]
Saving to: ‘gistfile1.txt.1’

gistfile1.txt.1 100%[=====================>] 984 --.-KB/s in 0s

2017-06-26 19:48:01 (15.0 MB/s) - ‘gistfile1.txt.1’ saved [984/984]


It saves it as .1 thus the gistfile1.txt exists.
Check the directory where you do the mv from.


Yes I noticed that but even when i modify (mv gistfile1.txt.1 /usr/local/etc/rc.d/

I get :
mv: cannot move ‘gistfile1.txt.1’ to ‘/usr/local/etc/rc.d/’: No such file or directory


Check the file; permissions, owner.


Ok got it working by editing with vi


trying to install on DS215j but im stuck at step

mount /proc
cat /proc/mounts > /etc/mtab

mount /proc
mount: cant find /proc in /etc/fstav

cat /proc/mounts > /etc/mtab
cat: /proc/mounts: no such file or directory

if i skip this step then install pi hole error:
df: cannot read table of mounted file systems
unknown free disk space!

please anyone help me


Try this:

root@xxx01:/home# mount -t proc proc /proc
root@xxx01:/home# cat /proc/mounts > /etc/mtab


i try close and open putty then again

mount /proc
result is now
none is already moutned or /proc busy
none is already moutned on /dev
none is already moutned on /dev/pts
none is already mounted on /proc
none is already mounted on /sys
none is already mounted on /config
none is already mounted on /proc/fs/nfsd

cat /proc/mounts > /etc/mtab
cat: write error: invalid argument

if i try your commands then
-ash /home#:No such file or directory
if i try install pihole then
only message is
OS distribution not supported


You’re not in chroot.

Exit chroot, stop chroot, start chroot.
Enter chroot and try again.


ok this worked but now im stuck at modify webseerver port

nano /etc/lighttpd/lighttpd.conf

just show me blank edit screen nothing to modify, if i manualy write “server.port = 8090” it wont save CTRL+X ->y> ENTER -> error writing /etc/lighttpd/lighttpd.conf no such file or directory.


Reinstall pihole and try again.


its working now thank you a lot!!!


what if i update my NAS? should i do intallation again? thanks!


3 posts were split to a new topic: DHCP Fails


I’ve installed Pi-Hole on my Synology DS1813+ with DSM 6.1.4-15217.

It seems to work fine. No ads.
But my dashboard stays empty:

How can i figure out what’s going wrong?

I’ve tried curl http://synology-ip:port/admin/api.php?overTimeData10mins?, which outputs nothing.
Yet, i do not see ads, which suggests it’s working.

After running pihole -d i do see 2 queries + 2 blocked queries, 100% rating, nothing in the graph.

I’m also running OpenVPN, so maybe that interferes? I’ll test some more.


Run pihole -t and see if you see any clients sending DNS requests.


Hi, thanks for the great writeup. Hopefully someone can help me. I just installed this on my synology server. I am able to access the web interface, but when I set pihole as my DNS server, I cannot get out to the internet. I tried using the pihole -t command and loading some webpages but don’t even see any dns queries coming in.

The token for my debug log is 15ituhsmwb
Any help would be greatly appreciated.


Hi, thanks for the guide.

By using quoted command i get an error saying can’t find folder /etc/locale.gen

Any suggestions?