Nextcloud coTURN Ubuntu Installation


Freezing Videos

please try if disabling TURN via UDP helps to fix the issue.
Simply remove turn:<host>:<port>?transport=udp from the turnURIs directive in the Spreed WebRTC config. Make sure turn:<host>:<port>?transport=tcp (for TCP) stays enabled. Restart the server afterwards.


Example installation on the same server as Nextcloud:

  • apt install coturn
    • Ubuntu 18.04: Setting up coturn ( ...
    • It is recommended to install the latest coTURN version; at the very minimum coTURN should be used. In previous versions there is a bug that causes the IPv6 UDP sockets created by coTURN not to be freed. Due to this the turn process ends not being able to open new ports and thus not being able to serve new connections. Moreover, when that happens, even if there are no connections a high CPU load will be caused by the turn process. Therefore, if you can not install coTURN or a later version you should restart the turn process periodically to work around that issue.
    • Found no easy way to install a higher version with Ubuntu 18.04
  • vi /etc/default/coturn
  • vi /etc/turnserver.conf
    • listening-port=3478 
      lt-cred-mech # Only on coTURN below v4.5.0.8!
      no-loopback-peers # Only on coTURN below v4.5.1.0!
  • apt policy coturn
    • Installed:
  • service coturn start
  • Nextcloud -> Settings -> Talk
    • secret: a-secret-password
    • UDP and TCP (TCP only more reliable? -> test)
  • Internet Router: port forward TCP 3478 to coturn server