Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Message added by spants,

This template is depreciated as it is >4 years old. There are newer versions available

[SUPPORT] pihole for unRaid - Spants repo

Featured Replies

I have piHole configured and working.

Is it advisable to change unraid to use the IP address for my pihole, instead of my router's wan setting for dns?

I tried searching this thread, but no luck.

Edited by Robc390

  • Replies 1.1k
  • Views 331.8k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • I just wanted to share a trick I used to have hostnames show up in the Pihole Dashboard for my local devices instead of IP addresses. Like this:     First make a copy of the /etc/

  • Hi, I wanted to use this pihole docker as my second dns server, i already have a hardware raspberry pi as my main pihole dns, but having a backup is always good. I was wondering how i could

  • There is a section on the readme that will help.   0) If you dont have python3 on your unRaid, install it via the nerdtools plugin.   1) find the path for /etc/pihole/  - for me it

Posted Images

26 minutes ago, Robc390 said:

Is it advisable to change unraid to use the IP address for my pihole, instead of my router's wan setting for dns?

No.

My settings for upstream dns server is lost when pihole docker restarts.

How can i make this persistent? 

On 6/27/2021 at 6:58 PM, Rockstar said:

 

This exact parameter was already in that field so I removed it and same thing.

I should note: I've already rebooted the server and the firewall just in case.


Just a note:

I solved my issue - It had nothing to do with the container or unraid at all.  Somehow my UDM Pro changed the range of allowed IPs for that subnet and thus wouldn't work. By updating this, everything now works as it originally did.

  • 2 weeks later...

Hi, I am trying to set up a whitelist at https://github.com/anudeepND/whitelist/blob/master/README.md but cant seem to get it to work without Python 3. The instructions for a docker install / install without Python doesnt seem to work either. Can anyone help.

 

Thanks in advance.

  • Author
7 hours ago, newunraiduser5 said:

Hi, I am trying to set up a whitelist at https://github.com/anudeepND/whitelist/blob/master/README.md but cant seem to get it to work without Python 3. The instructions for a docker install / install without Python doesnt seem to work either. Can anyone help.

 

Thanks in advance.

 

 

There is a section on the readme that will help.

 

0) If you dont have python3 on your unRaid, install it via the nerdtools plugin.

 

1) find the path for /etc/pihole/  - for me it is /mnt/user/appdata/pihole/pihole/

2) ssh to your unraid and cd to that directory

3) git clone https://github.com/anudeepND/whitelist.git

4) cd whitelist/scripts

5) ./whitelist.py --dir /mnt/user/appdata/pihole/pihole/ --docker

6) ./referral.sh --dir /mnt/user/appdata/pihole/pihole/ --docker

7) restart pihole

 

 

20 hours ago, spants said:

 

 

There is a section on the readme that will help.

 

0) If you dont have python3 on your unRaid, install it via the nerdtools plugin.

 

1) find the path for /etc/pihole/  - for me it is /mnt/user/appdata/pihole/pihole/

2) ssh to your unraid and cd to that directory

3) git clone https://github.com/anudeepND/whitelist.git

4) cd whitelist/scripts

5) ./whitelist.py --dir /mnt/user/appdata/pihole/pihole/ --docker

6) ./referral.sh --dir /mnt/user/appdata/pihole/pihole/ --docker

7) restart pihole

 

 

 

Thank you so much for this and I am sorry I missed it. Can I check where is the readme file?

Hey all. I am hoping someone can help me out here. I have been using this pi-hole template docker for almost 8 months without an issue. We had a power outage the other day, and since then if I use pi-hole for DNS nothing resolves, pages don't load, and ads are not blocked. If I change my dns setting in my router to just use google DNS everything is fine. If I change it to 192.168.1.2 (set for pihole in the docker config) my router insists I am not connected to anything and nothing loads. I really don't know why. I haven't changed any settings in forever which is why I mention the outage. Can't think how that would affect anything either but it's all I have. I also finally updated unraid to 6.9.2 but this issue was occurring before that. I'm going to attach whatever makes sense for settings as screen caps. Please let me know if anything else would be useful. If you look at AsusSetup 1 and 2 you will see there are two different places to enter a DNS server. Should I only be using 1 or both? That may not be *the* problem but I am thinking it might be *a* problem. I tried to follow SpaceInvader1's video as closely as I could. Also if I go into pihole settings and "update gravity" it hangs for a while then comes back with "DNS resolution not available". No idea what broke or how to fix it. Thanks for any and all suggestions.

