Configuration¶
Table of Contents
Most (but not all, see below) of the settings in Kurento can be set statically in configuration files:
/etc/kurento/kurento.conf.json
The main configuration file. Provides settings for the behavior of Kurento Media Server itself.
/etc/kurento/modules/kurento/MediaElement.conf.ini
Generic parameters for all kinds of MediaElement.
/etc/kurento/modules/kurento/SdpEndpoint.conf.ini
Audio/video parameters for SdpEndpoints (i.e. WebRtcEndpoint and RtpEndpoint).
/etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini
Specific parameters for WebRtcEndpoint.
/etc/kurento/modules/kurento/HttpEndpoint.conf.ini
Specific parameters for HttpEndpoint.
/etc/default/kurento-media-server
This file is loaded by the system’s service init files. Defines some environment variables, which have an effect on features such as the Debug Logging, or the Core Dump files that are generated when a crash happens.
For other settings not directly available in configuration files, make sure to read the Client API SDK docs, where all exposed methods are documented:
The Kurento Docker images also accept some environment variables that map directly to settings in the above files. If this is not flexible enough, you can always use a bind-mount or volume with a different set of configuration files in /etc/kurento/
. For some tips about these techniques, go to About using Kurento with Docker.
Debug logging¶
KMS uses the environment variable GST_DEBUG
to define the debug level of all underlying modules. Check Debug Logging for more information about this and other environment variables.
Set this variable to change the verbosity level of the log messages generated by KMS.
Local install
Set environment variable
GST_DEBUG
in/etc/default/kurento-media-server
.
Docker
Pass environment variable
GST_DEBUG
:docker run [...] \ -e GST_DEBUG="Kurento*:5" \ kurento/kurento-media-server:latest
STUN/TURN server¶
Read When are STUN and TURN needed? to learn about when you might need to use these, and STUN/TURN server install for guidance on how to install your own STUN/TURN server.
Local install
Set values
stunServerAddress
,stunServerPort
, andturnURL
in/etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini
.
Docker
Pass environment variables
KMS_STUN_IP
,KMS_STUN_PORT
,KMS_TURN_URL
.
Client API
JavaScript: setStunServerAddress, setStunServerPort, setTurnUrl.
Network interface¶
To specify the network interface name(s) that KMS should use to communicate from the environment where it is running (either a physical machine, a virtual machine, a Docker container, etc.)
Local install
Set value
networkInterfaces
in/etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini
.
Docker
Pass environment variable
KMS_NETWORK_INTERFACES
.
Client API
Java: setNetworkInterfaces.
JavaScript: setNetworkInterfaces.
RTP port¶
You can configure the minimum and maximum ports that Kurento Media Server will open (bind to) in order to receive RTP packets from remote peers. This affects the operation of both RtpEndpoint and WebRtcEndpoint.
Local install
Set values
minPort
,maxPort
in/etc/kurento/modules/kurento/BaseRtpEndpoint.conf.ini
.
Docker
Pass environment variables
KMS_MIN_PORT
,KMS_MAX_PORT
.
Advanced settings¶
These settings are only provided for advanced users who know what they are doing and why they need them. For most cases, it’s better to leave these settings on their default values.
External IP address¶
When this feature is used, all of the Kurento IPv4 and/or IPv6 ICE candidates are mangled to contain the given address. This can speed up WebRTC connection establishment in scenarios where the external or public IP is already well known, also having the benefit that STUN won’t be needed for the media server.
Local install
Set values
externalIPv4
,externalIPv6
in/etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini
.
Docker
Pass environment variables
KMS_EXTERNAL_IPV4
,KMS_EXTERNAL_IPV6
.If the special value
auto
is used, then the container will auto-discover its own public IP address by performing a DNS query to some of the well established providers (OpenDNS, Google, Cloudflare). You can review the script here: getmyip.sh. In cases where these services are not reachable, the external IP parameters are left unset.
Client API
Java: setExternalIPv4.
JavaScript: setExternalIPv4.
Maximum Transmission Unit¶
The MTU is a hard limit on the size that outbound packets will have. For some users it is important being able to lower the packet size in order to prevent fragmentation.
For the vast majority of use cases it is better to use the default MTU value of 1200 Bytes, which is also the default value in most popular implementations of WebRTC (see Browser MTU).
Local install
Set value
mtu
in/etc/kurento/modules/kurento/BaseRtpEndpoint.conf.ini
.
Docker
Pass environment variable
KMS_MTU
.
Client API