thumb

Pi-hole is a fantastic product for your home network that allows ad blocking at the network level. I thought that it is updated in the same way as all other parts of the system; using the sudo apt-get update and then sudo apt-get upgrade. But when I logged into my Pi-hole web interface yesterday, I saw a red message saying Pi-hole Version v4.3.1 (Update available!). So how do I update my Pi-hole? In this tutorial, you’ll learn how to update Pi-hole software to the latest version.

Let’s begin

Updating Pi-hole software to the latest version is a really easy process. To do this, we will use the console command pihole -up. Now, step by step guide.

Log into your Raspberry Pi’s (or whatever you use as a Pi-hole) console.

If your Raspberry Pi is configured to start a graphical desktop when it boots, or if you just prefer to use one, then look for a program called “LXTerminal”.

You can connect to your Raspberry Pi from another computer over the network with SSH using the command ssh pi@192.168.2.1 in Terminal. Make sure you replace 192.168.2.1 with actual IP address of your Raspberry Pi.

Type the following command to check if there is an update of Pi-hole:

pihole -v
  Pi-hole version is v4.3.1 (Latest: v4.3.2)
  AdminLTE version is v4.3 (Latest: v4.3)
  FTL version is v4.3.1 (Latest: v4.3.1)

In my case, the AdminLTE and FTL is up to date, but the Pi-hole itself is out of date. There is an update v4.3.2.

Type the following command to start the Pi-hole update process:

During the update process, there will be a short period where Pi-hole will not be available.

Nothing in the Pi-hole update process will change your Pi-hole configuration files, unless you have edited any of the files that tell you not to edit them.

pihole -up
[i] Checking for updates...
[i] Pi-hole Core:	update available
[i] Web Interface:	up to date
[i] FTL:		up to date

[i] Pi-hole core files out of date, updating local repo.
[✓] Check for existing repository in /etc/.pihole
[✓] Update repo in /etc/.pihole

[i] If you had made any changes in '/etc/.pihole/', they have been stashed using 'git stash'

[✓] Root user check

      .;;,.
      .ccccc:,.
       :cccclll:.      ..,,
        :ccccclll.   ;ooodc
         'ccll:;ll .oooodc
           .;cll.;;looo:.
               .. ','.
              .',,,,,,'.
            .',,,,,,,,,,.
          .',,,,,,,,,,,,....
        ....''',,,,,,,'.......
      .........  ....  .........
      ..........      ..........
      ..........      ..........
      .........  ....  .........
        ........,,,,,,,'......
          ....',,,,,,,,,,,,.
             .',,,,,,,,,'.
              .',,,,,,'.
                ..'''.

[i] Existing PHP installation detected : PHP version 7.3.9-1~deb10u1
[i] Performing unattended setup, no whiptail dialogs will be displayed
[✓] Disk space check
[✓] Update local cache of available packages

[✓] Checking apt-get for upgraded packages... up to date!

[i] Installer Dependency checks...
[✓] Checking for apt-utils
[✓] Checking for dialog
[✓] Checking for debconf
[✓] Checking for dhcpcd5
[✓] Checking for git
[✓] Checking for iproute2
[✓] Checking for whiptail

[i] Performing reconfiguration, skipping download of local repos
[✓] Resetting repository within /etc/.pihole...
[✓] Resetting repository within /var/www/html/admin...
[i] Main Dependency checks...
[✓] Checking for cron
[✓] Checking for curl
[✓] Checking for dnsutils
[✓] Checking for iputils-ping
[✓] Checking for lsof
[✓] Checking for netcat
[✓] Checking for psmisc
[✓] Checking for sudo
[✓] Checking for unzip
[✓] Checking for wget
[✓] Checking for idn2
[✓] Checking for sqlite3
[✓] Checking for libcap2-bin
[✓] Checking for dns-root-data
[✓] Checking for resolvconf
[✓] Checking for libcap2
[✓] Checking for lighttpd
[✓] Checking for php7.3-common
[✓] Checking for php7.3-cgi
[✓] Checking for php7.3-sqlite3

[✓] Enabling lighttpd service to start on reboot...

[i] FTL Checks...

[✓] Detected ARM-hf architecture (armv6 or lower) Using ARM binary
[i] Checking for existing FTL binary...
[i] Latest FTL Binary already installed (v4.3.1). Confirming Checksum...
[i] Checksum correct. No need to download!
[✓] Checking for user 'pihole'
[✓] Installing scripts from /etc/.pihole

[i] Installing configs from /etc/.pihole...
[i] Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone!
[✓] Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf

[i] Installing blocking page...
[✓] Creating directory for blocking page, and copying files
[✗] Backing up index.lighttpd.html
    No default index.lighttpd.html file found... not backing up

[✓] Installing sudoer file

[✓] Installing latest Cron script

[✓] Installing latest logrotate script
[i] Backing up /etc/dnsmasq.conf to /etc/dnsmasq.conf.old
[✓] man pages installed and database updated
[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...
[✓] Deleting existing list cache
[i] Pi-hole blocking is enabled
[✗] DNS resolution is currently unavailable
[✓] DNS resolution is now available

[i] Neutrino emissions detected...
[✓] Pulling blocklist source list into range

[i] Target: raw.githubusercontent.com (hosts)
[✓] Status: Retrieval successful

[i] Target: mirror1.malwaredomains.com (justdomains)
[✓] Status: Retrieval successful

[i] Target: sysctl.org (hosts)
[✓] Status: Retrieval successful

[i] Target: zeustracker.abuse.ch (blocklist.php?download=domainblocklist)
[✓] Status: Retrieval successful

[i] Target: s3.amazonaws.com (simple_tracking.txt)
[✓] Status: Retrieval successful

[i] Target: s3.amazonaws.com (simple_ad.txt)
[✓] Status: Retrieval successful

[i] Target: hosts-file.net (ad_servers.txt)
[✓] Status: Retrieval successful

[✓] Consolidating blocklists
[✓] Extracting domains from blocklists
[i] Number of domains being pulled in by gravity: 138226
[✓] Removing duplicate domains
[i] Number of unique domains trapped in the Event Horizon: 115995
[i] Nothing to whitelist!
[i] Number of regex filters: 0
[✓] Parsing domains into hosts format
[✓] Cleaning up stray matter

[✓] Force-reloading DNS service
[✓] DNS service is running
[✓] Pi-hole blocking is Enabled

[i] The install log is located at: /etc/pihole/install.log
Update Complete!

Current Pi-hole version is v4.3.2
Current AdminLTE version is v4.3
Current FTL version is v4.3.1

Finally, you can retype the command pihole -v to verify that you have the latest version of Pi-hole already installed.

pihole -v
  Pi-hole version is v4.3.2 (Latest: v4.3.2)
  AdminLTE version is v4.3 (Latest: v4.3)
  FTL version is v4.3.1 (Latest: v4.3.1)

Conclusion

That’s it, you’re done. Now you have updated your Pi-hole software. So simple isn’t it?

I hope this article has helped you learn how to update Pi-hole software to the latest version. If this article has helped you then please leave a comment :smiley:

Thanks for reading!