No web UI/admin interface after upgrade (via DietPi)

Please follow the below template, it will help us to help you!

If you are Experiencing issues with a Pi-hole install that has non-standard elements (e.g you are using nginx, apache2 or another reverse proxy, or there is some other aspect of your install that is customised) - please use the Community Help category.

Expected Behaviour:

Web UI/admin interface on port 8089 (HTTP) available.

  • Operating System (Family and Version): Linux VincePi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux (trixie 0)
  • Hardware: RPi 4 Model B (aarch64)
  • Docker compose file or Docker run command: N/A
  • Docker engine version: N/A

Actual Behaviour:

pihole-FTLonly exposes port 53

Debug Token:

Not sure what went wrong:

[✓] ** FINISHED DEBUGGING! **

   * The debug log can be uploaded to tricorder.pi-hole.net for sharing with developers only.

[?] Would you like to upload the log? [y/N] y
    * Using curl for transmission.
    * curl failed, contact Pi-hole support for assistance.
    * Error message: curl: (22) The requested URL returned error: 400

[✗] There was an error uploading your debug log.
   * Please try again or contact the Pi-hole team for assistance.
   * A local copy of the debug log can be found at: /var/log/pihole/pihole_debug.log

How can I retry?

Just reran sudo pihole debug and this time it succeeded:

https://tricorder.pi-hole.net/cQVG7KRp/

BTW, this looks to be the relevant part:

-rw-r----- 1 pihole pihole 300 Aug 14 02:23 /var/log/pihole/webserver.log
   -----head of webserver.log------
   [2026-08-14 02:19:09.511 CEST 2694] Initializing HTTP server on ports "8089,8489s"
   [2026-08-14 02:19:09.518 CEST 2694] Error initializing SSL context
   [2026-08-14 02:23:16.397 CEST 3000] Initializing HTTP server on ports "8089,8489s"
   [2026-08-14 02:23:16.401 CEST 3000] Error initializing SSL context

   -----tail of webserver.log------
   [2026-08-14 02:19:09.511 CEST 2694] Initializing HTTP server on ports "8089,8489s"
   [2026-08-14 02:19:09.518 CEST 2694] Error initializing SSL context
   [2026-08-14 02:23:16.397 CEST 3000] Initializing HTTP server on ports "8089,8489s"
   [2026-08-14 02:23:16.401 CEST 3000] Error initializing SSL context

Your debug log shows a domain mismatch diagnostic message:

*** [ DIAGNOSING ]: Pi-hole diagnosis messages
count    last timestamp             type                       message               blob1
-----  -------------------  ---------------------------  -------------------  --------------------
    1  2026-08-14 02:23:16  CERTIFICATE_DOMAIN_MISMATCH  /etc/pihole/tls.pem  pi.hole

Run from your Pi-hole machine, please share the output of:

sudo openssl x509 -in /etc/pihole/tls.pem -noout -text | grep "CN\|DNS"

Do you actually intend to access your Pi-hole web UI via ports 8089/HTTP and 8489/HTTPS?

Your debug log also shows that you haven't configured any upstream DNS servers for Pi-hole, rendering public DNS resolution unavailable:

   [dns]
     upstreams = []

And since you are running DietPi:
How did you install Pi-hole - via its DietPi-Software utililty or via Pi-hole's installation script?

Run from your Pi-hole machine, please share the output of:

Not at home currently, will try this evening.

Do you actually intend to access your Pi-hole web UI via ports 8089/HTTP and 8489/HTTPS?

Indeed; those are the recommended ports for v6 when installed by DietPi.

Your debug log also shows that you haven't configured any upstream DNS servers for Pi-hole, rendering public DNS resolution unavailable:

Not sure exactly how that happened, either a side-effect of the DietPi upgrade (from 9.x to 10.x) or a pre-existing error with Unbound … But until starting the DietPi upgrade it was working fine.

The upgrade initially failed with Unbound complaining about a missing key (file size turned out to be 0) and not being able to restart. Got help from the DietPi forum and was able to recover the key. Then I was able to complete the upgrade.

How did you install Pi-hole - via its DietPi-Software utililty or via Pi-hole's installation script?

Originally installed Pi-hole via DietPi-Software. But I have done some updates through sudo pihole update, shouldn’t I do that?

