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 the default stun server? #675

Closed godpit closed 1 month ago

godpit commented 4 years ago

the ENV:

JVB_STUN_SERVERS = stun:stun.l.google.com:19302,stun:stun1.l.google.com:19302,stun:stun2.l.google.com:19302

The P2P STUN Server is still stun:meet-jit-si-turnrelay.jitsi.net:443.

how can i solve it ? thanks a lot!

saghul commented 4 years ago

You need to edit config.js inside the web container.

RedJohn14 commented 4 years ago

Change lost after Docker Container restart.

alexander-potemkin commented 1 month ago

@saghul , is still so? It seems like documentation says that env variable shall work, might worth to change the docs or the code?

saghul commented 1 month ago

There is a dedicated env var for the P2P STUN servers indeed.

alexander-potemkin commented 1 month ago

Thanks! If it's JVB_STUN_SERVERS - it seems like ignored - I keep seeing meet-jit-si-turnrelay.jitsi.net:443 in web browser console. Or am I missing something?

saghul commented 1 month ago

That's for the JVB. For p2p there isn't one, but a PR would be welcome!

alexander-potemkin commented 1 month ago

Thank you. I disabled P2P, as it doesn't suit my goals, guess that means I can ignore the STUN message I see in the console.

One more question, though, if you don't mind: I can see *.json files being rewritten - how am I supposed to change it directly (that's what I've seen sometimes in the tickets)? Or they are only rewritten partially, where env variables exists?

saghul commented 1 month ago

What file specifically?

alexander-potemkin commented 1 month ago

I was working with jvb.conf

saghul commented 1 month ago

The entire file is templated at boot.

alexander-potemkin commented 1 month ago

Ok. Then, if I happen to need to override some of it's content, I need to submit a PR to do so, I guess?

saghul commented 1 month ago

Yep that would be the way.

aaronkvanmeerten commented 1 month ago

Alternately, after some discussion, we landed a PR that may have a different path: https://github.com/jitsi/docker-jitsi-meet/pull/1960

You should be able to provide a custom-jvb.conf in /config and have it included and used it present.

We do still encourage any missing config you find for jvb.conf be at least considered for a PR here, since we have tried to instrument all the options we can and want to know about any you find missing.

alexander-potemkin commented 1 month ago

That was fast, thank you!

I would rather have all of the options in environment variables as well... is there probably any way to handle generic environment variables? Probably some custom json injection / override?

aaronkvanmeerten commented 1 month ago

It's a template using a gotemplate-like syntax:

The file you want is to review is probably:

https://github.com/jitsi/docker-jitsi-meet/blob/master/jvb/rootfs/defaults/jvb.conf

Then the tpl command is run on every container startup:

tpl /defaults/jvb.conf > /config/jvb.conf

For tpl syntax you can see the project here:

https://github.com/jitsi/tpl

You can also see plenty of examples in the defaults/ directories in this repo.