Running OpenThread Border Router in Docker?

What are the limitations for running OpenThread Border Router in Docker?

I have not been able to successfully use it to build a Thread network and join Matter devices to it. I would like to be able to setup and run it in a Docker container and use it as if I installed the OTBR software on bare metal.

If I run on bare metal, I can use this command running on another computer to see the service:

avahi-browse -r -t _meshcop._udp

If I run OTBR in Docker and run the above command, I cannot see any services.

It looks like to network traffic from the Docker container isn't properly integrated with the LAN network.

Have anyone successfully done this?



Parents Reply Children
  • Hi,

    The docker OTBR does not work like this out-of-the-box, as it is meant to be used for local/simple setup and we recommend using OTBR. However, it is possible to configure the docker OTBR to run on a host network, which will make it work similarly to if you run the OTBR on bare metal.

    To do so, you must do the following:

    1. Define which interface is used as connection to the WAN/LAN (e.g. eth0, wlan0)
    2. Set RA/ROI for that interface
      sudo sysctl net.ipv6.conf.$BACKBONE_INF.accept_ra_rt_info_max_plen=128
      sudo sysctl net.ipv6.conf.$BACKBONE_INF.accept_ra=2
    3. Run docker container using following command (provide the configured interface as $BACKBONE_INF)
      docker run --rm --privileged --network host --name otbr --volume /dev/ttyACM0:/dev/ttyACM0 nrfconnect/otbr:9185bda --radio-url spinel+hdlc+uart:///dev/ttyACM0?uart-baudrate=115200 -B $BACKBONE_INF
    4. Form topology

    Please note that the OTBR might not clean all the configurations after removing the docker, so some leftovers might still be on the host. This is why we only recommend using OTBR in docker for local and simple setup.

    Best regards,
    Marte

Related