Using openVidu docker container from VW gives WSS error

I have mac os where I run openvidu docker container. In virtual machine I’m building app based on openvidu.
I configured the two OS (host & guest) to share the same network and I can use the container from the VM without a problem.

The only problem is that when I create a session and the WSS connection start there’s an error in the console. I think it’s because it uses VM’s ip instead of the right one.

Here’s a pic

I tried running the container with the following options:

docker run -p 4443:4443 --rm -e OPENVIDU_SECRET=MY_SECRET -e OPENVIDU_PUBLICURL=XX.XX.XX.XX openvidu/openvidu-server-kms:2.15.0

docker run -p 4443:4443 --rm -e OPENVIDU_SECRET=MY_SECRET -e OPENVIDU_PUBLICURL=https://XX.XX.XX.XX:4443/ openvidu/openvidu-server-kms:2.15.0

docker run -p 4443:4443 --rm -e openvidu.publicurl=https://XX.XX.XX.XX:4443/ -e openvidu.secret=MY_SECRET openvidu/openvidu-server-kms:2.15.0

XX.XX.XX.XX = the correct ip (its not localhost/127.0.0.1), In the client side js I use it to configure sessions and it works:

    $.ajax({
            type: "POST",
            url: https://XX.XX.XX.XX:4443 + "/api/sessions", ....................

Any help is appreciated. Thanks.

Hi,

Use DOMAIN_OR_PUBLIC_IP, which is the right property name: https://docs.openvidu.io/en/2.15.0/reference-docs/openvidu-config/

1 Like