[Coturn] TURN and STUN server

Coturn server for YunoHost

Integration level
Install Coturn with YunoHost


TURN and STUN server for VoIP
STUN (Session Traversal Utilities for NAT) and TURN (Traversal Using Relays around NAT) are protocols that can be used to provide NAT traversal for VoIP and WebRTC. This package provides a VoIP media traffic NAT traversal server and gateway.

Shipped version:




If I understand correctly, this is a tool to be used by other services ?

There is already a Coturn srvice installed when Synapse is installed, is there a way to have this app as a dependency to other apps using a Coturn service ? (Instead of having al of them use their own installation)

1 Like

Yes it is.

I think it will be the case for all the new apps. I use this package already for Nextcloud, and I think the future Dendrite app will use it as well (Issues · YunoHost-Apps/dendrite_ynh · GitHub) for example.

1 Like


Is the coturn server configured by default for Nextcloud Talk? Or is it necessary to modify /etc/turnserver.conf?

Yes it is. After installing coturn_ynh, you receive a mail with the secret password contained in the turnserver.conf.

Hi, I have coturn already installed manually for nextcloud, but I would like to swith to your app to have a better and more stable configuration. Should I remove coturn before installing your app ?

Naively I will say that if you Coturn install works in you server I will stick to it… The coturn_ynh package is quite new and haven’t been tested thoroughly.

1 Like

Actually I’m not sure if it works. For now I’m not using talk because it often doesn’t manage to connect, or screen sharing get stucked, etc… But I don’t know what’s wrong.
I was expecting a good turn config, and soon the signaling server I hope, to make more tests. So I’ll test your package !

@ericg : could you please precise the configuration we must enter in talk ? If coturn is installed on turn.domain.tld, tell me if this is correct :
Serveurs STUN :

Serveurs turn :
turn.domain.tld:[wich port ?]
udp et tcp

And I didn’t receive the email, I found the secret in the installation log and in /etc/turnserver.conf.

1 Like

oh yes! this is an important package. I wish XMPP had video chat working out of the ‘box’. maybe this can help.

Hi, I used with success :

Serveur STUN :

Serveur TURN :
secret found in /etc/turnserver.conf
udp et tcp

Same, I didn’t receive any email.
Thanks @ericg for this nice package !

1 Like

@tomdereub @Limezy The mail is sent to the YunoHost admin email : root@domain.tld. If you use Roundcube or Rainloop mail app, it should work out of the box.

For me it is always sent to root@domain.tld (which default to the admin)

Yes you are right, my mistake, it is sent to root@domain.tld

Actually I’ve also received the mail a bit later, it’s ok.
I’ve entered the parameters like @Limezy, but the test in nextcloud parameters returns “Erreur : le serveur turn n’a pas retourné de candidats ICE fonctionnels”.
On trickle-ice page, I get this result, I don’t know what it means :

Edit : ajourd’hui le test automatique sur nextcloud a marché, donc ça devrait être bon…

Hi all. Is there any development on this or a roadmap? There is a PR https://github.com/YunoHost-Apps/coturn_ynh/pull/7 that I think is quite important to be implemented for the XMPP service to run perfectly.
I believe that XMPP is preferable comparing to Matrix-Synapse since it is using less resources. By being able to have voice and video in Metronome this makes a perfect alternative to Matrix.


Don’t think much is happening.

In this related github issue, hasn’t been any progress since Sept. 2020.

For those who would like to make it work with matrix-synapse behind a VPN / NAT : Tutorial : How to make matrix-synapse's coturn (audio & video calls) work behind a VPN


To install Coturn, can I use mydomain.ynh.fr (where my main YunoHost installation and apps “live”), or do I need something like turn.mydomain.ynh.fr?

As per the documentation:

You need to install TURN server in a root or subdomain like turn.domain.lts