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


#142

O managed to inistall it on DS216j but I get still loading graph and FTL offline, but DNS forks and block some advert…


#143

Now it works, I must do:
as chroot run service pihole-FTL start

But its not working after restart


#144

Sorry, I don’t understand. The Pi-hole installation is now identical to a default installation on a machine that had port 80 free. How is this installation in DiskStation any different to a typical installation?
Screenshots: https://goo.gl/photos/5kfCTrjQDFYpyEkMA


#145

I get it to work after reboot. I dont know if its right way but:

I edit: /usr/local/etc/rc.d/S99pihole.sh restart
Add two lines for start and stop pihole-FTL like this:

#!/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

Lost password
#146

Were you trying to free up port 80 for Pi-hole, or change the port Pi-hole uses from 80?


#147

I was trying to free up the port 80 in DiskStation and use Pi-hole in its default installation.


#148

Ok, sorry I didn’t read it that way. :slight_smile:


#149

I’m not sure what the status on the detection of the required binary for pihole-FTL is. Can anyone who thinks that changes are required give me a short update on this?


"Cannot verify server identity" Synology
#150

works for me perfect, but edited S99pihole.sh for autorstart didn´t.


#151

New Synology Category For Your Topics

Anyone following this post, we have seen several users asking about Synology and Pi-hole on this single thread. To that end, we have made a new a category for you to post Synology-related things so it is easier to read and disseminate information.

While we don’t officially support this system, the community is very helpful and now you have a better place to collaborate.


#152

2 posts were split to a new topic: Editing limitation?


#155

Thank you so much… I couldn’t work out why DNS wasn’t responding to nslookup.

DNS request timed out.
timeout was 2 seconds.

I uninstall docker and I disable “Open vSwitch” then did the following to fix my issues
sudo service cron restart
sudo service lighttpd restart
sudo service dnsmasq restart


#156

Now I cant start dnsmaq. Beause port 53 is in use by some Avahi-Daemon. Anyone know workaround? Or How to stop Avahi? Thanks


#157

@bakman2 You should be okay to edit the OP if you would like to.


#158

I just did the installation on my DS411J
But when i load up the webpage i get no graphs and it says Lost connection to API and FTL Offline.
I couldn’t see any errors when i started everything.

The only thing that looks out of place is when i run with -D

::: —= Daemon Process Information
::: Checking 4711 port for pihole-FTL listener.
::: Failure: IPv4 Port not in use

DS411J
DSM 6.1.1-15101
Python 2.7.13-16
Chroot 8.4-7

Ill try installing on my DS413J later today and see if it works there.

Problem found.

this file is updated, you need to add the lines to stop/start FTL
https://gist.githubusercontent.com/bakman2/dcfe3fdfd02c9ff8326bbf35da539f27/raw/0c59b7b62b0d351276895744e6d0750c8baf5be5/gistfile1.txt


#159

FIXED!! This problem.


#160

With this instruction I managed to install Pi-hole on my DS916+ but FTL stays offline.

The issues I have:

  • I get no result after
    —= Detecting installed OS Distribution
    —= Checking processor variety
    Checking 4711 port for pihole-FTL listener.
    ::: Failure: IPv4 Port not in use
  • FTL is not starting (FTL is offline)

Questions:

  • Is this Pi-hole compatible with my DS916+?
  • Should I fix this 4711 port issue?

I tried repairing pihole but that didn’t work.

Here is the debug log:

::: Beginning Pi-hole debug at Sun Jun 25 13:03:32 CEST 2017!
:::
::: This process collects information from your Pi-hole, and optionally uploads
::: it to a unique and random directory on tricorder.pi-hole.net.
:::
::: NOTE: All log files auto-delete after 48 hours and ONLY the Pi-hole developers
::: can access your data via the given token. We have taken these extra steps to
::: secure your data and will work to further reduce any personal information gathered.
:::
::: Please read and note any issues, and follow any directions advised during this process.
:::
::: —= Detecting Installed Package Versions:
::: Pi-hole: v3.1 (master:v3.1-0-gecde222)
::: Pi-hole Dashboard: v3.1 (master:v3.1-0-gf204b71)
::: lighttpd/1.4.35
::: PHP 5.6.30-0+deb8u1 (cli) (built: Feb 8 2017 08:50:21)
:::
::: —= Detecting existence of /etc/pihole/setupVars.conf:
::: File exists, parsing…done and was successfully sourced
:::
::: —= Detecting installed OS Distribution
:::
::: —= Checking processor variety
:::
::: —= Checking IPv6 Stack
::: IPv6 addresses located on eth0
::: No gateway detected.
:::
::: —= Checking IPv4 Stack
::: IPv4 addresses located on eth0
::: Pinging default IPv4 gateway: ::: Gateway responded.
::: Pinging Internet via IPv4: ::: Query responded.
:::
::: —= Daemon Process Information
::: Checking http port for lighttpd listener.
::: Correctly configured.
:::
::: —= Daemon Process Information
::: Checking domain port for dnsmasq listener.
::: Correctly configured.
:::
::: —= Daemon Process Information
::: Checking 4711 port for pihole-FTL listener.
::: Failure: IPv4 Port not in use
:::
::: —= Processes Check
::: Logging status of lighttpd, dnsmasq and pihole-FTL…
:::
::: —= Resolver Functions Check (IPv4)
::: Checking for necessary lighttpd files.
:::
::: —= Detecting existence of /etc/lighttpd/lighttpd.conf:
::: File exists, parsing…done
:::
::: —= Detecting existence of /var/log/lighttpd/error.log:
::: File exists, parsing…done
:::
:::
::: —= Detecting existence of /etc/dnsmasq.conf:
::: File exists, parsing…done
:::
::: —= Detecting contents of /etc/dnsmasq.d/*:
:::
::: —= File /etc/dnsmasq.d/01-pihole.conf found
::: Parsing…done
:::
::: —= File /etc/dnsmasq.d/README found
::: Parsing…done
:::
:::
::: —= Detecting existence of /etc/pihole/whitelist.txt:
::: File exists, parsing…done
:::
::: —= Detecting existence of /etc/pihole/blacklist.txt:
::: /etc/pihole/blacklist.txt not found!
:::
::: —= Detecting existence of /etc/pihole/adlists.list:
::: File exists, parsing…done
:::
::: —= Analyzing gravity.list
:::
::: —= Analyzing pihole.log
:::
::: —= Analyzing pihole-FTL.log
::: Warning: No pihole-FTL.log file found!
::: Warning: No pihole-FTL.log file found!
:::
::: --= User Action Required =–
::: Try loading a site that you are having trouble with now from a client web browser…
::: (Press CTRL+C to finish logging.)
:::
::: —= pihole.log
::: Logging will automatically teminate in 60 seconds
::: 60 seconds left.
::: 55 seconds left.
::: 50 seconds left.
::: 45 seconds left.
::: 40 seconds left.
::: 35 seconds left.
::: 30 seconds left.
::: 25 seconds left.
::: 20 seconds left.
::: 15 seconds left.
::: 10 seconds left.
::: 5 seconds left.
::: Finshed debugging!


#161

Or should I place this on the GitHub forum?


Help with Synology, Docker, and Google WiFi Setup
#162

I can start FTL with /usr/bin/pihole-FTL but when I reboot my Synology, Pi-hole auto-restart but FTL doesn’t, I’ve tried to add the two lines and then type : mv gistfile1.txt /usr/local/etc/rc.d/S99pihole.sh but I get : mv: cannot stat ‘gistfile1.txt’: No such file or directory

and FTL doesn’t auto-start

Thanks for help


#163

Why are you moving “gistfile1.txt” ?