Custom DNS-Entries with Docker/Pi-Hole/Portainer/Fritzbox

Hello guys,

i am trying to set up custom dns-entries for:
192.168.178.5 cloud.butlr
192.168.178.6 smart.butlr
for example..

but i cant seem to find the right file to edit or get the settings. It is redirecting me either to google if i use smart.butlr and if i use smart.butlr/ it says ERR_NAME_NOT_RESOLVED

i've tried to edited files on my raspberrypi filesystem where docker is hosted (via putty)
i've tried to use the container's console to edit the /etc/hosts file, but it gets overwritten when i restart the container.

Using a RPi4 (4GB), Docker, Portainer, Pi-Hole for Docker.
Pi-Hole is only doing DNS, Fritzbox is doing DHCP.

Is there any way to help me?
I'll glady provide any needed information.

I am assuming your custom DNS entry samples are not just placeholders:
By including a dot (.) in your hostnames, you are trying to establish a local subdomain *.butlr.

However, as long as you are using your Fritzbox as DHCP server, you'll have to stick to the Fritzbox assigned default local domain name, i.e. *.fritz.box. As of FritzOS 7.13, I am not aware of any Fritzbox configuration options that allow to change the local subdomain name.

That leaves you with two options:

  1. Live with the FB local subdomain, i.e. cloud.fritz.box and smart.fritz.box
    As Fritzbox is already using that name, there is no need for extra configuration files - just edit the device names in your Fritzbox
  2. Use another machine as DHCP server, e.g. Pi-hole, and set your local subdomain accordingly
    Again, no need for additional configuration, apart from setting your names within your DHCP server.

As a side note: Whatever solution you pick, your cloud and smart device names will be accessible by that name within your local network only!

Thanks alot for that explaination. I just tried to rename the Devices i use to i.e. "docker", "dns" and "cloud" and i could access the webinterface with just docker/ cloud/ and dns/ in chrome. So i guess i got to a solution with your help! Thanks again.