Turn and Stun server configuration

Hello,
How can I add mediasoup turn and stun server?
What should I configure on server and client side?

We write documentation for something. Please, don’t ask questions if you have not read the documentation of mediasoup and mediasoup-client.

I have already researched their first documents before asking questions.
but I could not find detailed information.

This configuration is only valid for client side, server side?

Ask yourself why you think that STUN and TURN settings are required in mediasoup server. Also take into account that this is not a generic WebRTC forum.

you can start by checking https://github.com/coturn/coturn and how to use it in webrtc.
to find more info you need to understand what that is for, is not really a mediasoup thing.

1 Like

Thank you, I found the answer to my question myself. It is enough to set the turn server on the client side.
Add ice servers before creating createSend Transport

 transportOptions.iceServers =[
                        {
                            'urls': 'stun.l.google.com:19302'
                        }
                     ];
MediaSoupDevice.createSendTransport(transportOptions);

1 Like

If your MediaSoup is on a public IP, you may not need STUN or TURN.

Per @ibc - “mediasoup server is Ice Lite, meaning that it does not require ICE candidates from clients but, instead, will wait for RTP in its open ports to know the client’s remote IP, port and transport protocol (UDP or TCP).”

Also See:

yes you are right, mediasoup does not need turn server when there is a public ip