Steps to setup RTC servers (signalling, STUN, TURN and Media servers)
Basic steps to setup coturn as TURN server:
- Install Dependencies
sudo apt-get install libssl-dev libevent-dev libhiredis-dev make -y
- Download TURN server package
wget http://turnserver.open-sys.org/downloads/v4.5.0.6/turnserver-4.5.0.6.tar.gz
- Install turn server
$ tar xvfz turnserver-2.6.5.2.tar.gz
$ cd turnserver-2.6.5.2
$ ./configure
$ make
$ sudo make install
$ ldconfig
- Create TURN user and password
sudo turnadmin -a -u happy -p happy
-
Open all relevent ports
-
Running TURN server:
sudo turnserver -L <listening-ip> -a -f
For AWS (or write params in config file):
sudo turnserver –syslog -a -L ‘amazon ec2 PRIVATE ip address’ -X ‘amazon ec2 PUBLIC ip address’ -E ‘amazon ec2 PRIVATE ip address’ -f –min-port=32355 –max-port=65535 –user=’my_username’:’my_password’ -r realm –log-file=stdout -v
- Copy default config and edit all changes.
cp /usr/local/etc/turnserver.conf.default /usr/local/etc/turnserver.conf
Uncomment
no-stun
in config file for turn only server.