Coturn is a free open source implementation of TURN and STUN Servers.
The TURN Server is a VoIP media traffic NAT traversal server and gateway. It can be used as a general-purpose network traffic TURN server and gateway, too.
The supported project target platforms are:
- Linux
- Mac OS X
- Windows (Cygwin): compiled binaries are available for registered users.
Windows Configuration
First you must download compiled binaries from your account, there are 2 available versions: win32 and win64. Select the desired platform and uncompress binaries in a folder. The following files will be created:
1. Some cygwin libraries required to run application, you must deploy these libraries with coturn server.
2. Some console applications:
2.1 turnserver.exe: is the main console application to run a TURN/STUN server
2.2 Other applications: are used to configure or testing purposes.
3. Turnserver.conf: is the configuration file for coturn server.
turnserver.conf
This is the configuration file for coturn server, if you open you will se a default configuration.
Simple Configuration
Your server has the following public IP 80.15.44.123 and listens on port 80. The credentials for connecting are: username = demo, password = secret
Set the following configuration:
listening-ip=80.15.44.123
listening-port=80
realm=yourrealm.com
user=demo:secret
Configuration with TLS enabled
Server has the following public IP 80.15.44.123 and listens on port 80 and 443 (TLS connections). The credentials for connecting are: username = demo, password = secret. Your certificate name (must be in PEM format) is certificate.crt and private key is private.key.
Set the following configuration:
listening-ip=80.15.44.123
listening-port=80
realm=yourrealm.com
tls-listening-port=443
cert=certificate.crt
pkey=private.key
user=demo:secret
There are more configurations available, just open turnserver.conf and read the documented sections.
Run coturn
Once configured, you can run server just executing turnserver.exe, a new console application will be opened and a log file will be created. You can increase the verbose of console application (get more detailed messages) if you enable "verbose" in turnserver.conf file.