jitsi / docker-jitsi-meet

Jitsi Meet on Docker
https://hub.docker.com/u/jitsi/
Apache License 2.0
3.09k stars 1.37k forks source link

How to change default stun/turn servers #1594

Closed amirhosseinds closed 1 year ago

amirhosseinds commented 1 year ago

Hi i am trying to change default stun/turn servers and i searched a lot and i got nothing . can any one help me how to do it?

damencho commented 1 year ago

You can control it through these variables.

https://github.com/jitsi/docker-jitsi-meet/blob/1cbb8f8cec9b29036cf6f24ebd087b8ea58958ee/prosody/rootfs/defaults/conf.d/jitsi-meet.cfg.lua#L25

amirhosseinds commented 1 year ago

yes i saw it but how can i set TURN_CREDENTIALS ? with this format: TURN_CREDENTIALS=username:password TURN_CREDENTIALS=sharedsecret which one can i use?

amirhosseinds commented 1 year ago

and this cannot be set in config.js file? i have set something like this in config file:

config.p2p = {
        enabled:true,
        useStunTurn:true,
        stunServers: [
                { urls: 'turn:myserver.com:3478', username: 'username', credential: 'password'}
        ],
        preferH264: true,
        iceTransportPolicy:'relay'
};
damencho commented 1 year ago

The config file is not good idea to keep credentials as it is public. That's why it is configure in prosody and uses a shared secret. And prosody produces short live credentials passing it to the client to use it.

damencho commented 1 year ago

This is what it looks like when configured in coturn https://github.com/jitsi/jitsi-meet/blob/0170c65c7b84979df5b74634134b4e93b0a35c4e/doc/debian/jitsi-meet-turn/turnserver.conf#L4C1-L5C1

amirhosseinds commented 1 year ago

thanks bro problem solved

andreas1107 commented 9 months ago

Hi, how exactly did you solve this issue? I wish to use an external TURN service for Jitsi docker to avoid having to reverse proxy. I have received a username and password to use - how do I set this?

I have tried in my .env file:

# TURN server
TURN_CREDENTIALS=sharedsecret
TURN_TRANSPORT=tcp
TURNS_HOST=turnservice.com
TURNS_PORT=443

My second question would be how I test the TURN service - what flag do I set in .env file to force traffic via the TURN service only? Sorry I have searched all over including here but didn't find the answer.

Thanks