Turn server configuration for Spreed WebRTC

To run WebRTC reliably a Turn server is required. Configuration can be very complicated, this post describes a basic working configuration using Coturn on Ubuntu Xenial (16.04).

Install Coturn on your server, it is best to install a separate server for this.

apt install coturn

Next add the following configuration to /etc/turnserver.conf

listening-port=443
alt-listening-port=3478
listening-ip=YOURIPHERE
relay-ip=YOURIPHERE
fingerprint
lt-cred-mech
use-auth-secret
static-auth-secret=YOURSECRETHERE
realm=spreedbox.local
total-quota=100
stale-nonce
cipher-list="ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AES:RSA+3DES:!ADH:!AECDH:!MD5"
no-loopback-peers
no-multicast-peers

On the Spreed server define the server in /etc/spreed/webrtc.conf

...
turnURIs = turn:turn.yourdomain.com:443?transport=udp turn:turn.yourdomain.com:443?transport=tcp
turnSecret = YOURSECRETHERE
..

That is it, restart Coturn and then Spreed and all should be working.