Guide to install Nextcloud HPB: High Performance Backend (Nextcloud Signaling + CoTurn)

Here is a complete guide on how to install Nextcloud High Performance Backend (Nextcloud Signaling + CoTurn), in order to make videoconference with >3 users.

Prerequisite

  1. A working Yunohost Instance with admin access
  2. A working Nexctloud instance, installed on your yunohost server, with the nextcloud talk app installed
  3. an ssh access to your server

Steps

1 - Configure firewall

2 - install CoTurn

  • Install CoTurn package : YunoHost app store | Coturn
  • Use a specific subdomain like “coturn.yourdomain.tld”
  • You will get 3 infos:
    • STUN or TURN URI: turn:coturn.yourdomain.tld:5349
    • TURN username: turnserver
    • TURN password: e4tybLCiAeR4KdWiIpirpzEQH9

3 - Install Nextcloud Signaling

4 - Get the Nextcloud Signaling Secret

  • After Nextcloud Signaling, get the secrets:
    • Using the button (if it works)
    • if not:
      • open terminal, and connect to your server using ssh
      • type: sudo nano /etc/yunohost/apps/nextcloud-signaling/settings.yml
      • Copy: the pwd_your_nextcloud_instance_tld (something like : 1nqkspNKZWGzqYH4XWIk3J6lwC)

5 - Configure Nextcloud Talk

  • Go on the Nextcloud talk administration page,
  • in High performance infrastructure section, fill
    • URL: wss://youryunohost.tld/standalone-signaling
    • Check SSL certificate: yes
    • Shared secret: paste here the shared secret you copied at the step 4
  • in Turn Server section:
    • add a new turn serveur
    • Fill your turn serveur URL: coturn.yourdomain.tld:5349 (without the “turn:” at the beginning)
    • Secret: Your Turn Server password (something like e4tybLCiAeR4KdWiIpirpzEQH9)
  • in STUN server section:
    • add a new stun server (under the nextcloud default stun server)
    • Fill in your turn serveur URL: coturn.yourdomain.tld:5349

6 - Try if it’s working

  1. open nextcloud talk
  2. create a new conversation
  3. launch a video call with one device
  4. join the video call with another device (using another internet connexion if you host your server at home)

Important:

  • Don’t try to test your CoTurn Congiguration using ICE test → it will never work (error 401 and 701), it’s normal.
  • I you miss to add the turn server conf directly in nextcloud talk admin page: it won’t work

Notes:

If you want to use port 443 instead of 5349, it seems possible, but i don’t know how to do it. (see this post: [Nextcloud-signaling] Video conference with Nextcloud Talk - #6 by ljf )

I’ll be glad if someone here explain how to configure port 443 instead of 5349.

Troubleshoot

  • If you can’t create a conversation → you use the wrong secret key in /etc/yunohost/apps/nextcloud-signaling/settings.yml. Don’t use the “share secret” but the other secret related to your nextcloud instance.
4 Likes

Have you try this ? iptables -t nat -A PREROUTING -p UDP --dport 443 -j REDIRECT --to-ports 5349
I am not sure, now yunohost with debian 12 use nftables …

Do not do this. You will likely broke most of services of your system, since 443 is the port for https exchanges….

Here it means you are just intercepting UDP packets arriving on port 5349 used by coturn to redirect them on the port 443.

I am not sure this rule can affect others packages. The UDP packets coming on IP_server:5349 are only for the stream and if they can’t be routed on 443, they are still using port 5439 on TCP.

I have used it on VM (not yunohost) only dedicated to a nextcloud-spreed-signaling…