The default ports, so that it can be installed alongside dedicated webservers. So "recommended" is the wrong word :slightly_smiling_face:.

DietPi updates do not touch Pi-hole configs. The only exception is if a prior Pi-hole v5 installation via dietpi-software is detected to have been upgraded to Pi-hole v6, in which case some cleanup of obsolete webserver configs is done, and the ports changed to 8089,8489s along with an informational prompt.

Pi-hole does not have a mechanism to remove dysfunctional upstream DNS entries, does it? For reference, the GitHub issue about the Unbound failure: Upgrade from v9.19.2 to v10.6.2 fails on RPi4 · Issue #8249 · MichaIng/DietPi · GitHub

You can run sudo pihole -up without issues. Especially since Pi-hole v6, there are no conflicts between dietpi-software setups and the Pi-hole installer (== updater) anymore.

Pi-hole won't touch its configured upstreams.
While it would not actively use a dysfunctional upstream, it would continue to include and retry that during its regular upstream elections.

I am currently at a loss at explaining what could have caused those apparent upstream configuration changes (apart from user interaction).

Same with the empty Unbound root key, and the Pi-hole TLS cert mismatch (?). Let's see what the openssl inspection gives, maybe it is empty as well :see_no_evil_monkey:.

Run from your Pi-hole machine, please share the output of:

sudo openssl x509 -in /etc/pihole/tls.pem -noout -text | grep "CN\|DNS"
dietpi@VincePi:~$ sudo openssl x509 -in /etc/pihole/tls.pem -noout -text | grep "CN\|DNS"
Could not find certificate from /etc/pihole/tls.pem

dietpi@VincePi:~$ ls -la /etc/pihole/tls.pem
-rw------- 1 pihole pihole 0 Jun  5 14:23 /etc/pihole/tls.pem

Another file with zero length :astonished_face:

Hence two unexpectedly empty files. Maybe /etc/pihole/pihole.toml was also empty, so FTL restored the default, which is an empty upstream list. ... ah no wait, then the web UI ports and password would have been reverted as well.

tls.pem (+certs) is as well regenerated automatically by FTL, if missing, right? (EDIT: Yes, they are.)
EDIT: Check dates first as deHakkelaar suggested below!

sudo rm /etc/pihole/tls.pem /etc/pihole/tls.crt /etc/pihole/tls_ca.crt
sudo systemctl restart pihole-FTL

In that way, the issue is very similar to what happened with Unbound: Both failing to start because of some empty key, and both not generating it automatically, because the file does exist already :thinking:.

Before deleting above files, maybe checking dates can give you some clues?

stat -c '%w > %y %n' /etc/pihole/tls{.pem,.crt,_ca.crt}

%w is time of file birth and %y is last time modified.
For me they are all the same:

$ stat -c '%w > %y %n' /etc/pihole/tls{.pem,.crt,_ca.crt}
2025-07-19 17:23:46.849140149 +0200 > 2025-07-19 17:23:46.849140149 +0200 /etc/pihole/tls.pem
2025-07-19 17:23:46.849140149 +0200 > 2025-07-19 17:23:46.849140149 +0200 /etc/pihole/tls.crt
2025-07-19 17:23:46.849140149 +0200 > 2025-07-19 17:23:46.849140149 +0200 /etc/pihole/tls_ca.crt

Also keep an eye out for "under voltage" messages in the kernel ring buffer/logs:

sudo dmesg -T | grep -i voltage

Power brownouts can corrupt files:

On all models of Raspberry Pi since the Raspberry Pi B+ (2014) except the Zero range, there is low-voltage detection circuitry that will detect if the supply voltage drops below 4.63V (±5%). This will result in an entry being added to the kernel log.

If you see warnings, switch to a higher quality power supply and cable. Low quality power supplies can corrupt storage or cause unpredictable behaviour within the Raspberry Pi.

https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#power-supply-warnings

Unfortunately those kernel messages are gone when you reboot or power cycle the Pi as they are stored in RAM.

Makes sense! mdate of the key itself above Jun 5 14:23, which suggests it happened a longer time ago :thinking:.

We checked for kernel errors on our GitHub: none in this boot session, and no lost inodes in /lost+found either.

Another (RPi-only) check:

vcgencmd get_throttled

should return 0x0, otherwise there is or was an undervoltage, temperature limit, thermal throttling, and/or frequency capping event. But at last undervoltage should be logged in dmesg as well.