AsusSetupPage1.png

AsusSetupPage2.png

PiHoleCfg1.png

PiHoleCfg2.png

PiHoleSetupPage1.png

33 minutes ago, Hydranmenace said:

I go into pihole settings and "update gravity" it hangs for a while then comes back with "DNS resolution not available".

You need fix this, if pihole can't reach upper DNS, how could it serve other. Anything blocking pihole 192.168.1.2 reach internet ?

Edited by Vr2Io

11 hours ago, Vr2Io said:

You need fix this, if pihole can't reach upper DNS, how could it serve other. Anything blocking pihole 192.168.1.2 reach internet ?

I understand I need to fix this but I do not know how. That is why I posted all the screen caps. I don't pretend to know what I'm doing. I'm a regular guy who followed a youtube tutorial.

I noticed that in my router in DHCP settings my IP Pool Starting Address is 192.168.1.2 and that is the IP pihole is using. Would that be a conflict? I thought that just meant that is the number the router would use to start looking for things on the network. When I tried an IP range outside of that for pihole it gave me an error saying it was outside the range of my subnet. Whatever that means.

6 hours ago, Hydranmenace said:

Would that be a conflict?

 

6 hours ago, Hydranmenace said:

When I tried an IP range outside of that for pihole it gave me an error saying it was outside the range of my subnet. Whatever that means.

The proper way was add pihole (192.168.1.2) in manual dhcp table, then router won't assign that IP to other.

 

But in general, those not a problem cause, even a router assign 192.168.1.2 to device, it will found this IP have a live device using it.

 

In your router LAN DHCP setting, you missing the default gateway , pls set it as router's IP.

 

I don't think problem cause by router setting, so suggest don't focus on router. Dose other docker reach Internet haven't problem ??

Edited by Vr2Io

6 hours ago, Hydranmenace said:

I understand I need to fix this but I do not know how. That is why I posted all the screen caps. I don't pretend to know what I'm doing. I'm a regular guy who followed a youtube tutorial.

I noticed that in my router in DHCP settings my IP Pool Starting Address is 192.168.1.2 and that is the IP pihole is using. Would that be a conflict? I thought that just meant that is the number the router would use to start looking for things on the network. When I tried an IP range outside of that for pihole it gave me an error saying it was outside the range of my subnet. Whatever that means.

 

Hey man:

 

Regular joe here, so take the advice for what it is worth.

 

It sounds like your router is acting as DHCP server.  If your DHCP settings are starting at .2, my guess is that some other device on the network was assigned to .2 by the router.

 

Maybe try changing the start of the range to .3.  This will set aside .1 for router and an open IP (.2) for the Pihole. 

 

When you restart your router, devices that need an IP will be assigned starting at .3, and you clear the conflict at .2.

 

