Pi-hole won't switch to Dark Mode

IF changing theme from light to dark and navigating away to different page. Theme will be again light

The setting is stored in your browser. Try disabling any browser plugins and maybe privacy options and try again. Then continue to re-enable them until you find who is causing the trouble.

I tried with resetted browser and incognito mode. Still the same

You may have clicked on the wrong Save button.
Click the one marked directly below Web interface settings:

Yeah I know that. Not the case

Let's look at the file permissions.

sudo ls -lha /etc/pihole/*.conf

There is certainly a lot of information missing here to get down to the reasons.

  • Which operating system/device did you install your Pi-hole on?

  • Which browser/operating system are you using when you try to change the theme?

  • What is the output of

    grep THEME /etc/pihole/setupVars.conf
    

    ?

  1. Debian 10
  2. Chrome/Edge on any win10 PC
  3. No information about THEME in setupVars.conf

Now I remember. When I updated my pihole from 4 to 5. It failed so bad that I made clean install to debian with command "curl -sSL https://install.pi-hole.net | bash". This method also not working with clean debian 10. Throws a bunch of errors and I manually fixed them step by step. Seems that everything was not correct. Right now I did also clean install to debian 10 with curl -sSL https://install.pi-hole.net | bash and again failed. Then I manually downloaded and run installer, then everything works and no problem with pi-hole themes.

Clean debian 10 install with command curl -sSL https://install.pi-hole.net | bash install log

[✓] Enabling lighttpd service to start on reboot...
[i] Creating user 'pihole'...main: line 1893: useradd: command not found
[✗] Creating user 'pihole'

[i] FTL Checks...

[✓] Detected x86_64 architecture
[i] Checking for existing FTL binary...
[i] Downloading and Installing FTL...transferred... chown: invalid user: ‘pihole:pihole’
[✓] Downloading and Installing FTL
main: line 2012: usermod: command not found
grep: /etc/pihole/setupVars.conf: No such file or directory
[i] Testing if systemd-resolved is enabled
[i] Systemd-resolved is not enabled
[✓] Restarting lighttpd service...
[✓] Enabling lighttpd service to start on reboot...
[i] Restarting services...
[✓] Enabling pihole-FTL service to start on reboot...
[✓] Restarting pihole-FTL service...
main: line 1846: /opt/pihole/gravity.sh: No such file or directory

At the time your were running that installation command, did you perhaps try to elevate to su before doing that?

I think so yes

If you have indeed used su (and not just sudo for the bash script), then the above command not found error may be a direct consequence: Starting with Debian Buster, su will not inherit environment settings as its predecessors did. If you want that, you have to use su - instead.
See also the original maintainer's comment on a related Debian bug report (wontfix).

I do not remember what I did, but usually in Debian i'll use command "su root" before I start to install/configure something.

That would explain why your installation has failed the way it did. :wink:

You shouldn't do that in general, and also it is specifically not required to install Pi-hole. Pi-hole's installation script handles necessary access control itself.

1 Like

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