If above returns anything other than "throttled=0x0", you can look it up on the man page:

$ man vcgencmd
[..]
       get_throttled
              Returns  the  throttled  state of the system. This is a bit
              pattern - a bit being set indicates the following meanings:

              Bit   Meaning
              ────  ────────────────────────────────────
               0    Under-voltage detected
               1    Arm frequency capped
               2    Currently throttled
               3    Soft temperature limit active
              16    Under-voltage has occurred
              17    Arm frequency capping has occurred
              18    Throttling has occurred
              19    Soft temperature limit has occurred

              A value of zero indicates that none of the above conditions
              is true.

              To  find  if  one  of  these bits has been set, convert the
              value returned to binary, then number each  bit  along  the
              top. You can then see which bits are set. For example:

              0x50000 = 0101 0000 0000 0000 0000

              Adding the bit numbers along the top we get:

              19   18   17   16   15   14   13   12   11   10   9   8   7   6   5   4   3   2   1   0
               0    1    0    1    0    0    0    0    0    0   0   0   0   0   0   0   0   0   0   0

              From  this we can see that bits 18 and 16 are set, indicat‐
              ing that the Pi has previously been throttled due to under-
              voltage, but is not currently throttled for any reason.
dietpi@VincePi:~$ stat -c '%w > %y: %n' /etc/pihole/tls{.pem,.crt,_ca.crt}

2025-12-03 21:38:37.958386980 +0100 > 2026-06-05 14:23:36.614427054 +0200: /etc/pihole/tls.pem
2025-12-03 21:38:37.958386980 +0100 > 2026-06-05 14:23:36.610425054 +0200: /etc/pihole/tls.crt
2025-12-03 21:38:37.958386980 +0100 > 2026-06-05 14:23:36.606423054 +0200: /etc/pihole/tls_ca.crt

Can you recall if anything changed/happened on that modify date?
You would know better than us.

Unfortunately those kernel messages are gone when you reboot or power cycle the Pi as they are stored in RAM.

Several reboots have occurred since then, I’m afraid (result of the command indeed is empty).

dietpi@VincePi:~$ sudo vcgencmd get_throttled
throttled=0x0

Can you recall if anything changed/happened on that modify date?
You would know better than us.

Apart from a remote break-in or a power brown out (the latter not probable, because I have an old fashioned alarm clock that would have gone in 00:00 blink mode), I can’t think of a logical explanation, because I was away from home for quite a while around that date. Well … a software bug or a hardware problem is always a possibility of course.

BTW, I actually performed the Diet-Pi upgrade because I didn’t manage to reach Pi-hole’s web UI and therefore ssh’ed into the Pi, got greeted by the upgrade invitation and … (I blamed my recent browser switch or a DHCP mishap then, but now I realize Pi-hole [the web UI, because ad filtering still worked] must have already been broken before the Diet-Pi upgrade).

Its always multiple failures that bring you to your knees :smiley:
You try to fix the one, and figure out you have another issue etc etc etc.

But have you fixed the cert errors now by removing those cert files and restarting pihole-FTL?

Yes, I have and that brings back the web UI :smiling_face_with_sunglasses: Only a tiny problem remains and causes a warning about the TLS cert: the name pi.hole doesn’t resolve. Should Pi-hole itself take care of that (it used to work before). Or do I need to add it into /etc/hosts?

Is that in the browser or?

Am not sure but believe the CN and SAN in the cert comes from below setting:

$ sudo pihole-FTL --config dns.piholePTR
PI.HOLE
$ openssl s_client -connect localhost:443 -servername pi.hole </dev/null 2>/dev/null | openssl x509 -noout -text
[..]
        Subject: CN = pi.hole
[..]
            X509v3 Subject Alternative Name:
                DNS:pi.hole

Not sure though!

Oh no its this one:

$ sudo pihole-FTL --config webserver.domain
pi.hole
$ openssl s_client -connect localhost:443 -servername pi.hole </dev/null 2>/dev/null | openssl x509 -noout -text
[..]
        Subject: CN = pi.hole
[..]
            X509v3 Subject Alternative Name:
                DNS:pi.hole

From the docs:

This will create a new certificate for the domain configured in /etc/pihole/pihole.toml (setting webserver.domain).