Tutorial Topic: How to Setup a Turn Server for Nextcloud Talk
This tutorial is meant to be a "learning in process". It was created by a guy who is constantly playing with various technologies.
The turn server will be installed on a fresh installation of Debian with domain www.example.com hosted on an Ngix webserver on Linode.
Here are the steps:
- Register the domain name www.example.com.
- Setup a new linode and point www.example.com to this linode.
- Install and Setup Nginx server block for domain www.example.com.
- Install and setup UFW and open ports SSH, Nginx Full and Turnserver (Turnsever ports will be opened after installation of Turnserver)
- Install and Setup certbot and obtain SSH certificate for turnserver.example.com.
- Install Coturn (open source Turn Server)
- Configure Coturn
- Setup Nextcloud Talk for the new Turn Server.
Steps 1 to 5 will be covered elsewhere. We will only cover steps 6-7 here.
Step # 6: Install Coturn package
$ sudo apt-get install coturn
Step # 7: Edit the coturn file to enable Turnserver
$ sudo nano /etc/default/coturn
Step # 7b: Edit the turnserver.conf file. The conf file is well documentated with examples.
Change the following:
- uncomment listening-port=3478
This allows turnserver to listen to UDP port 3478. You can also use another port you may want.
- uncomment tls-listening-port=5349
This allows turnserver to listen to TLS port 5349. You can also use another port you may want.
- uncomment and add your ip address (this is an example) listening-ip=184.108.40.206
- uncomment and add your ip address (this is an example) relay-ip=220.127.116.11
- uncomment fingerprint
- uncomment lt-cred-mech**NEED TO RESEARCH THIS**
- uncomment use-auth-secret
- uncomment and add a password static-auth-secret=fakepassword
- uncomment and add your turnserver realm=turnserver.example.com
- uncomment and set your total quota. Since I will be using this for personal use, I will make it 100. total-quota=100
- uncomment and set your stale-nonce. I will make it for 600 seconds. stale-nonce=600
- uncomment and set the log file. log-file=/var/tmp/turn.log
- uncomment no-multicast-peers