Pi-hole is an address your entire house depends on. If that address ever changes, every device is left asking an empty room for directions. This guide explains why the static IP is non-negotiable and shows both honest ways to set one.
When you point your router at Pi-hole, you are writing one address into the instructions every device receives: ask 192.168.1.10 for DNS. Routers normally hand out addresses by DHCP, and a DHCP address can change after a reboot or a power cut. If the Ubuntu machine comes back with a different address, your devices keep asking the old one — and websites simply stop opening, everywhere, all at once. A static IP (or a DHCP reservation, which achieves the same thing) makes the address permanent. Here is how to choose it and set it safely.
Nothing about Pi-hole itself minds a new address — it would happily serve DNS at any address. The breakage is on the client side: your router has told a hundred devices to use the old address, and they cannot know it moved. Symptoms look like a total internet failure — Wi-Fi connected, nothing opens — which sends most people blaming their internet provider. Fix the address permanently and this entire class of failure disappears.
Your router reserves a range of addresses to hand out automatically (the DHCP pool), for example 192.168.1.100 to 192.168.1.200. Choose the Pi-hole address inside your network but outside that pool — for example 192.168.1.10 — so the router can never hand the same address to a phone and create a conflict. Find the pool range in the router's LAN or DHCP settings page and write down your chosen address.
The simplest method, and the one least likely to be misconfigured: in the router's DHCP settings, find address reservation (some routers call it static lease or fixed IP) and bind the Ubuntu machine's MAC address to your chosen IP. The machine still asks DHCP for its address like normal — it simply always gets the same answer. This survives reinstalls of Ubuntu and keeps all address management in one place: the router.
If your router has no reservation feature, set the address in Ubuntu's netplan configuration instead. The machine then claims the address itself rather than asking for one. When you do this, set all three values correctly — address with its /24 prefix, the gateway (your router's address), and a DNS server for the machine's own lookups (the router or an upstream provider; the Pi-hole machine should not depend on itself before it has started). Test connectivity before rebooting, so a typing mistake does not lock you out of a headless box.
During installation, Pi-hole asks about the static address and gateway; answer with the values you set. Afterwards, test from another device: query the Pi-hole address directly with nslookup example.com 192.168.1.10 (using your address). An answer means the permanent home is live. Finally, note the address somewhere durable — every future fix in this series starts with 'open the dashboard at the Pi-hole address'.
Static IP wala step aur installer ke baaki screens — sab kuch live is video me dikhaya gaya hai.
▶️ Watch Full VideoFor Pi-hole's purpose, yes. A true static IP is configured on the Ubuntu machine itself; a reservation is configured on the router and guarantees the machine always receives the same address by DHCP. Both give Pi-hole a permanent address. The reservation is usually simpler and keeps everything managed in one place.
Only if you make it permanent with one of the two methods in this guide. An ordinary DHCP address can change after a reboot, a long power cut, or a router reset — and when it does, every device in the house loses DNS at once.
One inside your network's range but outside the router's DHCP pool — for example, if devices get 192.168.1.100 onwards, 192.168.1.10 is a typical safe choice. Avoid the router's own address (.1) and anything another fixed device (printer, NAS, camera) already uses.