# Changing pi-hole ip-address without running reconfigure (pihole -r) in raspi os buster

**URL:** <https://discourse.pi-hole.net/t/changing-pi-hole-ip-address-without-running-reconfigure-pihole-r-in-raspi-os-buster/50730>\
**Category:** General\
**Created:** [October 30, 2021, 2:47pm UTC](https://discourse.pi-hole.net/t/changing-pi-hole-ip-address-without-running-reconfigure-pihole-r-in-raspi-os-buster/50730 "2021-10-30T14:47:06Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![TomMuc1](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/tommuc1/32/18969_2.png) [@TomMuc1](https://discourse.pi-hole.net/u/TomMuc1)\
**Post date:** [October 30, 2021, 2:47pm UTC](https://discourse.pi-hole.net/t/changing-pi-hole-ip-address-without-running-reconfigure-pihole-r-in-raspi-os-buster/50730/1 "2021-10-30T14:47:06Z")

</div>

which text files i have to edit therefore? is it only these two files?  
/etc/dhcpcd.conf  
/etc/pihole/setupVars.conf

where in the webinterface the actual ip of the pi-hole is displayed?

thanx  
tom

---

<div class="post-metadata">

**Author:** ![yubiuser](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/yubiuser/32/12100_2.png) [@yubiuser](https://discourse.pi-hole.net/u/yubiuser)\
**Post date:** [October 30, 2021, 4:35pm UTC](https://discourse.pi-hole.net/t/changing-pi-hole-ip-address-without-running-reconfigure-pihole-r-in-raspi-os-buster/50730/2 "2021-10-30T16:35:03Z")

</div>

> [@TomMuc1](#):
>
> where in the webinterface the actual ip of the pi-hole is displayed?

This information was removed from the web interface, as it was unreliable. It was only sourced from `setupVars.conf` and needed a manual change via `pihole -r` to be set.  
Pi-hole now determines the appropriate interface IP automatically. No need to set it manually anymore.

---

<div class="post-metadata">

**Author:** ![TomMuc1](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/tommuc1/32/18969_2.png) [@TomMuc1](https://discourse.pi-hole.net/u/TomMuc1)\
**Post date:** [October 30, 2021, 4:54pm UTC](https://discourse.pi-hole.net/t/changing-pi-hole-ip-address-without-running-reconfigure-pihole-r-in-raspi-os-buster/50730/3 "2021-10-30T16:54:22Z")

</div>

huh - why not simply use 'ip address show' for the interface display???

'Pi-hole now determines the appropriate interface IP automatically.' aha - and what would be an 'appropriate' ip and where it should be set now? and where does 'pihole -r' set the ip of the raspberry now?

---

<div class="post-metadata">

**Author:** ![yubiuser](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/yubiuser/32/12100_2.png) [@yubiuser](https://discourse.pi-hole.net/u/yubiuser)\
**Post date:** [November 1, 2021, 1:00pm UTC](https://discourse.pi-hole.net/t/changing-pi-hole-ip-address-without-running-reconfigure-pihole-r-in-raspi-os-buster/50730/4 "2021-11-01T13:00:38Z")

</div>

> [@TomMuc1](#):
>
> aha - and what would be an 'appropriate' ip and where it should be set now?

FTL will determine the current IP bound to the interface the query arrived on. (This does not mean your device doesn't need a static IP!)  
[https://github.com/pi-hole/FTL/pull/1111](https://github.com/pi-hole/FTL/pull/1111)

> [@TomMuc1](#):
>
> and where does 'pihole -r' set the ip of the raspberry now?

It does this only in cases `dhcpcd5` is already installed (i.e on Rapsberry Pi OS). For all other distributions you need to set a static IP manually.  
[https://github.com/pi-hole/pi-hole/pull/4260](https://github.com/pi-hole/pi-hole/pull/4260)

* * *

> [@TomMuc1](#):
>
> huh - why not simply use 'ip address show' for the interface display???

Pi-hole is not meant to be a network monitoring tool. But Pull requests adding this (back) are always welcome.

---

<div class="post-metadata">

**Author:** ![TomMuc1](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/tommuc1/32/18969_2.png) [@TomMuc1](https://discourse.pi-hole.net/u/TomMuc1)\
**Post date:** [November 1, 2021, 1:32pm UTC](https://discourse.pi-hole.net/t/changing-pi-hole-ip-address-without-running-reconfigure-pihole-r-in-raspi-os-buster/50730/5 "2021-11-01T13:32:27Z")

</div>

thank you for all the detailed feedback!

cheers  
tom

---

<div class="post-metadata">

**Author:** ![TomMuc1](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/tommuc1/32/18969_2.png) [@TomMuc1](https://discourse.pi-hole.net/u/TomMuc1)\
**Post date:** [November 4, 2021, 12:23pm UTC](https://discourse.pi-hole.net/t/changing-pi-hole-ip-address-without-running-reconfigure-pihole-r-in-raspi-os-buster/50730/6 "2021-11-04T12:23:14Z")

</div>

found another place where ip-address/network has to be edited when cloning a pi-hole install for another network: /etc/dnsmasq.d/01-pihole.conf

omg - why all this absurd redundant stuff? why not just set the network-properties in one single file/place? is this really so hard dear pi-hole coders?

---

<div class="post-metadata">

**Author:** ![jfb](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jfb/32/4332_2.png) [@jfb](https://discourse.pi-hole.net/u/jfb)\
**Post date:** [November 4, 2021, 5:55pm UTC](https://discourse.pi-hole.net/t/changing-pi-hole-ip-address-without-running-reconfigure-pihole-r-in-raspi-os-buster/50730/7 "2021-11-04T17:55:34Z")

</div>

Why didn't you simply run `pihole -r` and select the reconfigure option? That's what that option is designed to do.

---

<div class="post-metadata">

**Author:** ![TomMuc1](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/tommuc1/32/18969_2.png) [@TomMuc1](https://discourse.pi-hole.net/u/TomMuc1)\
**Post date:** [November 4, 2021, 6:16pm UTC](https://discourse.pi-hole.net/t/changing-pi-hole-ip-address-without-running-reconfigure-pihole-r-in-raspi-os-buster/50730/9 "2021-11-04T18:16:02Z")

</div>

because this is a very bad method to prepare several clones in one network for differnt other networks so that a clueless employee just has to plug in the pi there and it is immediately accessible remotely via ssh. and because redundant settings are the most pointless thing anyway.

---

<div class="post-metadata">

**Author:** ![Bucking\_Horn](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/bucking_horn/32/18719_2.png) [@Bucking\_Horn](https://discourse.pi-hole.net/u/Bucking_Horn)\
**Post date:** [November 5, 2021, 8:15am UTC](https://discourse.pi-hole.net/t/changing-pi-hole-ip-address-without-running-reconfigure-pihole-r-in-raspi-os-buster/50730/11 "2021-11-05T08:15:12Z")

</div>

> [@TomMuc1](#):
>
> because redundant settings are the most pointless thing anyway.

Where do you make out redundant settings?

> [@TomMuc1](#):
>
> because this is a very bad method to prepare several clones in one network for differnt other networks so that a clueless employee just has to plug in the pi there and it is immediately accessible remotely via ssh.

You're talking about the method you chose to employ.

If you are intent on cloning, I'd suggest a different approach.  
Note that for different hardware, the pihole-FTL binary may not match, preventing it from running at all, so that would rule out cloning.  
But you could **clone** the sd card to use it **on identical hardware**.

Whether that would be "immediately accessible remotely via ssh" would depend on your chosen network configuration on that device.

Of course, if you'd opted for Pi-hole to create a static IP address on-device during installaton or you've configured such a static on-device IP yourself, you're stuck if the new network doesn't match the current one, or if that IP address would've already been taken in the new network.

If you chose to define a fixed IP address for Pi-hole by configuring a DHCP lease reservation in your router instead, you'd just have to find your Pi-hole host machine's IP in your router, ssh into it, and then run `pihole -r` once.

You could even skip `pihole -r` if the new network would be identical to your current (that's including the DHCP lease reservation for your Pi-hole host machine, of course).

---

<div class="post-metadata">

**Author:** ![jfb](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jfb/32/4332_2.png) [@jfb](https://discourse.pi-hole.net/u/jfb)\
**Post date:** [November 5, 2021, 3:26pm UTC](https://discourse.pi-hole.net/t/changing-pi-hole-ip-address-without-running-reconfigure-pihole-r-in-raspi-os-buster/50730/12 "2021-11-05T15:26:54Z")

</div>

As an example, I made a pre-built Pi Zero W Pi-hole for my sister who lives 1,600 miles away. I had her change the IP range on her router to match mine, then I made her Pi-hole match the IP I use. This made it a simple clone. I put in her WiFi credentials in the wpa\_supplicant file and shipped it.

All she had to do was plug it in and set the DNS on her router DHCP to that IP. It's been running this way for more than 2 years now.

---

<div class="post-metadata">

**Author:** ![TomMuc1](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/tommuc1/32/18969_2.png) [@TomMuc1](https://discourse.pi-hole.net/u/TomMuc1)\
**Post date:** [November 5, 2021, 4:18pm UTC](https://discourse.pi-hole.net/t/changing-pi-hole-ip-address-without-running-reconfigure-pihole-r-in-raspi-os-buster/50730/13 "2021-11-05T16:18:01Z")

</div>

@Bucking_Horn @jfb

yep - we do that similar - even with complete routers for our freelancers. and i did same things private with adsb-receivers. anyways - it is simply a very bad idea to have the ip settings for an pi-hole raspberry redundant in 3 different files/places. and that the webinterface of a network device does not show the actual ip used is cringe too.

---

<div class="post-metadata">

**Author:** ![jfb](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jfb/32/4332_2.png) [@jfb](https://discourse.pi-hole.net/u/jfb)\
**Post date:** [November 5, 2021, 4:24pm UTC](https://discourse.pi-hole.net/t/changing-pi-hole-ip-address-without-running-reconfigure-pihole-r-in-raspi-os-buster/50730/15 "2021-11-05T16:24:37Z")

</div>

> [@TomMuc1](#):
>
> it is simply a very bad idea to have the ip settings for an pi-hole raspberry redundant in 3 different files/places. and that the webinterface of a network device does not show the actual ip used is cringe too.

Pull requests are welcomed at our GitHub repository.

---

<div class="post-metadata">

**Author:** ![yubiuser](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/yubiuser/32/12100_2.png) [@yubiuser](https://discourse.pi-hole.net/u/yubiuser)\
**Post date:** [November 5, 2021, 9:34pm UTC](https://discourse.pi-hole.net/t/changing-pi-hole-ip-address-without-running-reconfigure-pihole-r-in-raspi-os-buster/50730/16 "2021-11-05T21:34:52Z")

</div>

> [@TomMuc1](#):
>
> /etc/dhcpcd.conf  
> /etc/pihole/setupVars.conf

> [@TomMuc1](#):
>
> /etc/dnsmasq.d/01-pihole.conf

> [@TomMuc1](#):
>
> why all this absurd redundant stuff?

The reason is simple: the settings in those file do different things.

In

> [@TomMuc1](#):
>
> /etc/dhcpcd.conf

you define the network settings **for the device hosting Pi-hole**. This file is completely independent of Pi-hole, but a good point to make sure Pi-hole as a fixed IP assignment (other users might to choose a fixed DHCP assignment).

> [@TomMuc1](#):
>
> /etc/pihole/setupVars.conf

Is a collection of setting **for the web interface** and **the connection between the web interface and the DNS resolver**. We are working already on removing the IP settings from this file, firsts steps are the linked PRs above. If you have a good idea how to solve the open questions in [this PR](https://github.com/pi-hole/pi-hole/pull/4356), we are happy to hear about them.

> [@TomMuc1](#):
>
> /etc/dnsmasq.d/01-pihole.conf

Is the actual configuration file for Pi-hole's **embedded DNS server**. There are only two typed of IPs set here: Pi-hole's upstream DNS server and (if applicable) the IPs for conditional forwarding.

* * *

You have a very specific use case which is not the covered by Pi-hole by default. But remember: Pi-hole is a free time project of volunteers which cost you nothing and does provide a simple way to configure your device in a new environment (pihole -r) which you don't want to use. So please refrain from ranting here.

> [@TomMuc1](#):
>
> omg - why all this absurd redundant stuff? why not just set the network-properties in one single file/place? is this really so hard dear pi-hole coders?

> [@TomMuc1](#):
>
> and because redundant settings are the most pointless thing anyway.

> [@TomMuc1](#):
>
> it is simply a very bad idea to have the ip settings for an pi-hole raspberry redundant in 3 different files/places. and that the webinterface of a network device does not show the actual ip used is cringe too.

---

<div class="post-metadata">

**Author:** ![TomMuc1](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/tommuc1/32/18969_2.png) [@TomMuc1](https://discourse.pi-hole.net/u/TomMuc1)\
**Post date:** [November 5, 2021, 9:55pm UTC](https://discourse.pi-hole.net/t/changing-pi-hole-ip-address-without-running-reconfigure-pihole-r-in-raspi-os-buster/50730/17 "2021-11-05T21:55:48Z")

</div>

it is not a rant but the same answer to the same/similar questions. but i give up. it is without question a brilliant idea to manage the ip-addresses in several files. have a nice weekend.

---

<div class="post-metadata">

**Author:** ![system](https://discourse.pi-hole.net/uploads/default/original/3X/7/c/7c8792f649eeb921c5d2b4c41564ffa873d9a2b8.png) [@system](https://discourse.pi-hole.net/u/system)\
**Post date:** [November 13, 2021, 2:42am UTC](https://discourse.pi-hole.net/t/changing-pi-hole-ip-address-without-running-reconfigure-pihole-r-in-raspi-os-buster/50730/21 "2021-11-13T02:42:07Z")

</div>

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