installing_pi_hole_linux_ubuntu_version_24_04
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| installing_pi_hole_linux_ubuntu_version_24_04 [2026/08/17 18:50] – wikiadmin | installing_pi_hole_linux_ubuntu_version_24_04 [2026/08/17 21:05] (current) – wikiadmin | ||
|---|---|---|---|
| Line 19: | Line 19: | ||
| </ | </ | ||
| + | Next, Disable the default systemd-resolved DNS stub listener to free up Port 53 for Pi-hole. Then, restart systemd-resolved with the following commands: | ||
| + | < | ||
| + | sudo sed -i ' | ||
| + | |||
| + | sudo systemctl restart systemd-resolved | ||
| + | |||
| + | </ | ||
| + | |||
| + | Next intall Pi-Hole for standard bare metal server environments (not containerized) using the Official Automated Script -- Run the official network installer command: | ||
| + | |||
| + | < | ||
| + | curl -sSL https:// | ||
| + | </ | ||
| + | |||
| + | OPTION: | ||
| + | |||
| + | < | ||
| + | curl -sSL https:// | ||
| + | </ | ||
| + | |||
| + | Complete the Configuration of Pi-Hole. | ||
| + | |||
| + | Once the installation wizard launches in your terminal: | ||
| + | |||
| + | Write down for safekeeping the Admin Web Interface Password displayed at the very end of the installation process. | ||
| + | |||
| + | < | ||
| + | |||
| + | IMPORTANT: | ||
| + | |||
| + | However, the official installer does not give you an option to change the port during the installation wizard. You must configure it immediately after the installation finished. | ||
| + | |||
| + | < | ||
| + | sudo vim / | ||
| + | </ | ||
| + | |||
| + | Look for the [webserver] section and locate the port variable. Change 80 to an open port like 8080. | ||
| + | |||
| + | < | ||
| + | port = " | ||
| + | </ | ||
| + | |||
| + | Save the file (Esc from Insert mode and type :w then Enter) and exit vim (:q! then enter). Restart the Pi-hole system service to apply changes: | ||
| + | |||
| + | < | ||
| + | sudo systemctl restart pihole-FTL | ||
| + | </ | ||
| + | |||
| + | |||
| + | The Pi-Hole installer steps: | ||
| + | |||
| + | The installer will transform your device into a network-wide ad blocker! | ||
| + | |||
| + | The Pi-Hole is free but powered by your donations, | ||
| + | |||
| + | Pi-hole is a server and needs a static IP address to function properly. | ||
| + | |||
| + | Select an upstream DNS provider: | ||
| + | |||
| + | There is a list and then there is " | ||
| + | |||
| + | Enter your desired Upstream DNS providers separated by a comma +1 space, for example: 8.8.8.8, 8.8.4.4 | ||
| + | |||
| + | Confirm that your DNS entries are correct. | ||
| + | |||
| + | Do you want to use StevenBlack' | ||
| + | |||
| + | Would you like to enable Query Logging? | ||
| + | |||
| + | Select a privacy mode for FTL. With my mouse, I chose: | ||
| + | and Continue | ||
| + | |||
| + | See: https:// | ||
| + | |||
| + | INSTALL RESULTS: | ||
| + | |||
| + | < | ||
| + | [i] SELinux not detected | ||
| + | [✓] Update local cache of available packages | ||
| + | [✓] Building dependency package pihole-meta.deb | ||
| + | [✓] Installing Pi-hole dependency package | ||
| + | |||
| + | [i] IPv4 address: 192.168.2.152/ | ||
| + | [i] Unable to find IPv6 ULA/GUA address | ||
| + | [i] IPv6 address: | ||
| + | [i] Using upstream DNS: Custom (74.40.74.40, | ||
| + | [i] Using upstream DNS: Custom (74.40.74.40, | ||
| + | [i] Not installing StevenBlack' | ||
| + | [i] Not installing StevenBlack' | ||
| + | [i] Query Logging off. | ||
| + | [i] Query Logging off. | ||
| + | [i] Using privacy level: 3 | ||
| + | [✗] Check for existing repository in / | ||
| + | [i] Clone https:// | ||
| + | [✓] Clone https:// | ||
| + | |||
| + | [✗] Check for existing repository in / | ||
| + | [i] Clone https:// | ||
| + | [✓] Clone https:// | ||
| + | |||
| + | [✗] Checking for group ' | ||
| + | [✓] Creating group ' | ||
| + | [✓] Creating user ' | ||
| + | |||
| + | [i] FTL Checks... | ||
| + | |||
| + | [✓] Detected x86_64 architecture | ||
| + | [✓] Downloading and Installing FTL | ||
| + | [✓] Installing scripts from / | ||
| + | |||
| + | [i] Installing configs from / | ||
| + | |||
| + | [✓] Installing latest Cron script | ||
| + | |||
| + | [✓] Installing latest logrotate script | ||
| + | [✓] man pages installed and database updated | ||
| + | [i] Testing if systemd-resolved is enabled | ||
| + | [✓] Disabling systemd-resolved DNSStubListener | ||
| + | [i] Restarting services... | ||
| + | [✓] Enabling pihole-FTL service to start on reboot... | ||
| + | [✓] Restarting pihole-FTL service... | ||
| + | [\e[1; | ||
| + | root@xcsvr:/ | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | [\e[1; | ||
| + | root@xcsvr:/ | ||
| + | 0: command not found | ||
| + | 53: command not found | ||
| + | 27m: command not found | ||
| + | </ | ||
| + | |||
| + | Force Pi-hole v6 to immediately use port 8080 via the official Command Line Interface (CLI) tool: | ||
| + | |||
| + | Run this terminal command on your 192.168.1.152 server: | ||
| + | |||
| + | < | ||
| + | sudo pihole-FTL --config webserver.port " | ||
| + | </ | ||
| + | |||
| + | Use code with caution. | ||
| + | |||
| + | Restart the core engine to force-bind the new ports: | ||
| + | |||
| + | < | ||
| + | sudo systemctl restart pihole-FTL | ||
| + | </ | ||
| + | |||
| + | Check status and Open the Uncomplicated firewall port 8080 if necessary | ||
| + | |||
| + | < | ||
| + | sudo ufw status | ||
| + | sudo ufw open 8080/tcp | ||
| + | </ | ||
| + | |||
| + | Here is exactly how to configure Pi-hole and Apache to make this work. | ||
| + | |||
| + | Step 1: Add Local DNS Records in Pi-hole. | ||
| + | |||
| + | |||
| + | You must tell Pi-hole to intercept the public domains and resolve them to your internal server IPs instead of the public WAN IP. | ||
| + | |||
| + | |||
| + | Log into your Pi-hole admin dashboard (http:// | ||
| + | |||
| + | |||
| + | Navigate to Local DNS > DNS Records on the sidebar. | ||
| + | |||
| + | |||
| + | Add the following three records: | ||
| + | |||
| + | |||
| + | Domain IP Address Description | ||
| + | |||
| + | < | ||
| + | sunsky.cloud 192.168.1.152 | ||
| + | onlyoffice.sunsky.cloud 192.168.1.152 Points 1st OnlyOffice to the Apache server | ||
| + | officepkg.com 192.168.1.152 Crucial: Points to Apache first, not .156 | ||
| + | </ | ||
| + | |||
| + | |||
| + | Note on officepkg.com: | ||
installing_pi_hole_linux_ubuntu_version_24_04.1786992646.txt.gz · Last modified: 2026/08/17 18:50 by wikiadmin
