Pi-hole not saving dns records or other setting via web interface

The issue I am facing:
I'm new to pi-hole and the issue I'm having is when trying to create dns records or save other setting via the admin web interface they are not saving.
if I add the dns via the cli inside the container
/usr/local/bin/pihole -a addcustomdns 127.0.0.1 test6.local
[✓] Adding custom DNS entry...
[✓] Restarting DNS server
That works

ls -al /var/www/html/admin/scripts/pi-hole/php/header.php
pihole status
-rw-r--r-- 1 root root 4983 Jul 6 04:19 /var/www/html/admin/scripts/pi-hole/php/header.php
[✓] FTL is listening on port 53
[✓] UDP (IPv4)
[✓] TCP (IPv4)
[✓] UDP (IPv6)
[✓] TCP (IPv6)

[✓] Pi-hole blocking is enabled
root@1e1693864b5e:/# sudo service dnsmasq status
s6 service not found for dnsmasq, exiting...

sudo pihole status web
53
root@1e1693864b5e:/# sudo service lighttpd status -l
up (pid 215) 44732 seconds
root@1e1693864b5e:/# ls -al /etc/sudoers.d/pihole
-r--r----- 1 root root 367 Jul 6 04:19 /etc/sudoers.d/pihole
root@1e1693864b5e:/# which pihole
/usr/local/bin/pihole
root@1e1693864b5e:/# sudo service pihole-FTL status
up (pid 21738) 279 seconds

root@1e1693864b5e:/etc/pihole# ls -lh /etc/pihole/pihole-FTL.db
-rw-rw-r-- 1 pihole pihole 160K Aug 7 11:26 /etc/pihole/pihole-FTL.db

I've confirmed the volume data mataches inside and outside the container.

Details about my system:
vm on proxmox
Core OS: Ubuntu 24.04 LTS
Docker version 27.1.1, build 6312585
Docker Tag [2024.07.0]
Pi-hole [v5.18.3]
FTL [v5.25.2]
Web Interface** [v5.21]
pihole_docker_yaml.txt (1.9 KB)

What I have changed since installing Pi-hole:
New install

Do you see any error messages in the browser's Devtools Console when you try to save some settings using the web interface?

No nothing in the Devtools come

it shows a responce of 200

Request URL:

http://10.2.1.238:500/admin/scripts/pi-hole/php/customdns.php

Request Method:

POST

Status Code:

200 OK

Remote Address:

10.2.1.238:500

Referrer Policy:

same-origin

if I view the View container logs it shows this error

sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges?

If I look inside the docker container at the logs for: /var/log/lighttpd# error-pihole.log

2024-08-06 22:37:35: server.c.1513) server started (lighttpd/1.4.59)
2024-08-06 22:39:15: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  Executing sudo pihole -a addcustomdns 10.2.1.238 porvm01 false failed. in /var/www/html/admin/scripts/pi-hole/php/func.php on line 173
2024-08-06 22:39:15: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  Executing sudo pihole restartdns failed. in /var/www/html/admin/scripts/pi-hole/php/func.php on line 173
2024-08-06 23:06:19: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  Executing sudo pihole -a addcustomcname pihole.local.tribalflamingo.com porvm01.local.tribalflamingo.com false failed. in /var/www/html/admin/scripts/pi-hole/php/func.php on line 173
2024-08-06 23:06:19: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  Executing sudo pihole restartdns failed. in /var/www/html/admin/scripts/pi-hole/php/func.php on line 173
2024-08-06 23:21:31: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  Executing sudo pihole -a -i local -web failed. in /var/www/html/admin/scripts/pi-hole/php/func.php on line 173
2024-08-06 23:21:31: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  Executing sudo pihole -a ratelimit 1000 60 false failed. in /var/www/html/admin/scripts/pi-hole/php/func.php on line 173
2024-08-06 23:21:31: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  Executing sudo pihole -a setdns "208.67.222.222,208.67.220.220" domain-not-needed no-bogus-priv no-dnssec failed. in /var/www/html/admin/scripts/pi-hole/php/func.php on line 173
2024-08-06 23:21:47: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  Executing sudo pihole -a disabledhcp failed. in /var/www/html/admin/scripts/pi-hole/php/func.php on line 173
2024-08-07 10:42:19: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  Executing sudo pihole -a addcustomdns 10.2.1.238 traefik-dashboard.local.tribalflamingo.com false failed. in /var/www/html/admin/scripts/pi-hole/php/func.php on line 173
2024-08-07 10:42:19: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  Executing sudo pihole restartdns failed. in /var/www/html/admin/scripts/pi-hole/php/func.php on line 173
2024-08-07 15:36:20: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  Executing sudo pihole -a addcustomcname traefik-dashboard.local.tribalflamingo.com porvm01.local.tribalflamingo.com false failed. in /var/www/html/admin/scripts/pi-hole/php/func.php on line 173
2024-08-07 15:36:20: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  Executing sudo pihole restartdns failed. in /var/www/html/admin/scripts/pi-hole/php/func.php on line 173
2024-08-07 15:41:08: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  Executing sudo pihole -a addcustomdns 127.0.0.1 test2.local false failed. in /var/www/html/admin/scripts/pi-hole/php/func.php on line 173
2024-08-07 15:41:08: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  Executing sudo pihole restartdns failed. in /var/www/html/admin/scripts/pi-hole/php/func.php on line 173
2024-08-07 15:42:59: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  Executing sudo pihole -a addcustomdns 127.0.0.1 test2.local false failed. in /var/www/html/admin/scripts/pi-hole/php/func.php on line 173
2024-08-07 15:42:59: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  Executing sudo pihole restartdns failed. in /var/www/html/admin/scripts/pi-hole/php/func.php on line 173
2024-08-07 16:14:08: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  Executing sudo pihole -a layout boxed failed. in /var/www/html/admin/scripts/pi-hole/php/func.php on line 173
2024-08-07 16:14:34: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  Executing sudo pihole -a layout boxed failed. in /var/www/html/admin/scripts/pi-hole/php/func.php on line 173

Your docker-compose shows some peculiarities:

  volumes:
   - /etc/localtime:/etc/localtime:ro
   - /var/run/docker.sock:/var/run/docker.sock:ro

What's the motivation for mounting above?

 env_file: .env

What's the contents of that .env file?

 environment:
   (...)
   FTLCONF_LOCAL_IPV4: 127.0.0.1

This would prevent clients from accessing Pi-hole's UI via pi.hole, unless that access would originate from the very machine that Pi-hole is running on. Commonly, you'd point that to one of the IPs of your host system.

Did you set that intentionally?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.