Kurento Media Server Installation

Kurento Media Server (KMS) has to be installed on Ubuntu 14.04 LTS (64 bits).

In order to install the latest stable Kurento Media Server version (6.6.1) you have to 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 trusty kms6" | sudo tee /etc/apt/sources.list.d/kurento.list
wget -O - http://ubuntu.kurento.org/kurento.gpg.key | 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

Migrating from KMS v5 to v6

The current stable version of Kurento Media Server uses the Trickle ICE protocol for WebRTC connections. Trickle ICE is the name given to the extension to the Interactive Connectivity Establishment (ICE) protocol that allows ICE agents (in this case Kurento Media Server and Kurento Client) to send and receive candidates incrementally rather than exchanging complete lists. In short, Trickle ICE allows to begin WebRTC connectivity much more faster.

This feature makes the Kurento Media Server 6 incompatible with the former versions. If you are using Kurento Media Server 5.1 or lower, it is strongly recommended to upgrade your KMS. To do that, first you need to uninstall KMS as follows:

sudo apt-get remove kurento-media-server
sudo apt-get purge kurento-media-server
sudo apt-get autoremove

Finally, the references to the Kurento Media Server in the APT sources should be removed:

# Delete any file in /etc/apt/sources.list.d folder related to kurento
sudo rm /etc/apt/sources.list.d/kurento*

# Edit sources.list and remove references to kurento
sudo vi /etc/apt/sources.list

After that, install Kurento Media Server 6 as depicted at the top of this page.

STUN and TURN servers

If Kurento Media Server is located behind a NAT you need to use a STUN or TURN in order to achieve NAT traversal. In most of cases, a STUN server will do the trick. A TURN server is only necessary when the NAT is symmetric.

In order to setup a STUN server you should uncomment the following lines in the Kurento Media Server configuration file located on at /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini:



Be careful since comments inline (with ;) are not allowed for parameter such as stunServerAddress. Thus, the following configuration is not correct:

stunServerAddress=<stun_ip_address> ; Only IP address are supported

... and must be:


The parameter stunServerAddress should be an IP address (not domain name). There is plenty of public STUN servers available, for example:

In order to setup a TURN server you should uncomment the following lines in the Kurento Media Server configuration file located on at /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini:


As before, TURN address should be an IP address (not domain name). See some examples of TURN configuration below:


... or using a free access numb STUN/TURN server as follows:


An open source implementation of a TURN server is coturn. In the FAQ section there is description about how to install a coturn server.