Pi-Hole on 8.90.3 not working

Has anyone got pihole working on 8.90.3? For me, Docker installs fine, Portainer installs and works fine, but pihole installs fine and then does nothing. The settings for pihole show up empty in the GUI.

The log (sorry this is not the debugging log) shows this line every time i try to enable pihole

ERROR: CAddon[docker.linuxserver.pi-hole]: failed to load addon settings from special://profile/addon_data/docker.linuxserver.pi-hole/settings.xml

hi @punkid did you get it working ? as i have the exact same issue and didn’t find way to solve it , strangely working fine on LE

Yes i got it working by installing the Pihole container manually over SSH. Just copy and paste this into the command line :

docker run -d
–name pihole
–network host
–cap-add NET_ADMIN
-v “/storage/.kodi/userdata/addon_data/pihole/pihole/:/etc/pihole/”
-v “/storage/.kodi/userdata/addon_data/pihole/dnsmasq.d/:/etc/dnsmasq.d/”
-e ServerIP=“192.168.1.50”
-e WEBPASSWORD=“YOURPASSWORD”
-e TZ=“Asia/Karachi”
-e IPv6=“False”
diginc/pi-hole-multiarch:debian_armhf

This will install PiHole in network host mode which is required if you want to use the DHCP function.
You container is now up and running, but the problem is that on rebooting, the container tries to startup too fast. Heres the solution for that:
Create a file called pihole.server and put this in it:

[Unit]
Description=pihole

[Service]
Restart=always
ExecStart=/storage/.kodi/addons/service.system.docker/bin/docker start -a pihole
ExecStop=/storage/.kodi/addons/service.system.docker/bin/docker stop -t 2 pihole

[Install]
WantedBy=multi-user.target

Create another file called pihole.timer and put this:

[Unit]
Description=Runs pihole

[Timer]
OnBootSec=30s
OnUnitActiveSec=12h
Unit=pihole.service

[Install]
WantedBy=multi-user.target

Copy these two files to Configfiles/system.d

Then go to SSH and type

systemctl enable pihole.timer

All done. Your container should be working and starting up on reboot without any problems. I know it looks hard, just follow it closely and you’ll be fine.

1 Like

Hi,

with pihole/pihole:latest pihole won’t start so you have to do this:

# docker cp pihole:/start.sh .
# nano start.sh

then in editor add line → rm /etc/lighttpd/lighttpd.conf

validate_env || exit 1
rm /etc/lighttpd/lighttpd.conf
prepare_configs

After that save changes and do:

# docker cp start.sh pihole:/start.sh
# docker restart pihole

After that pihole will start.

S.

Latest (last week’s latest at least) works just fine for me on the nightly.

thanks for your tutorial.
a small change to whoever might use your code, the file should be named “pihole.service” and not “pihole.server”.
also I didn’t check if just adding --restart always to the run command line suffices.

now comes my question. I use the CoreELEC box to run pihole on docker, just like described here, and my router is Archer C7 running OpenWRT, using “6,192.168.1.150” in the advanced DHCP settings to use the CoreELEC box as the dns server.
when restarting the box, the dns server (docker container) is not running yet, but the box tries to contact the NTP server to sync the time, and fails (I guess).
what follows are thousands of requests to all the NTP servers defined in CoreELEC, once every ~5 seconds. the time is not synced (it’s late by ~8 seconds), and this goes on and on:
Imgur

does anyone know how to make it work?

Maybe it will be useful to someone,
some info from pihole in “label” for skins

#!python
import xbmcgui
try:
    from urllib.request import urlopen
except ImportError:
    from urllib2 import urlopen
import json

queries = None
adsblocked = None
clients = None
status = None
relative = None

if queries == None:
    try:
        f = urlopen('http://pi.hole/admin/api.php')
        json_string = f.read()
        parsed_json = json.loads(json_string)
        queries = parsed_json['reply_CNAME']
        adsblocked = parsed_json['ads_blocked_today']
        clients = parsed_json['unique_clients']
        status = parsed_json['status']
        relative = parsed_json['domains_being_blocked']
        f.close()
    except: pass

xbmcgui.Window(10000).setProperty('queries', '%s' % (queries))
xbmcgui.Window(10000).setProperty('adsblocked', '%s' % (adsblocked))
xbmcgui.Window(10000).setProperty('clients', '%s' % (clients))
xbmcgui.Window(10000).setProperty('status', '%s' % (status))
xbmcgui.Window(10000).setProperty('relative', '%s' % (relative))