Pi-hole is a popular network-wide ad-blocking solution that runs on a Raspberry Pi or other compatible devices. In this tutorial, we will show you step-by-step how to install Pi-hole on Arch Linux.
Before we proceed, please make sure you have the following:
Open the terminal and update your system by running the following command:
sudo pacman -Syu
Pi-hole requires several packages to be installed on your system, such as lighttpd
, dnsmasq
, and php-cgi
. Issue the following command to install them:
sudo pacman -S lighttpd dnsmasq php-cgi
Next, we will clone the Pi-hole repository by running the following command:
sudo git clone --depth 1 https://github.com/pi-hole/pi-hole.git /etc/pihole
After successfully cloning the repository, navigate to the Pi-hole directory and install Pi-hole:
cd /etc/pihole
sudo bash basic-install.sh
The installation script will prompt you to select a few options, such as your upstream DNS provider, your preferred blocking mode, and the IP address of your Pi-hole server. Make the appropriate selections and wait for the installation to complete.
After installing Pi-hole, we need to configure our router to use Pi-hole's IP address for DNS resolution. To do this, please refer to your router's manual or consult the following guide: https://discourse.pi-hole.net/t/how-do-i-configure-my-devices-to-use-pi-hole-as-their-dns-server/245
Once you have finished configuring your router, you can verify Pi-hole installation by navigating to the Pi-hole admin console. Open a web browser and enter the IP address of your Pi-hole server followed by /admin
(e.g., http://192.168.1.100/admin
).
You should see the Pi-hole dashboard, which will display the status of the DNS service, the number of blocked domains, and other statistics.
Congratulations! You have successfully installed Pi-hole on your Arch Linux device. With Pi-hole, you can now block ads and trackers across your entire network, providing a faster and safer browsing experience.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!