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


#102

You are not in chroot, or pihole didn’t install properly.
Read all comments.


#103

Thanks, all works now :slight_smile:


#104

I also ran into this issue:

root@Synohh:/# cat /proc/mounts > /etc/mtab
cat: /proc/mounts: No such file or directory

Instead of running the mnt command to mount /proc I exited the chroot, restarted it, and re-entered and that solved it for me.


#105

Is this working in DSM 6.1 (specifically DSM 6.1-15047 Update 1)? I had it working on DSM 6.0-7321 Update 3 but then updated to 6.1 and it’s no longer processing DNS and I can’t access the web interface. I noticed the lighttpd web server port got changed back to the default port 80 (I had it setup to serve on 8080), and I updated that again and restarted the webserver but still no luck.

I also just reconfigured via pihole -r but that did not work either.


#106

Yes it is working.
From chroot, do:

service dnsmasq restart


#107

Hi All,

JFYI on QNAP NAS I just installed a ubuntu docker container and run the command piping the code to bash, that’s it:)


#108

Can you tell me how you installed on your QNAP NAS? I have one, installed Docker and then installed Pi-Hole via the repo’s via the QNAP UI.

I get the error about port 80 and 53…but I don’t know how to fix it :frowning:


#109

I use “Container station”, a piece of software default for qnap. I installed one of available containers - LXC ubuntu-trusty-1, run the script, maybe did some config to have it running after reboot (not sure what I did, something basic) and that’s it. It got the IP from DHCP, which I then used. This IP is different from NAS IP.


#110

Thanks I got container station installed and found Pi Hole in a repo. I just don’t know how to send it commands. In a VM you open Terminal and SSL into the VM to issue commands. I have no idea how to do this on Docker.


#111

You just go to container station, click on the name of the container, click on arrows next to Console.


#112

Yea…I see that. The one I downloaded won’t even start up unless I chance the IP etc. I’ll stick w/ my running Pi Hole on my RP for now I guess.


#113

Hi guys, instead of using the rc.script, if you prefer you can use debian chroot web interface to start all the needed services.
Open Debian Chroot, go to services, and add this 4 entries:

  1. sshd
    name: sshd
    launch script: /etc/init.d/ssh
    staus command: ps -p $(cat /var/run/sshd.pid)

  2. lighttpd
    name: lighttpd
    lauch script: /etc/init.d/lighttpd
    status command: ps -p $(cat /var/run/lighttpd.pid)

  3. Cron
    name: cron
    launch script: /etc/init.d/cron
    status command: ps -p $(cat /var/run/crond.pid)

  4. dnsmasq
    name: dnsmasq
    lauch script: /etc/init.d/dnsmasq
    status command: ps -p $(cat /var/run/dnsmasq/dnsmasq.pid)

ciao
ema


#114

Just updated to Pi-hole v3.0.
When I go to the webinterface Pihole-FTL is not loaded. Also on the cli Pihole-FTL is not loaded.
When I start it manually in Chroot with this command: “/usr/bin/pihole-FTL” it does load. The fix is to add 2 new lines to the S99pihole.sh script. It now looks like:

#!/bin/sh

. /etc.defaults/rc.subr

case $1 in
start)
/var/packages/debian-chroot/scripts/start-stop-status start
chroot /volume1/@appstore/debian-chroot/var/chroottarget service cron start
chroot /volume1/@appstore/debian-chroot/var/chroottarget service dnsmasq start
chroot /volume1/@appstore/debian-chroot/var/chroottarget service lighttpd start
chroot /volume1/@appstore/debian-chroot/var/chroottarget service pihole-FTL start
;;
stop)
chroot /volume1/@appstore/debian-chroot/var/chroottarget service cron stop
chroot /volume1/@appstore/debian-chroot/var/chroottarget service dnsmasq stop
chroot /volume1/@appstore/debian-chroot/var/chroottarget service lighttpd stop
chroot /volume1/@appstore/debian-chroot/var/chroottarget service pihole-FTL stop
/var/packages/debian-chroot/scripts/start-stop-status stop
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo “Usage: $0 start|stop|restart”
;;
esac


#115

Thanks karel. Can confirm this works.


#116

@DanSchaper - I have a Intel Atom - 64bit and pihole-FTL fails to run.

lscpu states:

Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit

Should be compatible ?
github instructions: “Download some binaries and try which one work.” - what does this mean ?

*edit - got it, had to download the 32 bit:

In chroot

cd /usr/bin
wget https://github.com/pi-hole/FTL/releases/download/v2.6/pihole-FTL-linux-x86_32
mv pihole-FTL-linux-x86_32 pihole-FTL
chmod +x pihole-FTL
pihole-FTL


#117

FTL should be automatically installed


#118

It did, but it was the incorrect version.


#119

Since Synology installs run in a chroot environment, the version detection may pick up the wrong linked libraries. This is a situation that we have no way to test for as none of us own Synology equipment to test.

I have a feeling that the FTL will not come up on reboot either as calls to the init system are chrooted and will not operate as in a normal installation.


#120

Followed the instructions and managed to get it mostly working… web interface is up. Got no action on the graphs etc just the spinning icons no traffic appears to be going through it. Worked out from the comments to start FTL manually then added it to the restart script which got the first graph up but still no connections going through it. I’ve done several full installs and then just did a repair but get the same thing every time. From my log it looks like maybe something to do with dnsmasq?

::: Installing scripts from /etc/.pihole… done.
:::
::: Installing configs from /etc/.pihole…
::: Existing dnsmasq.conf found… it is not a Pi-hole file, leaving alone!
::: Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf… done.
:::
::: Creating log file and changing owner to dnsmasq… already exists!
:::
::: Installing pihole custom index page…
::: Existing index.php detected, not overwriting
::: Existing index.js detected, not overwriting
::: Existing blockingpage.css detected, not overwriting
:::
::: Installing sudoer file… done!
:::
::: Installing latest Cron script… done!
:::
::: Installing latest logrotate script… done!
:::
::: Downloading latest version of FTL…
::: Detected x86_64 architecture
::: Installing FTL… transferred… done.


#121

Is that the entire install log contents?