The DNS Manager tool (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/damianiglesias/pihole-ubuntu-deploy/llms.txt
Use this file to discover all available pages before exploring further.
tools/piholedns) installs a Python-based utility that syncs local DNS records to Pi-hole from a plain-text entries.txt file. It is useful for assigning friendly hostnames to devices on your network — for example, resolving nas.home or myserver.local to their static IP addresses — without manually editing Pi-hole’s web interface each time.
Installation
There are two ways to install the DNS Manager: Option 1 — Viadeploy.sh (recommended)
During the interactive setup you will be prompted at Step 4.9:
y and press Enter. The tool is installed as part of the main deployment.
Option 2 — Standalone
If you have already run deploy.sh and skipped this step, install the tool separately:
What Gets Installed
The installer performs the following steps:- Updates
aptand installspython3,python3-venv,python3-pip, andgit. - Clones the
pihole_dnsrepository from Codeberg into/opt/pihole-dns-manager/:If the directory already exists, it runsgit pullinstead. - Creates an isolated Python virtual environment inside the directory.
- Installs the
requestslibrary via pip. - Generates a
run_dns_sync.shlauncher script with your Pi-hole URL and password pre-configured. - Creates a default
entries.txtfile if one does not already exist.
Directory Structure After Install
entries.txt Format
Each line defines one DNS record in the formatIP Domain. Lines beginning with # are treated as comments and ignored.
Usage
Edit your DNS records
Open Add, modify, or remove records using the
entries.txt in your preferred editor:IP Domain format shown above. Save and close the file.run_dns_sync.sh
The installer generates the following launcher script at/opt/pihole-dns-manager/run_dns_sync.sh. The Pi-hole admin password captured during deploy.sh is embedded automatically:
The
run_dns_sync.sh script contains your Pi-hole admin password in plain text. Restrict its permissions to the owning user to prevent other users from reading it:Post-Deployment Installation
If you installed the DNS Manager using the standalonetools/piholedns script rather than via deploy.sh, the PIHOLE_PASSWORD field in the launcher will be empty. Update it manually before running a sync:
PIHOLE_PASSWORD value with your Pi-hole admin password, save the file, then restrict its permissions with chmod 700.