Local DNS!

What did you end up doing as I am at this point myself. Was running venv, decided it was time to switch to haos and 3 days in and i’m almost done with it due to DNS alone. Everything else is great but DNS is making it unusable.

Can you point me in the direction of how you made those changes and where the files are. It’s easy to get shell in hassio but it’s quite a bit different layout from my venv environment.

I gave up, @pvizeli doesn’t care about broken DNS according to his words in the github bug report. And others from the dev team, such as @balloob can’t be bothered to even chime in.
I’m just doing a ha dns restart in the shell, every day or so.

My issue with this is my add-ons go missing. Like right now the “Official Add-ons” show up by the others are all gone. Occasionally they are all gone. Only when I lay down new image do they all show up for a very brief period of time.

That really sounds like your HAOS isn’t getting any dns, not from local nor from external source ?

It does - i’ve gone through all the checks and can ping both internal and external but like some others external name resolution just stops randomly.

~ $ ha dns info
- dns://
servers: []
update_available: false
version: 2021.01.0
version_latest: 2021.01.0

Have you tried adding google dns or Cloudflare there?

Tried both - makes no difference. Sort of working now with the same settings as above. Just randomly dies. Seems like similar issue here with no resolution
Local DNS! - Home Assistant OS - Home Assistant Community (home-assistant.io)

Well according to dns info you posted above you don’t have either configured so if the local router dns goes screwey you have no dns…

I hear you. Like I said though, router is a business class firewall - not really concerned about DNS issues as they are used all over the world without issue. Also has HA venv version running just fine for 2+ years without issue.

The issue lies entirely within the HA docker implementation and probably more specifically it’s odd DNS implementation which IMO, shouldn’t even be there.

When I can drop to cli on a workstation and on HA and one can ping / resolve nslookups and the other can’t - both on the same network segment and same switch, it’s pretty obvious where the issue lies.

Just looking for someone who’s resolved the built in DNS issues.

1 Like

That person doesn’t exist.

When testing, where did you add the other (google/cloudflare) dns ?

In my case, I use the “SSH & Web Terminal” addon, start it with “Protection mode” DISABLED. Then I enter the dns addon with the command:

docker exec -ti hassio_dns bash

Then, you have a shell inside the dns docker, only need to edit this file /usr/share/tempio/corefile (I use vi to do that).

Look for this into the file:

    template ANY AAAA local.hass.io hassio {
        rcode NOERROR

and add your local domain (piminet in my case):

    template ANY AAAA local.hass.io hassio piminet {
        rcode NOERROR

then, type exit to return to the general shell, and restart the dns:

ha dns restart

Done. The only problem is that this needs to be done each time Home Assistant updates/rebuilds the dns docker. But at least it works.


This is where I’m stuck atm. Not seeing the option to disable protection mode. I have advacned mode turned on for the account (not sure that even matters for this). I this doc:

SSH & Web Terminal in Hass.io - danimart1991’s Blog (danielmartingonzalez.com)

And crap - just realized you are using the 3rd party version - installing that one now.

aren’t you guys talking about different shells ?
One being the shell to HAOS (for which you need to exchange keys) , the other being the ‘regular’ add-on provided shell to HA.
To execute docker commands you’d definitely need the first.
If you’re using the addon, you’ll never reach the OS (= HAOS).

If you go to the Add-ons tab there’s two different SSH add-ons listed. The one called “Terminal & SSH” in the “Official Add-ons” list is what jspanitz is showing a picture of above. That one is limited and cannot access the docker CLI.

If you scroll down to the “Community Add-ons” list (the one maintained by Frenck) there is another add-on named “SSH & Web Terminal”. Looks like this:

As you can see, this one has an option to turn off “Protection mode”. When you do that it enables full access to the docker CLI. So you can inspect, exec in, add containers, etc, whatever you want.

The community add-ons repository also includes Portainer which is just a straight up docker management GUI. So yea there are multiple ways to get at and manage docker directly in HAOS without dropping to the host shell.

1 Like

Tried in the gui and also on the cli

Has anyone found a solution to this problem yet?


Install the “AdGuard Home” addon, and point that to your PiHole.
Guess what, adding a layer of complexity to HAOS magically fixes @pvizely 's twisted idea of “properly functioning DNS”.

Ivory tower developing very much.

Very interesting thread.
i have been pulling my hair out trying to figure out why one of my integrations very frequently misfire quite badly when it comes to a devices standby status (polled over http).
Nothing is wrong with the device in question.
It was only when i got really frustrated about it (have you tried watching a movie when an automation misfires and turns off the tv+amp around 10 times in a row in less than 15 minutes?) and it was broken long enough for me to troubleshoot it.

logging on locally to my vm that runs home assistant (from the image provided) and then testing dns resolving i find out it cant even resolve my hostname something.somethingelse.lan served from my router (openwrt)
the hostname can be resolved just fine from every single other host i have on my network without any issues.

my dns server can resolve both ipv4 and ipv6 internal addresses just fine.

i’m beginning to thing dns + homeasistant is really bad and that i from now on must never use a single dns name.

is there a way to disable the dns magic and convince it to always use the correct dns instead of its own magic?