Dnsmasq not starting

Expected Behaviour:

I expect dnsmasq to run normally, or at least when restarted by me.

Actual Behaviour:

Dnsmasq does not restart, and tells me that it cannot read ~/pihole-lists/domains.txt because there is no such file or directory. The file does exist, and permissions should allow everyone to read it.

Debug Token:


This is not the expected behavior with Pi-hole since V4. The dnsmasq code is embedded in pihole-FTL and dnsmasq no longer runs as a separate process.

Existing dnsmasq configuration files will work with pihole-FTL, but they need to be in /etc/dnsmasq.d

If there is an existing instance of dnsmasq running, then pihole-FTL won't launch. Your debug log shows that pihole-FTL is not running. Check the processes running on ports used by Pi-hole and common add-on software with this command:

sudo netstat -nltup | grep 'Proto\|:53 \|:5053 \|:5353 \|:5335 \|:8953 \|:67 \|:80 \|:471'

You saying that this is not expected since an older version does fit my situation. This is an older install that I recently started using again (neglected my raspi for a bit). I did update pihole, but maybe it didn't quite take? The output shows 'lighttpd' on port 80 and 'avahi-daemon: r' on port 5353.

From your debug log:

*** [ DIAGNOSING ]: Core version
[i] Core: v5.0 (https://discourse.pi-hole.net/t/how-do-i-update-pi-hole/249)
[i] Branch: master
[i] Commit: v5.0-0-g4d25f69

*** [ DIAGNOSING ]: Web version
[i] Web: v5.0 (https://discourse.pi-hole.net/t/how-do-i-update-pi-hole/249)
[i] Branch: master
[i] Commit: v5.0-0-gb86e4a31

*** [ DIAGNOSING ]: FTL version
[✓] FTL: v5.0

What command are you using to start pihole-FTL? Where have you modified the configs to point to ~ and how have you instructed pihole-FTL to know what directory ~ is?

Also remember that the Pi-hole runs under a dedicated user pihole which is for instance not able to do arbitrary sudo commands (which is why it is better than using the default password-less sudo user account).

You should specify


(or whatever your user is if not pi) as list destination.

I don't really know to be honest. This is an older install that I only recently started using again and updated. I don't remember modifying the configs at all really. I'm not very experienced with working with linux to be honest.

I didn't start any individual services, I just restart pihole. Do I need to start pihole-FTL separately?

Where should I configure this? And what specifically does this list do?

Where did you see the message that dnsmasq wouldn't restart then? Can you paste the entire output you are seeing along with any commands you typed to get that output?

When I run pihole status, I am told "DNS service is NOT running". When I try to use the dnsmasq command, I get "dnsmasq: cannot read ~/pihole-lists/domains.txt: No such file or directory.

From this I infer that dnsmasq isn't able to run.

What are you typing exactly as "the dnsmasq command". dnsmasq was replaced by pihole-FTL a few versions ago.

Oh, I was straight up typing "dnsmasq". However, when I try "pihole-FTL", I get the same response, domains.txt does not exist.

Show me exactly what you are typing and what is being displayed otherwise I can't help you.

The commands I put in quotes are exactly what I typed. I don't know how I can give you more information, I am very much learning as I go with this. All I've been able to diagnose is that the dns server is not running. At some point I learned that dnsmasq has something to do with this (makes sense considering the name). I simply tried typing "dnsmasq" in and got "dnsmasq: cannot read ~/pihole-lists/domains.txt: No such file or directory." I don't really know where to go from here.

Honestly, I would start from scratch. As you said

You might not know what individual changes you made back then that might cause issues now.

Setting up your device completely fresh might be faster than trying to figure out how to get it work.

Typing the name of a process does not start the process. You typically would use service commands. These below will tell you the status of each process.

sudo service pihole-FTL status

sudo service dnsmasq status

You did not provide the output of the previous command I requested:

sudo netstat -nltup | grep 'Proto\|:53 \|:5053 \|:5353 \|:5335 \|:8953 \|:67 \|:80 \|:471'

Right, sorry!

This is the output of netstat: https://imgur.com/a/598hXMF
And this is the two services: https://imgur.com/a/0Dm45Em

Sorry about the images, couldnt think of a faster way to bring this to you ^^"

Run pihole -r and select "repair". This may fix this.

Somewhere there is a config file that is trying to include that txt file. Check /etc/dnsmasq.conf or /etc/dnsmasq.d/ for anything referencing the txt file.

Hmm so when I ran repair, it failed at trying to download FTL. Apparently it can't resolve github.com. That's confusing to me, I saw it apt-get other stuff before, so it should have some sort of name resolution capability right?