Install Config Wiki

All about installing, configuring and troubleshooting

User Tools

Site Tools


do_install_pi_hole_my_ubuntu_24_04_server_26

This is an old revision of the document!


how to install ppi-hole on Linux Ubuntu v 24.04 server and Ubuntu v 26.04 server

To install Pi-hole on your standalone Ubuntu 24.04 and Ubuntu 26.04 bare-metal servers, you must first disable Ubuntu's built-in DNS stub listener (systemd-resolved). If you do not disable it, Pi-hole will fail to install because port 53 (DNS) will already be occupied.

Run the following sequential steps on both machines to complete the installation.

1. Disable the Conflicting System DNS DaemonRun these commands on both Ubuntu servers to free up port 53:

# Stop and disable the systemd-resolved service
sudo systemctl stop systemd-resolved
sudo systemctl disable systemd-resolved

# Remove the symbolic link to the resolved configuration file
sudo rm /etc/resolv.conf

# Create a fresh, static DNS configuration file pointing to upstream DNS
echo "nameserver 1.1.1.1" | sudo tee /etc/resolv.conf

2. Run the Official Pi-hole Automated InstallerExecute the network installer script directly from the Pi-hole Official Site via the command line:

bash

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

3. Navigate the Interactive Setup WizardAn automated, blue-screen wizard will launch in your terminal. Step through the settings using your arrow keys and the Tab key:

Static IP Warning: Select Acknowledge. The script will confirm your current LAN IPs (192.168.1.150 on the 24.04 node and 192.168.1.156 on the 26.04 node).

Upstream DNS Provider: Choose any provider you prefer, such as Cloudflare (1.1.1.1) or Google (8.8.8.8).

Blocklists: Press Enter to accept the default StevenBlack blocklist setup.

Web Admin Interface: Choose Yes to install the web dashboard layout.

Web Server (lighttpd): Choose Yes to install the web server dependencies.

4. Note the Admin Password and Access the Dashboard

Once the installation script terminates, it will print a confirmation block to your terminal containing your unique, randomized admin panel password.

Open your web browser and navigate to the respective management panels:

Nextcloud Box Dashboard: http://192.168.1

ONLYOFFICE Box Dashboard: http://192.168.1

Note: If you ever lose or want to change this password later, log into the server's terminal and run:

pihole -a -p

5. Final Step: Configure Ubuntu to Use Its Own Pi-hole

Now that Pi-hole is running locally on both servers, you must force the operating systems to resolve DNS requests using their local loops.

Open the network config file on each machine:

sudo nano /etc/resolv.conf

Change the nameserver IP to look inward at itself:

nameserver 127.0.0.1

Save and close the file. Your cURL requests will now seamlessly hit the local Pi-hole instance, discover your custom LAN records, and establish an encrypted SSL session without ever touching your router.

= = = = = = = =

How to add custom domain records:

do_install_pi_hole_my_ubuntu_24_04_server_26.1786481076.txt.gz · Last modified: 2026/08/11 20:44 by wikiadmin