Kurento Installation Guide¶
Kurento Media Server (KMS) has explicit support for two Long-Term Support (LTS) distributions of Ubuntu: Ubuntu 14.04 (Trusty) and Ubuntu 16.04 (Xenial). Only the 64-bits editions are supported.
Currently, the main development environment for KMS is Ubuntu 16.04 (Xenial), so if you are in doubt, this is the preferred Ubuntu distribution to choose. However, all features and bugfixes are still being backported and tested on Ubuntu 14.04 (Trusty), so you can continue running this version if needed.
KMS is made available in four different editions. The difference between them is just whether they are packaged to work on Trusty or Xenial, and there is also the choice of using Release or Development versions:
- Use the Release version for any kind of service or product intended to reach a Production stage. Also use this version if you are not a developer.
- The Development version is a representation of the current state on the software development for Kurento, so it can include undocumented changes, regressions, bugs or deprecations. Use this if you want to develop KMS itself.
In order to install Kurento Media Server, you need to decide what combination of distribution and version you need. Open a terminal and type only one of these lines:
# Choose one: REPO="trusty" # KMS Release - Ubuntu 14.04 (Trusty) REPO="trusty-dev" # KMS Development - Ubuntu 14.04 (Trusty) REPO="xenial" # KMS Release - Ubuntu 16.04 (Xenial) REPO="xenial-dev" # KMS Development - Ubuntu 16.04 (Xenial)
Now type the following commands, one at a time and in the same order as listed here. When asked for any kind of confirmation, reply affirmatively:
echo "deb http://ubuntu.kurento.org $REPO kms6" | sudo tee /etc/apt/sources.list.d/kurento.list wget http://ubuntu.kurento.org/kurento.gpg.key -O - | sudo apt-key add - sudo apt-get update sudo apt-get install kurento-media-server-6.0
Now, Kurento Media Server has been installed. Use the following commands to start and stop it, respectively:
sudo service kurento-media-server-6.0 start sudo service kurento-media-server-6.0 stop
STUN and TURN servers¶
If Kurento Media Server or any of its clients are located behind a NAT, you need to use a STUN or a TURN server in order to achieve NAT traversal. In most cases, STUN is effective in addressing the NAT issue with most consumer network devices (routers). However, it doesn’t work for many corporate networks, so a TURN server becomes necessary.
In order to setup a STUN server you should uncomment the following lines in
the Kurento Media Server configuration file, located at
Be careful since comments inline (with
;) are not allowed for parameters
in the configuration files. Thus, the following line is not correct:
stunServerAddress=<serverIpAddress> ; Only IP addresses are supported
… and must be changed to something like this:
; Only IP addresses are supported stunServerAddress=<serverIpAddress>
serverIpAddress should be an IP address (not a domain name).
There is plenty of public STUN servers available, for example:
126.96.36.199:19302 188.8.131.52:19302 184.108.40.206:19302 220.127.116.11:19302 18.104.22.168:19302 22.214.171.124:3478 126.96.36.199:3478 188.8.131.52:3478 184.108.40.206:3478 220.127.116.11:3478 18.104.22.168:3478 22.214.171.124:3478 126.96.36.199:3478 188.8.131.52:3478 184.108.40.206:3478 220.127.116.11:3478 18.104.22.168:3478 22.214.171.124:3478 126.96.36.199:3478 188.8.131.52:3478 184.108.40.206:3478 220.127.116.11:3478 18.104.22.168:3478 22.214.171.124:3478
In order to setup a TURN server you should uncomment the following lines in
the Kurento Media Server configuration file located at
serverIpAddress should be an IP address (not a domain name). See
some examples of TURN configuration below:
… or using a free access numb STUN/TURN server as follows:
Note that it is somewhat easy to find free STUN servers available on the net, because their functionality is pretty limited and it is not costly to keep them working for free. However this doesn’t happen with TURN servers, which act as a proxy between peers and thus the cost of maintaining one are much higher. It is rare to find a TURN server which works for free while being performant; usually each user opts to maintain their own private TURN server instances.