Make sense?  (I don't use the Pi-hole as a DHCP server - so your setup might be different.  Maybe start getting it running with the router as DHCP server, get it running and adjust from there)

  • Author
On 8/11/2021 at 6:47 AM, newunraiduser5 said:

 

Thank you so much for this and I am sorry I missed it. Can I check where is the readme file?

I was just looking at the whitelist website - did it work for you?

  • Author
On 8/13/2021 at 6:41 PM, Hydranmenace said:

I understand I need to fix this but I do not know how. That is why I posted all the screen caps. I don't pretend to know what I'm doing. I'm a regular guy who followed a youtube tutorial.

I noticed that in my router in DHCP settings my IP Pool Starting Address is 192.168.1.2 and that is the IP pihole is using. Would that be a conflict? I thought that just meant that is the number the router would use to start looking for things on the network. When I tried an IP range outside of that for pihole it gave me an error saying it was outside the range of my subnet. Whatever that means.

 

Usually I set my DHCP range quite high up - maybe starting at 192.168.1.100 - so that nothing gets allocated in the ranges for my fixed IP. Some of the routers firmwares stop you allocating static addresses outside of this range.
So you can either, set the static address on the device itself (set to manual not dhcp on the device) and not worry about it on the router or have the large range on the router, set the pihole address and restart any device that may have claimed that IP address already.
Always set a DNS record manually (1.1.1.1 /8.8.8.8 or similar) for Unraid in the networking settings on unraid - dont let it use the DHCP dns as it will need DNS before the docker pihole as started (or if pihole is stopped)

 

Edited by spants

  • 1 month later...

Is there a way to make this docker write to the pihole.log file /and/or where is this file pihole.log?

Dont worry I found it in this odd location using find on the server.

tail /var/lib/docker/btrfs/subvolumes/30d8b0a1507f7fd6d77979e44a078334ce582acb7cdd0e796a24b8160317d998/var/log/pihole.log

  • 2 weeks later...

Error disappeared after recreating the docker directory. 

 

 

Hello,
sorry for my bad english.

I had to reinstall pihole. I use the same configuration. Pihole does not start anymore.

 

[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

Edited by Rall1

Good Afternoon:

 

I recently upgraded my network router.  The router provides DHCP, not pihole.

 

For some reason, the hostnames in Pihole are still showing the names associated with the prior IP addresses.  (For instance, one windows system is being shown as an Ipad).  This is causing issues with my group rules.

 

I have tried to flush the table, cleared the logs, and powered the Pihole off and on.

 

This seems like it should be an easy fix.  Can someone help?   

 

 

Thanks.

 

Restore not working:

I have a fresh install of unraid, installed Pi Hole, and made minimal changes so I could get it running and restore my backup.

(IP for my unraid has changed, as well as pihole)

I can see data in the backup file, however, when I restore I get a new window:

Processed adlist (0 entries)
Processed adlist group assignments (0 entries)
Processed blacklist (exact) (0 entries)
Processed blacklist (regex) (0 entries)
Processed client (0 entries)
Processed client group assignments (0 entries)
Processed local DNS records (0 entries)
Processed domain_audit (0 entries)
Processed black-/whitelist group assignments (0 entries)
Processed group (0 entries)
Processed whitelist (exact) (0 entries)
Processed whitelist (regex) (0 entries)
OK

checking logs, I found error about gravitiy.db read only..

I removed pihole, removed appdata folder for pihole and downloaded..same thing.

I am on unraid 6.10.0-rc1

I googled and found info about directory ownership (checking in the docker, root owns /etc/pihole), and pihole -r

 

For whatever reason, within a few days of a pihole update, my pihole stops working. Lost connection to API, all DNS stops working et. No amount of stop/starting fixes it. The first time it happened, I tried all the common troubleshooting tips. However, now, its just faster to remove the image, and the data, and reinstall since the only setting I change is the IP. Everything chugs along fine until the next update

 

Pihole doesn't update enough for this to drive me mad, but next time, I would like to dig deeper. Any suggestions on where to start? Nothing jumps out other than DNS Service is not listening.....

  • 1 month later...

Cannot for the life of me get this Docker working, install goes well but I can never get to the WebUI.

 

I've seen tons of posts about this same issue in this thread, but nothing I've tried thus far is working.

Template Settings

Capture1.thumb.PNG.7bb0d463828cdef016ad7fe9e74a285b.PNG

Capture2.thumb.PNG.cad3b5432f0dca63ea3f8ad011354b89.PNG

 

Docker Run

docker run -d --name='pihole' --net='br0' --ip='192.168.1.5' -e TZ="America/New_York" -e HOST_OS="Unraid" -e 'TCP_PORT_53'='53' -e 'UDP_PORT_53'='53' -e 'UDP_PORT_67'='67' -e 'TCP_PORT_80'='80' -e 'TCP_PORT_443'='443' -e 'DNS1'='8.8.8.8' -e 'DNS2'='8.8.4.4' -e 'TZ'='America/New_York' -e 'WEBPASSWORD'='admin' -e 'INTERFACE'='br0' -e 'ServerIP'='192.168.1.5' -e 'ServerIPv6'='' -e 'IPv6'='False' -e 'DNSMASQ_LISTENING'='all' -v '/mnt/user/appdata/pihole/pihole/':'/etc/pihole/':'rw' -v '/mnt/user/appdata/pihole/dnsmasq.d/':'/etc/dnsmasq.d/':'rw' --cap-add=NET_ADMIN --restart=unless-stopped 'pihole/pihole:latest'
9a22a35e6fee700d3d88853be16878ed2b926cf6f15b69c053321827a4abdcc4

 

Log

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] 01-resolver-resolv: applying...
[fix-attrs.d] 01-resolver-resolv: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 20-start.sh: executing...
::: Starting docker specific checks & setup for docker pihole/pihole

[i] Installing configs from /etc/.pihole...
[i] Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone!
Converting DNS1 to PIHOLE_DNS_
Converting DNS2 to PIHOLE_DNS_
Setting DNS servers based on PIHOLE_DNS_ variable
::: Pre existing WEBPASSWORD found
DNSMasq binding to custom interface: br0
Added ENV to php:
"PHP_ERROR_LOG" => "/var/log/lighttpd/error.log",

"ServerIP" => "192.168.1.5",
"CORS_HOSTS" => "",
"VIRTUAL_HOST" => "192.168.1.5",
Using IPv4
::: Preexisting ad list /etc/pihole/adlists.list detected ((exiting setup_blocklists early))
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
https://mirror1.malwaredomains.com/files/justdomains
http://sysctl.org/cameleon/hosts
https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
https://hosts-file.net/ad_servers.txt
::: Testing pihole-FTL DNS: FTL started!
::: Testing lighttpd config: Syntax OK
::: All config checks passed, cleared for startup ...
::: Enabling Query Logging
[i] Enabling logging...
::: Docker start setup complete
Checking if custom gravity.db is set in /etc/pihole/pihole-FTL.conf
Pi-hole version is v5.6 (Latest: v5.6)

AdminLTE version is v5.8 (Latest: v5.8)

FTL version is v5.11 (Latest: v5.11)

Container tag is: 2021.10.1
[cont-init.d] 20-start.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
Starting lighttpd
Starting crond
Starting pihole-FTL (no-daemon) as root
[services.d] done.
Stopping pihole-FTL
Starting pihole-FTL (no-daemon) as root
Stopping pihole-FTL
Starting pihole-FTL (no-daemon) as root

 

Bridging: Enabled 

Host access to custom networks: Enabled

 

What am I missing?

  • 4 weeks later...

Hi all,

 

This container stopped working/DNS on network not working as well as before lately?

 

NOTE: There has been a recent change with PiHole's docker usage of ENV variable DNS1 and DNS2 that caused me issues. These two Docker env. variables now need to be replaced with a single env. variable called PIHOLE_DNS_ and the value of your external DNS servers input in the format e.g. 1.1.1.1;1.0.0.1. The container seems to fail to start or will start but only resolve IP's from cache if using the old DNS1 & DNS2 env variables still.

 

Hope this helps someone else.

  • 2 weeks later...

I'm seeing that the most recent upgrade sends my docker image into a continual fail and reboot cycle:

looking in the logs, I see that:
"install: cannot remove '/etc/dnsmasq.d/01-pihole.conf': Read-only file system"

 

the full logs:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] 01-resolver-resolv: applying...
[fix-attrs.d] 01-resolver-resolv: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 20-start.sh: executing...
::: Starting docker specific checks & setup for docker pihole/pihole

[i] Installing configs from /etc/.pihole...
[i] Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone!
install: cannot remove '/etc/dnsmasq.d/01-pihole.conf': Read-only file system
[i] Installing /etc/dnsmasq.d/01-pihole.conf...[cont-init.d] 20-start.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

On 12/15/2021 at 8:20 PM, zaker said:

I'm seeing that the most recent upgrade sends my docker image into a continual fail and reboot cycle:

 

I can confirm that. After starting, the container runs for a few hours and then suddenly hangs in the reboot cycle.
Funnily enough, if it was switched off for a few hours, I can start it again, but then it only runs again for a few hours.

  • Author
14 hours ago, Gokux said:

I can confirm that. After starting, the container runs for a few hours and then suddenly hangs in the reboot cycle.
Funnily enough, if it was switched off for a few hours, I can start it again, but then it only runs again for a few hours.

 

The template just uses the official PiHole docker - it seems that there is a discussion here that may help https://github.com/pi-hole/docker-pi-hole/issues/922 .

 

You could also change the docker tag to load a specific version: see here https://hub.docker.com/r/pihole/pihole/tags

 

I do not use PiHole now as I have adguard installed on my firewall so I cannot test.... But just to repeat - this is the offical docker image and not related to the template itself.

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.