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.2.150 on the 24.04 node and 192.168.2.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.2
ONLYOFFICE Box Dashboard: http://192.168.2
Note: If you ever lose or want to change this password later, log into the server's terminal and run:
pihole -a -p
