You are on page 1of 1

Log In Register

RASPBERRY PI

How to update Pi-hole easily


By VarHowto Editor Updated May 25, 2021 11 Comments

Here you will learn how to update Pi-hole to the latest version from
command line. You are here because you might see there is a new version
showing in the footer of Pi-hole’s admin interface. But how do I update Pi-
hole?

In rare cases, if you haven’t installed Pi-hole, you can install it in the
following 1 command:

curl -sSL https://install.pi-hole.net | bash

Contents

Raspberry Pi Step 1 — SSH into Raspberry Pi to update Pi-hole


Install Webmin (management) Step 2 — Check Pi-hole version for update
Upgrade Pi-hole (w/ install) Step 3 — Update Pi-hole
3 steps to update Pi-hole
SSH into Raspberry Pi for Pi-hole update
Check Pi-hole version
Update Pi-hole using -up

Step 1 — SSH into Raspberry Pi to update Pi-hole


Ask author in Forum
You might already know this, you can use ssh <ip/host> to ssh into your
Leave a reply
Raspberry Pi (4 or 3 maybe). If you installed Pi-hole on Ubuntu or CentOS,
you can ignore this step.
+28
On most linux systems, you can use Alt-Ctrl-t to open a terminal and
type the following command:

ssh <ip/host>

Once you are on your Raspberry Pi, you will see your bash prompt, actually
the username/host, is changed like below:

vh@varhowto-com:~$ ssh rpi


Linux rpi 4.19.118-v7l+ #1311 SMP Mon Apr 27 14:26:42 BST 2020 armv7l
The programs included with the Debian GNU/Linux system are free
software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Web console: https://rpi:9090/ or https://192.168.0.130:9090/
Last login: Sat Aug 22 14:53:14 2020 from 192.168.2.103
pi@rpi:~ $

Step 2 — Check Pi-hole version for update


Next, make sure you need to update Pi-hole. Simply run the following
command:

pihole -v

You will see similar output as shown in the following screenshot. Here my
current Pi-hole version is 4.4 and the latest is 5.1.2. BTW, AdminLTE and
FTL are Pi-hole’s components so will be updated as well.

pi@rpi:~ $ pihole -v
Pi-hole version is v4.4 (Latest: v5.1.2)
AdminLTE version is v4.3.3 (Latest: v5.1.1)
FTL version is v4.3.1 (Latest: v5.2)

Step 3 — Update Pi-hole


Updating Pi-hole is a fully automated process and is a piece of cake —
super easy.

Run the pihole command with -up , which means update Pi-hole, not
bring Pi-hole up…

pihole -up

You will see similar output like below. It will take a while to update Pi-hole.

pi@rpi:~ $ pihole -up


