Change HAOS docker MTU (1500 > 1450)

Hi everyone,

I hope, this is the right category for my question. I freshly installed HAOS on a cloud server (please no discussion about if this makes sense or not ^^) and now get an update notification from HAOS 10.2 to 10.3. However, if I cluck on “install” it works for a while, but nothing happens.

When I try “ha os update” on the CLI, I get “processing” for a while and then the following error:

Error: Can't fetch OTA update from Connection timeout to host

My network connection looks ok-ish, ping and nslookup work like a charm.
WGET for this file on github works, too.

But “ha network info” shows this:

  interface: hassio
host_internet: true
- connected: true
  enabled: true
  interface: enp0s10
    method: static
    ready: true
supervisor_internet: false

The problem seems to be that docker is using an MTU of 1500 per default, whileas my cloud server requires 1450 or less.

2: enp0s10: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc fq_codel state UP qlen 1000
    link/ether 86:00:00:4c:9b:a7 brd ff:ff:ff:ff:ff:ff
3: docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
    link/ether 02:42:07:a1:62:70 brd ff:ff:ff:ff:ff:ff

Therefore it is possible to ping the update address from within the supervisor container, while it is not possible to wget the update file:

bash-5.1# ping
PING ( 56 data bytes
64 bytes from seq=0 ttl=54 time=7.974 ms
64 bytes from seq=1 ttl=54 time=4.865 ms
64 bytes from seq=2 ttl=54 time=4.629 ms
64 bytes from seq=3 ttl=54 time=4.735 ms
64 bytes from seq=4 ttl=54 time=4.662 ms
--- ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 4.629/5.373/7.974 ms

bash-5.1# wget
Connecting to (
Connecting to (

pfSense Packet Capture:
17:41:16.825692 IP > tcp 0
17:41:16.829946 IP > tcp 0
17:41:16.831193 IP > tcp 0
17:41:16.859241 IP > tcp 331
17:41:16.863313 IP > tcp 0
17:41:16.865745 IP > tcp 1420
17:41:16.865768 IP > tcp 1420
17:41:16.865774 IP > tcp 972
17:41:16.866412 IP > ICMP unreachable - need to frag (mtu 1450), length 556
17:41:16.866440 IP > ICMP unreachable - need to frag (mtu 1450), length 556
17:41:16.866658 IP > tcp 0
17:41:16.885585 IP > tcp 1420
17:41:16.885809 IP > ICMP unreachable - need to frag (mtu 1450), length 556
17:41:17.125617 IP > tcp 1420
17:41:17.125911 IP > ICMP unreachable - need to frag (mtu 1450), length 556
17:41:17.597619 IP > tcp 1420
17:41:17.597954 IP > ICMP unreachable - need to frag (mtu 1450), length 556
17:41:18.557753 IP > tcp 1420
17:41:18.558029 IP > ICMP unreachable - need to frag (mtu 1450), length 556
17:41:20.445729 IP > tcp 1420

From within the homeassistant container (running on the host network), both ping and wget are successful.

Any idea, how I can change the HAOS docker´s MTU from 1500 to 1450 and persist that setting? I tried and search pattern on Google I could think of, but wasn´t successful. Creating /etc/docker/daemon.json wasn´t successful, as the file doesn´t persist after a restart.

Thank you in advance,

1 Like

Ummm… if you can get access to your HAOS shell (virtual console or ssh root@ADDRESS -p22222), then maybe try
ip link set mtu 1450 docker0
just to see if that (temporarily) solves the problem.
I’m also not sure, but you may have to bounce the link to get the new MTU setting to take

ip link set down docker0
ip link set up docker0

[EDIT] I probably need to do more research on linux kernel bridge (which is what docker0 is) as it has the various docker containers attaching to it, and changing the MTU of docker0 may affect the containers too;

1 Like

Thx a lot. That wasn´t the solution (because it doesn´t affect the MTU setting within the supervisor container), but it pushed me in the right direction. :grinning:

docker exec -it hassio_supervisor bash
ip link set mtu 1400 eth0

That does the trick. Afterwards wget and “ha os update” work like a charm.
Now I only need a possibility to persist that setting. Maybe I need to add an issue to HAOS github?

I’m thinking that anything (HA-Core, AddOns, Supervisor) that wants to send out on enp0s10 is going to have this issue, so if you do post something, whether its a problem or Feature Request, you may want to the MTU size configurable across all interfaces.

1 Like