Nextcloud coTURN Ubuntu Installation

Recherche

https://nextcloud-talk.readthedocs.io/en/latest/TURN/

https://meetrix.io/blog/webrtc/coturn/installation.html

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.

Installation

Example installation on the same server as Nextcloud:

  • apt install coturn
    • Ubuntu 18.04: Setting up coturn (4.5.0.7-1ubuntu2.18.04.3) ...
    • It is recommended to install the latest coTURN version; at the very minimum coTURN 4.5.0.8 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 4.5.0.8 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
    • TURNSERVER_ENABLED=1
  • vi /etc/turnserver.conf
    • listening-port=3478
      fingerprint
      lt-cred-mech
      use-auth-secret
      static-auth-secret=a-secret-password
      realm=domain.com
      total-quota=0
      bps-capacity=0
      stale-nonce=600
      no-loopback-peers
      no-multicast-peers
  • service coturn start
  • Nextcloud -> Settings -> Talk
    • yourserver.domain.com:3478
    • secret: a-secret-password
    • UDP and TCP (TCP only more reliable? -> test)
  • Internet Router: port forward TCP 3478