[i] Checking for updates…
[i] Pi-hole Core: update available
[i] Web Interface: update available
[i] FTL: update available
[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'
[i] Pi-hole Web Admin files out of date, updating local repo.
[✓] Check for existing repository in /var/www/html/admin
[✓] Update repo in /var/www/html/admin
[i] If you had made any changes in '/var/www/html/admin/', they have
been stashed using 'git stash'
[i] FTL out of date, it will be updated by the installer.
You will
[✓] seeuser
Root “Update
checkComplete!” when it’s done; you do not need to reboot
.;;,. .ccccc:,. :cccclll:. ..,, :ccccclll. ;ooodc 'ccll:;ll .oooodc
your Raspberry Pi or computer. Then you can open pihole admin
.;cll.;;looo:. .. ','. .',,,,,,'. .',,,,,,,,,,. .',,,,,,,,,,,,....
....''',,,,,,,'....... .........and
http://pi.hole/admin/index.php ....you will see..........
......... in the footer that pi-hole is
..........
updated to v5.1.2
.......... and the
.......... web interface
......... is of v5.2.
.... ......... ........,,,,,,,'......
....',,,,,,,,,,,,. .',,,,,,,,,'. .',,,,,,'. ..'''.
[✓] Update local cache of available packages
[i] Existing PHP installation detected : PHP version 7.3.14-
1~deb10u1
[i] Performing unattended setup, no whiptail dialogs will be
displayed
[✓] Disk space check
[✓] Checking apt-get for upgraded packages… 273 updates available
[i] It is recommended to update your OS after installing the Pi-
hole!
[i] Installer Dependency checks…
[✓] Checking for dhcpcd5
[✓] Checking for git
[✓] Checking for iproute2
[✓] Checking for whiptail
[✓] Checking for dnsutils
[✓] Supported OS detected
[i] SELinux not detected
[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 iputils-ping
[✓] Checking for lsof
[✓] Checking for netcat
[✓] Checking for psmisc
[✓] Checking for sudo
[✓] Checking for unzip
3 steps to update Pi-hole
[✓] Checking for wget
[✓] Checking for idn2

It’s[✓]
easyChecking for sqlite3
to update pi-hole and it only took 3 steps.
[✓] Checking for libcap2-bin
[✓] Checking for dns-root-data
Total
[✓] Time:
Checking 10 for
minutes
libcap2
[i] Checking for lighttpd (will be installed)
[✓] Checking for php7.3-common
SSH into Raspberry Pi for Pi-hole update
[i] Checking for php7.3-cgi (will be installed)
[✓] Checking for php7.3-sqlite3
[✓] Checking for php7.3-xml
[✓] Checking for php7.3-intl
[i] Processing apt-get install(s) for: lighttpd php7.3-cgi, please
wait…
Selecting previously unselected package libfam0:armhf.
(Reading database … 150676 files and directories currently
installed.)
Preparing to unpack …/00-libfam0_2.7.0-17.3_armhf.deb …
Unpacking libfam0:armhf (2.7.0-17.3) …
Selecting previously unselected package lighttpd.
Preparing to unpack …/01-lighttpd_1.4.53-4_armhf.deb …
Unpacking lighttpd (1.4.53-4) …
Preparing to unpack …/02-php7.3-zip_7.3.19-1~deb10u1_armhf.deb …
Unpacking php7.3-zip (7.3.19-1~deb10u1) over (7.3.14-1~deb10u1) …
Preparing to unpack …/03-php7.3-xml_7.3.19-1~deb10u1_armhf.deb …
Unpacking php7.3-xml (7.3.19-1~deb10u1) over (7.3.14-1~deb10u1) …
Preparing to unpack …/04-php7.3-sqlite3_7.3.19-1~deb10u1_armhf.deb …
Unpacking php7.3-sqlite3 (7.3.19-1~deb10u1) over (7.3.14-1~deb10u1)

Preparing to unpack …/05-php7.3-readline_7.3.19-1~deb10u1_armhf.deb

Unpacking php7.3-readline (7.3.19-1~deb10u1) over (7.3.14-1~deb10u1)

Preparing to unpack …/06-php7.3-opcache_7.3.19-1~deb10u1_armhf.deb …
Unpacking php7.3-opcache (7.3.19-1~deb10u1) over (7.3.14-1~deb10u1)

Preparing to unpack …/07-php7.3-mysql_7.3.19-1~deb10u1_armhf.deb …
Unpacking php7.3-mysql (7.3.19-1~deb10u1) over (7.3.14-1~deb10u1) …
Preparing to unpack …/08-php7.3-mbstring_7.3.19-1~deb10u1_armhf.deb

Unpacking php7.3-mbstring (7.3.19-1~deb10u1) over (7.3.14-1~deb10u1)
Simply
… open an terminal run ssh <ip/host>
Preparing to unpack …/09-php7.3-json_7.3.19-1~deb10u1_armhf.deb …
Unpacking php7.3-json (7.3.19-1~deb10u1) over (7.3.14-1~deb10u1) …
Check Pi-hole version
Preparing to unpack …/10-php7.3-intl_7.3.19-1~deb10u1_armhf.deb …
Unpacking php7.3-intl (7.3.19-1~deb10u1) over (7.3.14-1~deb10u1) …
Preparing to unpack …/11-php7.3-gd_7.3.19-1~deb10u1_armhf.deb …
Unpacking php7.3-gd (7.3.19-1~deb10u1) over (7.3.14-1~deb10u1) …
Preparing to unpack …/12-php7.3-fpm_7.3.19-1~deb10u1_armhf.deb …
Unpacking php7.3-fpm (7.3.19-1~deb10u1) over (7.3.14-1~deb10u1) …
Preparing to unpack …/13-php7.3-dev_7.3.19-1~deb10u1_armhf.deb …
Unpacking php7.3-dev (7.3.19-1~deb10u1) over (7.3.14-1~deb10u1) …
Preparing to unpack …/14-php7.3-curl_7.3.19-1~deb10u1_armhf.deb …
Unpacking php7.3-curl (7.3.19-1~deb10u1) over (7.3.14-1~deb10u1) …
Preparing to unpack …/15-php7.3-cli_7.3.19-1~deb10u1_armhf.deb …
Unpacking php7.3-cli (7.3.19-1~deb10u1) over (7.3.14-1~deb10u1) …
Preparing to unpack …/16-php7.3-common_7.3.19-1~deb10u1_armhf.deb …
Unpacking php7.3-common (7.3.19-1~deb10u1) over (7.3.14-1~deb10u1) …
Selecting previously unselected package php7.3-cgi.
Preparing to unpack …/17-php7.3-cgi_7.3.19-1~deb10u1_armhf.deb …
Unpacking php7.3-cgi (7.3.19-1~deb10u1) …
Setting up php7.3-common (7.3.19-1~deb10u1) …
Setting up php7.3-mysql (7.3.19-1~deb10u1) …
Setting up php7.3-intl (7.3.19-1~deb10u1) …
Setting up php7.3-xml (7.3.19-1~deb10u1) …
Setting up libfam0:armhf (2.7.0-17.3) …
Setting up php7.3-opcache (7.3.19-1~deb10u1) …
Setting up php7.3-zip (7.3.19-1~deb10u1) …
Setting up php7.3-curl (7.3.19-1~deb10u1) …
Setting up php7.3-gd (7.3.19-1~deb10u1) …
Setting up lighttpd (1.4.53-4) …
Setting up php7.3-sqlite3 (7.3.19-1~deb10u1) …
Setting up php7.3-mbstring (7.3.19-1~deb10u1) …
Setting up php7.3-json (7.3.19-1~deb10u1) …
Setting up php7.3-readline (7.3.19-1~deb10u1) …
Setting up php7.3-cli (7.3.19-1~deb10u1) …
Replacing config file /etc/php/7.3/cli/php.ini with new version
Setting
Simply runuppihole
php7.3-cgi
-v . You (7.3.19-1~deb10u1)
should see there…are latest versions.
update-alternatives: using /usr/bin/php-cgi7.3 to provide
/usr/bin/php-cgi (php-cgi) in auto mode

Update Pi-hole using


update-alternatives: using /usr/lib/cgi-bin/php7.3 to provide
-up
/usr/lib/cgi-bin/php (php-cgi-bin) in auto mode
Replacing config file /etc/php/7.3/cgi/php.ini with new version
Setting up php7.3-fpm (7.3.19-1~deb10u1) …
Setting up php7.3-dev (7.3.19-1~deb10u1) …
Processing triggers for systemd (241-7~deb10u4+rpi1) …
Processing triggers for man-db (2.8.5-2) …
Processing triggers for libc-bin (2.28-10+rpi1) …
[✓] Enabling lighttpd service to start on reboot…
[✓] Checking for user 'pihole'
[i] FTL Checks…
[✓] Detected ARM-hf architecture (armv7+)
[i] Checking for existing FTL binary…
[✓] Downloading and Installing FTL
[✓] 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
[i] 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…
Simply run piholepihole-FTL
[✓] Restarting -up . service…
[i] Creating new gravity database
[i] Migrating content of /etc/pihole/adlists.list into new database
[i] Migrating content of /etc/pihole/blacklist.txt into new database
[i] Migrating content of /etc/pihole/whitelist.txt into new database
Related [i] Migrating content of /etc/pihole/regex.list into new database
[✓] Deleting existing list cache
[i] Neutrino emissions detected…
[✓] Pulling blocklist source list into range
[✓] Preparing new gravity database
[i] Target:
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
[✓] Status: Retrieval successful
[i] Received 57260 domains
[i] Target: https://mirror1.malwaredomains.com/files/justdomains
[✓] Status: Retrieval successful
[i] Received 26854 domains
How to install Webmin on Raspberry Pi 4 http://sysctl.org/cameleon/hosts
[i] Target: How to enable Nginx HTTPS on Raspbian How to Install ROS Noetic on Raspberry Pi 4
May 9, 2020 [✓] Status: Retrieval successful June 27, 2020
(Raspberry PI)
[i] Received 20567 domains
In "Raspberry Pi" April 11, 2020 In "ROS"
[i] Target:
In "Linux"
https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
[✓] Status: Retrieval successful
[i] Received 34 domains
[i] Target:
https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
[✓] Status: Retrieval successful
[i] Received 2701 domains
+28 https://hosts-file.net/ad_servers.txt
[i] Target:
[✗] Status: Not found
[✗] List download failed: no cached list available
Target:Tweet
Share 1
[i] Save
https://raw.githubusercontent.com/privacy-protection-
tools/anti-AD/master/anti-ad-domains.txt
[✓] Status: Retrieval successful

By VarHowto Editor
[i] Received 41581 domains
[✓] Storing downloaded domains in new gravity database
[✓] Building tree Welcome to VarHowto!
[✓] Swapping databases
[i] Number of gravity PROFILE POSTS
domains: 148997 (132248 unique domains)
[i] Number of exact blacklisted domains: 2
[i] Number of regex blacklist filters: 0
[i] Number of exact whitelisted domains: 9
[i] Number of regex whitelist filters: 0
[✓] Flushing DNS cache

11 replies on “How to update Pi-hole easily”


[✓] Cleaning up stray matter
[✓] DNS service is running
[✓] Pi-hole blocking is Enabled
[i] The install log is located at: /etc/pihole/install.log
Update Complete!
Current
PiholePi-hole
Ssh Logga version is v5.1.2.
In – Sweden Logga In
Current
July 27,AdminLTE version
2022 at 9:08 pm is v5.1.1.
Current FTL version is v5.2.

[…] How to update Pi-hole easily – VarHowto […]

Guy
November 9, 2021 at 1:13 pm

Got an error in the end :


Error: Unable to update package cache. Please try “sudo apt-
get update”
Unable to complete update, please contact Pi-hole Support
Core and Web interface are up to date.
FTL errors out?

+5

Rob
January 14, 2022 at 10:38 am

Try using “sudo pihole -up” instead “pihole -up”

+2

Lazydad.tech
February 11, 2022 at 10:43 am

you dont have enough privelages to do run that command

so run “sudo apt-get update”

it will ask for a password, then enter the admin password


there and it should run fine.

Chromebooker
May 25, 2021 at 11:26 am

Using ChromeOS [crosh]:


Ctrl-Alt-T to open terminal
type SHELL
type SSH [your pihole IP on your network, e.g. 192.168.0.44]
password [you should know when you first setup installed your
pihone]
Then follow the instructions here in this blog post.

BTW there is a typo in step 2, in the gray highlight: AdminLET

VarHowto Editor
May 25, 2021 at 12:30 pm

Thanks for the specific instruction for Chromebook! I just


fixed the typo and add a brief instruction on how to open a
terminal with the shortcut Ctrl-Alt-T .

BY POST AUTHOR

Hucks
April 25, 2021 at 6:06 am

Thanks from me too.

+3

Steve
January 26, 2021 at 6:28 am

Ensure you are logged in as ‘root’ or use “sudo” !!

Took me way longer than it should to realise this.

Not needed for the core enging or web interface but IS required
for FTL!

+2

Steve
January 26, 2021 at 6:29 am

engine

SMH !!

VarHowto Editor
January 30, 2021 at 9:26 pm

Normally you shouldn’t. You’ve probably installed pihole


as root.

+2

BY POST AUTHOR

Mike
December 25, 2020 at 2:43 am

thank you, works fine

+3

Comments are closed.

HomeAbout VarHowtoPrivacy PolicyContact Us

Subscribe to VarHowto
You'll receive emails of new posts.

Email Address

SUBSCRIBE

© 2023 VarHowto

You might also like