Turn server for Synapse

Hello,

I installed Synapse and Riot and since I had a problem for video-calls, I investigated the issue and found that it is necessary to install a Turn server to run video-calls through NATs.

Then I realized that it was installed and configured during the installation of Synapse. However the configuration does not work for me.

I have several questions:

  1. What is the difference between “/etc/turnserver.conf” and “/etc/matrix-synapse/coturn.conf”? Which file should I take into account? This webpage indicates that I should use the first file, however in my server, the second file is already customized.

  2. Hence this second question. In the file “/etc/matrix-synapse/coturn.conf” the domain name for the Turn server is the same as for Synapse ; is it normal?

  3. I also found out that the port 5349 is used by the Turn server, maybe it would be convenient to add a request for opening this port during installation?

  4. I used “turnserver -v” in order to try to detect an issue, but even during a call, nothing new appears. Is that an issue in itself? Regardless, this shows that Turn is listening on ports 3478 and 3479 which is in contradiction with coturn.conf but is agreement with turnserver.conf…

I am bit lost with this Turn server configuration. Has someone been having the same issues?

Thank you.

1 Like

Hello,

Firstly : cuturn = turnserver (just to fix the confusion) :slight_smile:

What is the difference between “/etc/turnserver.conf” and “/etc/matrix-synapse/coturn.conf”? Which file should I take into account? This webpage indicates that I should use the first file, however in my server, the second file is already customized.

“/etc/turnserver.conf” is the default location of the turnserver, but while adapted synapse for multiple instance, we need some multiple instance of turnserver, so the turnserver config moved to “/etc/matrix-synapse/coturn.conf”

Hence this second question. In the file “/etc/matrix-synapse/coturn.conf” the domain name for the Turn server is the same as for Synapse ; is it normal?

Yes

I also found out that the port 5349 is used by the Turn server, maybe it would be convenient to add a request for opening this port during installation?

Normally it should be opened see https://github.com/YunoHost-Apps/synapse_ynh/blob/master/scripts/install#L83-L84

I used “turnserver -v” in order to try to detect an issue, but even during a call, nothing new appears. Is that an issue in itself? Regardless, this shows that Turn is listening on ports 3478 and 3479 which is in contradiction with coturn.conf but is agreement with turnserver.conf…

The port 3478 and 3479 is not encrypted it’s the reason because it is not configured.

I know that sometime there are some issue about video-calls but I did found the reason of that. It could be interesting to know if it’s a specific problem about this package or about the synapse project.

Thanks for your answers.

I also found out that the port 5349 is used by the Turn server, maybe it would be convenient to add a request for opening this port during installation?

Regarding this question, I meant to indicate the administrator to open the convenient port on his ISP box, because I wasn’t aware before investigating the issue.

I will try to ask for this issue in the matrix room and come back here if I fix it!

Hello,

Ok, really happy to know if you find any issue about the configuration on the app side.

Hi,
Just one more question, how does the Turn server know that he has to take into account the “/etc/matrix-synapse/coturn.conf” file rather than the “/etc/turnserver.conf” file?

Hello,

In the service file here : https://github.com/YunoHost-Apps/synapse_ynh/blob/master/conf/coturn-synapse.service#L14

Thanks a lot!

I finally manage to get video-chat working by disconnecting my vpn.
It seems that Turn server is not able to connect users through vpn.
I guess it might be obvious for tech people :wink:

Hello,

Happy to know, that you find the issue.
Small question : was you vpn in relation with you yunohost server or completely independent ?

Hello,

It’s an independent VPN provider

Using OpenVPN? What kind of configurations are you using to?
I am using PFSense + OpenVPN and text + images + files by 443 (https) are working, but the audiocall not working the transport media…
Can u help me?

Hello,
Yes I use openvpn but as I said, I solved my problem by disconnecting the vpn during the video-chat session.
I didn’t try any configuration tricks to use video-chat through vpn.