IPv6 support in balena

Hey guys,
i’m trying to work with a service that requires IPv6 but fails when trying to allocate such address.
from what i understand IPv6 isn’t enabled on default and cant figure out how to enable it.
normally one would change the daemon.json file at the docker host and things would be great, but here i got nothing related to docker when connecting to the HOST OS shell.
what is the right way? thank you !

Hi, allow me to preface this by saying that I am not very experienced in this area, however I have found some resources that may be helpful for you.

  • The following doc specifies how to disable and re-enable ipv6: Network Setup on balenaOS - Balena Documentation . Specifically it says you should be able to edit a connection with nmcli and run set ipv6.method enable to enable ipv6
  • I see a similar forum thread here: Enable IPv6 in container . According to it, you should be able to create a daemon.json inside /etc/docker/ with ipv6 enabled and then run systemctl restart balena.

Please let us know if either of these solutions work for you.

thanks for ur reply.
already mentioned why the second solution didn’t work.
as for the first, it seems it is a method designed to disable more than to enable.

as for the first, it seems it is a method designed to disable more than to enable.

I agree it appears that way, just figured it didn’t hurt to try enabling as well as specified at the bottom of that doc section :sweat_smile:

already mentioned why the second solution didn’t work.

Could you please clarify with regards to the second solution not working: I interpreted your message as meaning that there is no daemon.json, apologies if that was a misinterpretation. Do you mean there is no /etc/docker/ then?

yeah exactly the HOST OS inside balena doesnt have a service named docker…and /etc/docker had to be created…
so i figured if its not HOST OS what runs the daemon?

Hi, balenaOS uses balenaEngine, a container engine based on Moby, which is the same codebase docker uses. The engine process is balenad, and you have a balena client equivalent to the docker client in the hostOS.

As my colleague suggests, creating the /etc/docker/daemon.json file as described should allow your container to use IPv6. There are some caveats:

  • Modifying the hostOS is not actually supported. You will be able to do it on individual devices, but in order for new OS releases to include this change we would need to add a new feature to the OS
  • Currently the container networking in balenaOS does not support IPv6. Things like container networking and name resolution have not been tested for IPv6.
  • It’s the first time IPv6 support in containers have been requested

Anyway, if you make this work and it solves your use case please let us know so we can consider adding it as a proper OS feature.