How to troubleshout P2P connections?


We’ve got a self-hosting instance of Jitsi (dockerized version stable-6726-1, P2P is enabled in config.js) up and running in AWS and quite often when there are just two participants in a meeting P2P is not used.

Is there a way to find out why that happens, especially post factum?
What logs could be used?
Does it require a special config?

Any hints are welcome.

Each participant’s console logs could tell you. It’s likely they’d need a TURN server. Did you provision one?

I’m afraid we’ll not have devices console logs post factum, is there anything in Jitsi’s logs?
We have the following defined inside p2p section of config.js, isn’t it enough?

        enabled: true,
        // The STUN servers that will be used in the peer to peer connections
        stunServers: [
            { urls: '' }

No, that is a STUN server. IF both devices are behind symmetric NATs you usually need TURN.

Thanks Saghul, seems like this part is missing in our config and I don’t see any urls of turn servers in

Do I have to add something like this to stunServers section?

{ urls: '' }

Our TURN servers are not for everyone to use :slight_smile: You can configure a TURN server on your Docker setup with the appropriate env variables. Check env.example.

I’ve put your server address just to illustrate my assumption and to ask if the syntax is correct. We’re not going to use it in our config .

As for env.example, the only place I see turn is mentioned is below. :thinking: Do I miss something?

# STUN servers used to discover the server's public IP

Those are STUN servers.

Thank you guys. Seems like we have an outdated env.example. I guess I should install TURN by following this guide before setting those new env variables:

Please let me know if there’s a more recent and/or docker-specific version of the guide.