ERR_CERT_INVALID when using lib-jitsi-meet with docker-jitsi-meet

Hi,
using the lib-jitsi-meet example here (https://github.com/jitsi/lib-jitsi-meet/tree/master/doc/example) I’m not able to connect to a custom jitsi videobridge deployed on my VM.

The steps I followed:

  1. I deployed jitsi videobridge on my VM with docker (docker-jitsi-meet) and then connect to it using jitsi-meet using export WEBPACK_DEV_SERVER_PROXY_TARGET=10.20.30.40. Everything is fine.

  2. Then I tried lib-jitsi-meet example using this configuration in https://github.com/jitsi/lib-jitsi-meet/blob/master/doc/example/example.js:

const options = {
    hosts: {
        domain: "beta.meet.jit.si",
        muc: "conference.beta.meet.jit.si",
    },
    bosh: "https://beta.meet.jit.si/http-bind",
    clientNode: "http://jitsi.org/jitsimeet",
};

Again, everything works fine.

  1. Now I try to put everything together. Wanting to connect to my custom jitsi videobridge I use this configuration:
const options = {
    hosts: {
        domain: "10.20.30.40",
        muc: "conference.10.20.30.40",
    },
    bosh: "https://10.20.30.40:8443/http-bind",
    clientNode: "http://jitsi.org/jitsimeet",
};

In the bosh URL I have port 8443 since I use the default config of docker-jitsi-meet.
In fact, in the .env in docker-jitsi-meet I only change these lines:

PUBLIC_URL="https://10.20.30.40"
DOCKER_HOST_ADDRESS=10.20.30.40

But I get:
strophe.umd.js:5123 POST https://10.20.30.40:8443/http-bind net::ERR_CERT_INVALID.
Certificates are not generated by me, how can I fix this problem?

I tried to describe the steps in a detailed manner, any help would be appreciated.
Thanks