Coturn is an open-source project that provides a TURN and STUN server implementation. Both TURN and STUN are protocols that help in NAT traversal for WebRTC applications.
Coturn setup can be achieve in different mode, we assume that we are installing on same server than Backend, but it's strongly recommanded to install on different server.
apt install coturn
Now adjust the file /etc/turnserver.conf like this.
# Enable only if your server is behind a NAT.
external-ip=<you machine ip>
# Adjust only if you want to use another port.
# Ensure to enable fingerprint and long term credential.
# Adjust the port range that turn is allowed to use. The port range must be opened from the
# firewall as UDP and TCP.
# Choose a realm, can be formatted like iabsis.com
# Configure a user and a password, this is required to be
# allowed to use the turn relay capabilities. <user>:<password>
If you don't want to put clear password in configuration file, you can encode the password with the following command.
turnadmin -k -u <user> -r <realm> -p <pass>
This command returns an encoded password starting by 0xabc..., replace mypass by the returned value, ensure to keep 0x in front of the password.
Keep in mind this user and password configured here as it will be used later by Mediasoup server.
There are no comments for now.