David Kimura PRO said almost 4 years ago on Video Chat with WebRTC :
  Here's how I created the coturn server. Using an Ubuntu 18.04LTS virtual machine.

apt-get update && apt-get install -y coturn && apt-get clean

Edit the environment file to set some environment variables. Be sure to change as necessary.

# vi /etc/environment
TURN_PORT=3478
TURN_PORT_START=10000
TURN_PORT_END=20000
TURN_SECRET=yoursecretkey
TURN_SERVER_NAME=turn
TURN_REALM=YOURDOMAINNAME

Run source to set the variables

source /etc/environment

Edit the coturn file

sudo vi /etc/default/coturn

And change the value to 1

TURNSERVER_ENABLED=1

Generate an encrypted password. Be sure to use the same TURN_REALM name as set in the /etc/environment

turnadmin -k -u USERNAME -r YOURDOMAINNAME -p PASSWORD

Edit the turnserver configuration file

sudo vi /etc/turnserver.conf

Add the user into the configuration file. The encrypted password would be something like 0x0000000

user=USERNAME:PASSWORD

Restart coturn

sudo service coturn restart

Also, depending on where this is being hosted. You will need to open the UDP ports on your firewall based on the configuration set in /etc/environment. So, the password that you set will be encrypted on the server, but will need to be entered as plain text within the javascript stimulus controller.