Setting up STUN and TURN servers
HOME © Muaz Khan . @WebRTCWeb . Github . Latest issues . What's New?
This document is aimed to explain TURN server installation steps for different operating systems.
CoTURN installation on Ubuntu
restund installation on Ubuntu
TURN installation on CentOS
TURN installation on Windows
reTurnServer installation on Ubuntu
Pion TURN server
You can test a TURN here LIVE or use "apt-get install stun" and then "stun domain.com:port".
Top
CoTURN installation on Ubuntu
Make sure that you're using latest up-to-dated Ubuntu (TLS 14+)
Top
restund installation on Ubuntu (via)
"make" and "gcc" are required. Example LIVE server
Now open this: http://your-ip.com:4050/
Top
TURN installation on CentOS
Use "sudo" if you see "permission-denied" errors.
- Third Step: Download & Install TURN modules
- Fifth Step: Configure "turnserver.conf" file
You can:
Use Only STUN
Use Only TURN
Use Both STUN and TURN
Discard requests from all SSL/TLS version of protocols
Use short-live credentials. Other authentication mechanisms coming soon in next few weeks.
You can disable DTLS and TLS.
You can set both static and dynamic accounts.
You can give anonymous access to TURN server as well.
You can set credentials for stun-only option as well; usually STUN-binding requests are anonymous.
Top
TURN installation on Windows
Alternatives: STUNTMAN or C# STUN Client or Pion TURN-server for Windows.
Please check PION link above for a Windows TURN client.
Note: Below section is taken from slideshare; and its credit goes to @amiteshawa!
Install "Cygwin" application
Follow all steps from above section. E.g. install all dependencies; LibEvent and TURN modules.
You'll face some issues when invoking "./configure" command for TURN configuration:
Missing libpq.a, hiredis, postgreSql
You can ignore them, because these modules are optional
During "make" command invocation; you'll face error like "error: 'struct sockaddr_in' has no member named 'sin_len'"
Edit "na_turn_ioaddr.c" and comment line number "169":
Now, "make" and "make install" commands for TURN modules installation will work.
Then copy "turnserver.conf" file from "../examples/etc/" directory to "/usr/local/etc/":
Now, you can follow "fifth" step from previous section to edit "turnserver.conf" for setting "username", "password", "listening-port" and "listening-ip".
Top
reTurnServer installation on Ubuntu
You can check ports and addresses reTurnServer is listenning on:
In your HTML-JavaScript file, you will use original password, NOT the HashString:
Top
Pion TURN server
A simple extendable Golang TURN server for Windows, Linux, Darwin and FreeBSD.
Create a new directory (optional):
Download the TURN server's source: (replace "1.0.3" with latest release)
Give read-write permissions to the DIR:
Set username, password and port: (using EXPORT commands)
Now run the pions turn server:
To check latest releases: https://github.com/pions/turn/releases
Last updated