Update Pi-hole from the web interface – small add-on for v6

Hi everyone,

updating Pi-hole always meant opening an SSH session just to type pihole -up. I understand why there is no update button in the web interface: the web server runs as the unprivileged pihole user and should never get root rights. So me and Claude built a small add-on that keeps it that way:

  • The Update available! link in the footer opens a new page with a Start update now button.
  • The button only creates a request file. A separate systemd service (root) watches for that file and runs pihole -up, which is the only thing it can do. Nothing from the web request is passed to it.
  • The page shows the update output live, survives the FTL restart and reports success or failure.
  • The page uses the normal Pi-hole login, and the start request is protected by the session's CSRF token.
  • Pi-hole updates overwrite the web interface, so a second systemd unit watches footer.js and re-applies the button right after every update, including a manual pihole -up. If a future version changes the footer, the link simply falls back to GitHub, and nothing breaks.

Requirements: Pi-hole v6, bare-metal install with systemd (not Docker).

Install:

curl -sSL https://raw.githubusercontent.com/mace-de/Pihole_WebUI_Update/main/install.sh | sudo bash

Uninstall (restores the original files):

sudo /opt/pihole-webupdate/uninstall.sh

Code and details: Github Link

This is unofficial and not supported by the Pi-hole team. Please report problems on GitHub, not here. Feedback is welcome, and so is a word from the devs if this approach (request file + root service) would be acceptable for an official button.

Oliver

No thanks... :-1::-1:

Just want to help. Repo is private now. Thred can be closed.

Please don't close things out because one person decided to be shitty to you.

We're an open community and you made it clear how the changes were coded so I don't have any problem with it.