How to change DNS setting in Hassio

Hi,

When I installed my Home Assistant (Hassio on RPi 3+), I configured a static IP address and DNS server.

I need to change the DNS setting now and I’ve hunted around and not found out how this can be done.

Can anyone point me into the right direction?

Thanks
Anthony

1 Like

Although not sure, but did you read this guide?

and specifically chapter 3. Set a Static IP with nmcli (optional)

Hope this helps!

1 Like

At the home assistant cli:

ha dns options --servers dns://IP_ADDRESS
ha dns restart
7 Likes

Thank you both for the super fast replies.
Much appreciated :slight_smile:

Hi, I need some help from you. My hassio seems to have issue with DNS and I can’t install any addon at all. When i check the DNS info with ha dns info, there is 8.8.8.8 and 8.8.4.4 defined under the local sections.

Can you please share your DNS info with me here so that i can confirm if mine are setting correctly?
Thanks

I am having the same issue. I don’t really understand how to set the DNS and it refuses to connect via browser if I set it to 8.8.8.8 and 8.8.4.4

2 Likes

Note this should be done form Settings > System > Network now.

4 Likes

Thank you Tom! This 100% worked for me after setting a static and inputting 1.1.1.1 (Setting>System>Network). I’ve been having the worst time with this new install (coming from an old install of HASSIO) and had DNS issues from jump. This particular issue where HOS wasn’t connecting to the internet had me searching for a while. Thank you again for sharing.

1 Like

I will just say THANK YOU

I got problem with updating my supervisor, I got a 500 error.

I have been searching for hours. Then, in resolution info, I find dns fail. Followed this info and now I can update again.

Which IP address do you mean. From my H.A or from my internet access? Thank you

I can go into system settings network ip4 dns - assign something but when the host does a reboot the setting is gone.

Any suggestions?

Hi,
I’ve tried everything. via the cli, via the WebGUI, etc…
I use a Proxmox and a script from the net to do a core installation.
As soon as I switch from DHCP to a fixed IP, the time synchronization (kernel time and network time) hangs.
Do you have any other ideas how I can fix this?
HA is a fresh install and a backup is not included yet!
Thanks in advance for your help !

The settings for DNS in the WebUI do not flow into the settings returned by:
ha dns info
I had to disable fallback to stop HA from using Cloudflare-dns.com DoH.
As far as I can tell, HA only uses the network card DNS setting as a bootstrap DNS address to resolve that Cloudflare DoH address. All the other parts of HA are using the Docker DNS on 172.30.32.3 which runs CoreDNS.

My issue is that HA CLI does not accept:

ha dns options —servers tls://192.168.50.1

According to the CoreDNS documentation the valid server addresses are:
dns:// for plain DNS
tls:// for dns over TLS (DoT) RFC 7858
https:// for dns over HTTP (DoH) RFC 8484
grpc:// for DNS over gRPC

Clearly the CoreDNS version supports DoH as it uses Cloudflare DoH as a hard coded fallback.
The CLI won’t accept these other values as it is looking for dns:// as a prefix to the IP value.

Perhaps it will work with the port for SSL/TLS:

ha dns options —servers tls://192.168.50.1:853

Good idea! Unfortunately….

# ha dns info
fallback: false
host: 172.30.32.3
llmnr: true
locals:
- dns://192.168.50.1
mdns: true
servers:
- dns://192.168.50.1
update_available: false
version: 2022.04.1
version_latest: 2022.04.1

# ha dns options --servers tls://192.168.50.1:853
Error: Doesn't start with dns:// @ data['servers'][0]. Got 'tls://192.168.50.1:853'

Again ty for this, I got stuck not being able to finish re-installing HASSIO because my SD card died. I could not restore from backup because I was using AdGuard addon for my DNS and my Pi was also my Unifi cloudkey. It was all hosted on that SD Card. So my DNS was my HASSIO IP and I could not login anywhere to change it, on my router or Pi. Note: To finish the installation before I could change the DNS I had to connect my Pi to a different network with a different DHCP, then I could reconnect it to the desired network, login from PC, and change the DNS to 1.1.1.1