Moving pi-hole to another machine?

I have a machine on my LAN that's running pi-hole v6 in DHCP mode and works fine. I'd like to have one less machine though, so want to move the pi-hole to another machine on the same LAN and ditch the current hardware.

Am I right in thinking I can just do it like this?

Current machine:
Web admin GUI > Settings > Teleporter and save the file (EDIT: haha just tried it and get "insecure download blocked" so I'll need to do a pihole-FTL --teleporter instead)

New machine:
Give it a fixed IP, and also make sure it's using external DNS (current machine is using 8.8.8.8 and 1.1.1.1 I think this is to prevent loops?)
Then I do curl -sSL https://install.pi-hole.net | bash

Current machine:
systemctl stop pihole-FTL
systemctl disable pihole-FTL

I then go to Web admin GUI > Settings > Teleporter and import the settings file, check it's all OK and, er, that's it?

I guess I should reboot a few things on the network after that to check they get their network settings OK.

That's about it.

I'd leave both the old and new running for a bit so clients that have not updated to the new DNS IP will still have functional DNS while you are doing the cutover. If the new setup will be the DHCP server then disable the DHCP functions on the old so you don't have two DHCP servers running at the same time. This way you can safely revert if things go wrong (just re-enable the DHCP function on the old).

Thanks - by the way, I've read conflicting info about whether the pi-hole machine itself should use itself for its DNS resolution and/or giving itself a fixed IP over DHCP.

My current machine (with pi-hole doing DHCP) is using a locally defined static IP and DNS servers (that is, not using DHCP for that). Is that the best way? In my case I'd also like to make sure other apps on the machine are going through the pi-hole.

I wouldn't do either :slight_smile:

If the Pi-hole server is just a server then there is no need to use itself as the DNS. That setup used to be required years ago to get things to function correctly but now it's almost never a good idea. If you are running Pi-hole on a machine that also is a client, say with a desktop environment installed, then you need to decide if you want the clients to have filtered DNS. Setting /etc/resolv.conf to have 127.0.0.1 as the sole DNS will work but that can lead to having no DNS if Pi-hole is down for any reason.

DHCP servers should not assign themselves IP addresses. A static IP address that is outside the DHCP client pool is the way to go. You don't want anything to go sideways and the DHCP server change it's IP address.

Ah OK - thanks!

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.