TURN server (coturn) configuration for private server

Hi everyone.

I’ve been trying to configure a coturn server in order to be able to perform calls from outside the NAT, but I think I might had not well-configured something. I tried to follow the documentation, but still not sure what’s the issue.

I have a nextcloud instance running on a raspberry Pi4, and everything is working as expected, except for the calls.

The raspberry Pi it’s behind a router without a static IP, but I have DDNS domain at duckdns.org to be able to access it from outside the network.

I have also a Wireguard server running, and all external connections are going through the VPN.

Because of this, I don’t need a public resolvable domain name, and I’m using xanacloud.com (pointing to 192.168.1.2) to connect to the nextcloud instance, and also vpn.xanacloud.com (pointing to 10.0.0.1) when I want to connect from outside the network.

If anyone knows how to configure the TURN server to meet my current environment, any help or guidance would be really appreciated.

Nextcloud version: 24.0.5
Talk Server version: 14.0.5
Custom Signaling server configured: no
Custom TURN server configured: yes(?)
Custom STUN server configured: `no, using default stun.nextcloud.com:443

coturn server configuration:

listening-port=3478
external-ip=[my_subdomain].duckdns.org
fingerprint
use-auth-secret
static-auth-secret=[my_secret]
realm=[tried several: xanacloud.com, vpn.xanacloud.com my_subdomain.duckdns.org]
total-quota=0
bps-capacity=0
syslog
no-multicast-peers
stale-nonce=0

The ports are forwarded at the router, and also allowed by the raspberry firewall. The domain names vpn.xanacloud.com and xanacloud.com are only accessible when using the vpn, or when you are inside the network.

Thanks in advance!

Something strange that I have just noticed, the calls do work outside the network, but only between iOS and android devices. It’s not working when using android-android or android-pc web browser

You can use your coturn server instead of their server

1 Like

Imho this config is little bit to complicated. As i understand your external devices connect with vpn/wireguard. In this case these devices do not need coturn because they are inside your LAN. You can use stun.nextcloud.com:443 but this do not enbale TURN features.

The only issue is that I was setting up the external IP (which is not needed in my case), after this change, everything works as expected.

And about the need of coturn, I guess it is needed, cause before configuring it calls weren’t working, and after configuring it everything works well :slight_smile:

Could be but in my similar configuration i do not need coturn in all circumstandes, except access from my proxy / firewall restricted devices at work.

Well, not really sure what changed, but now the coturn server is not responding anymore and the calls are not working xDDD