Skip to content

Instantly share code, notes, and snippets.

@LongClipeus
Last active November 7, 2020 22:39
Show Gist options
  • Save LongClipeus/66a9b932c9c84227a2d9016bd4988bc2 to your computer and use it in GitHub Desktop.
Save LongClipeus/66a9b932c9c84227a2d9016bd4988bc2 to your computer and use it in GitHub Desktop.

Note

  1. You will need Java 8 to run Signaling Server. If you have multiple Java versions installed on the server you can change the default version using the update-alternatives tool as shown below:
sudo update-alternatives --config java 

Set the Default Java Version

  1. You can get any version of OpenVidu Server with the command below. To ensure compatibility comply with version numbers listed in releases page
wget https://github.com/OpenVidu/openvidu/releases/download/v{VERSION}/openvidu-server-{VERSION}.jar
  1. If you want to enable recording module of OpenVidu Server to record your sessions, you must install Docker CE and add some more system properties to the java -jar command. Check out Recording section to learn more

Install signaling server

1. Install KMS

Ubuntu Xenial 16.04
sudo echo "deb [arch=amd64] http://ubuntu.openvidu.io/6.11.0 xenial kms6" | sudo tee /etc/apt/sources.list.d/kurento.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5AFA7A83
sudo apt-get update
sudo apt-get -y install kurento-media-server
Ubuntu Bionic 18.04
sudo echo "deb [arch=amd64] http://ubuntu.openvidu.io/6.11.0 bionic kms6" | sudo tee /etc/apt/sources.list.d/kurento.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5AFA7A83
sudo apt-get update
sudo apt-get -y install kurento-media-server

After installing KMS, it is necessary to change the default user running it to the current one with this line:

sudo sed -i "s/DAEMON_USER=\"kurento\"/DAEMON_USER=\"${USER}\"/g" /etc/default/kurento-media-server

2. Install COTURN

sudo apt-get -y install coturn

This is a great implementation of a STUN/TURN server, necessary for connecting your users under some complicated circumstances. You can check its documentation here.

3. Install Redis

sudo apt-get -y install redis-server

4. File console /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini

stunServerAddress=YOUR_MACHINE_PUBLIC_IP
stunServerPort=3478

5. File console /etc/turnserver.conf

external-ip=YOUR_MACHINE_PUBLIC_IP
listening-port=3478
fingerprint
lt-cred-mech
max-port=65535
min-port=40000
pidfile="/var/run/turnserver.pid"
realm=openvidu
simple-log
redis-userdb="ip=127.0.0.1 dbname=0 password=turn connect_timeout=30"
verbose

6. File /etc/default/coturn

TURNSERVER_ENABLED=1

7. Init services

sudo service redis-server restart
sudo service coturn restart
sudo service kurento-media-server restart

8. Init Openvidu Server JAR executable

java -jar -Dopenvidu.secret=YOUR_SECRET -Dopenvidu.publicurl=https://YOUR_MACHINE_PUBLIC_IP:4443/ openvidu-server-{VERSION}.jar

Being YOUR_SECRET the password you want for securing your OpenVidu Server. This will be needed for connecting to OpenVidu Server dashboard and for consuming OpenVidu Server REST API. Keep it safe!

See also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment