I currently have my pi-hole running on a Pi2 and have been looking to migrate it into the TrueNAS server for a while
What I do/did want is an easy way to have both boxes use the same IP so that any hardcoded entries looking for DNS don’t have to change
Plus In the event that the TrueNAS is down for a period of (un)scheduled Maintenance I can just fire up my PI and everything just works
Here’s what I did
1 - Created a network bridge
2 - set all LXCs to use the bridge interface (you may not need this)
3 - Created a LXC with
4 cores ← probably overkill 2 should be enough
4GiB RAM ← probably overkill 2 should be enough possibly even 1
Debian Bookworm
4 -open shell
5 - apt install nano curl these are needed for following steps
6 - set static IP
nano /etc/systemd/network/eth0.network
[Network]
DHCP=false
Address=<your static IP> / < your subnet e.g 24>
Gateway=<your router/gateway>
^X and save
7 - curl -sSL https://install.pi-hole.net | bash
from pi-hole github and let it do its thing
Then I used teleporter to move my settings, if you’re setting up for first time follow standard instructions