Installation of Janus WebRTC Server on CentOS 7

Janus WebRTC Server is described as “Janus is a WebRTC Server developed by Meetecho conceived to be a general purpose one. As such, it doesn’t provide any functionality per se other than implementing the means to set up a WebRTC media communication with a browser, exchanging JSON messages with it, and relaying RTP/RTCP and messages between browsers and the server-side application logic they’re attached to.”

This article describes the installation procedure of Janus WebRTC Server on CentOS 7. Being a very complex and long process it is necessary to write on this due to the problems I faced during the installation of Janus on CentOS 7. Therefore, I documented all the steps and am sharing this with you guys to make life easier for you.

I am assuming that you are using a fresh server to install Janus WebRTC, however, if you are not, then please Do not forget to take a backup of your server if it is in production.

Let’s begin by updating the system.

sudo yum update

Enable the EPEL Repository.

sudo yum install epel-release

Now, we need to install the dependencies for Janus WebRTC.

Installation of Janus Dependencies using YUM and DNF

# Dependencies to be installed using yum.
sudo yum install openssl-devel glib2-devel opus-devel dnf libcurl-devel doxygen nginx dnf-plugins-core wget git meson ninja libmicrohttpd-devel libsrtp-devel libogg-devel libconfig-devel install jansson-devel libcurl-devel pkgconf-pkg-config libtool autoconf automake graphviz centos-release-scl

yum-config-manager --enable rhel-server-rhscl-7-rpms
yum install devtoolset-7 openssl11
scl enable devtoolset-7 bash

# Download and Install dnf forensics repository. 
wget -c
rpm -Uvh cert-forensics-tools-release-el8.rpm

# Dependecies to be install using dnf forensics repository.
dnf --enablerepo=forensics install gengetopt

Installation of Janus Dependencies using Source Code

1. sofia-sip

cd /opt
wget -c
tar -xvf sofia-sip-1.12.11.tar.gz
cd sofia-sip-1.12.11
make install

2. libnice

cd /opt
git clone
cd libnice
meson builddir
ninja -C builddir
ninja -C builddir test
ninja -C builddir install
export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig

3. libsrtp

cd /opt
tar xfv v2.2.0.tar.gz
cd libsrtp-2.2.0
./configure --prefix=/usr --enable-openssl
make shared_library && sudo make install

4. usrctp

cd /opt
git clone
cd usrsctp
./configure --prefix=/usr && make && sudo make install

5. libwebsockets

cd /opt
git clone
cd libwebsockets
git checkout v2.4-stable
mkdir build
cd build
make && sudo make install

6. libpaho

cd /opt
git clone
cd paho.mqtt.c
make html
make install

7. cmake

cd /opt
tar zxvf cmake-3.*
cd cmake-3.*
./bootstrap --prefix=/usr/local
make -j$(nproc)
make install

8. rabbitmq-c

cd /opt
git clone
cd rabbitmq-c
git submodule init
git submodule update
mkdir build && cd build
make && sudo make install

Installing Janus

cd /opt
git clone
cd janus-gateway
./configure --prefix=/opt/janus
make install
make configs

Configuring Janus

Edit the Janus configuration File.

vi /opt/janus/etc/janus/janus.jcfg
# Uncomment the following line
daemonize = true
# Uncomment the following lines and enable Stun Server. 
stun_server = ""
stun_port = 19302
# Uncomment the following lines and enable Turn Server and change TURN server to following (You may create your own account on - They provide free TURN Services)
turn_server = ""
turn_port = 3478
turn_type = "udp"
turn_user = "XXXXXXXXX" #### Create your own account
turn_pwd = "XXXXXXXXX" #### Enter password which u used while creating account

Enable HTTP / HTTPS Server

vi /opt/janus/etc/janus/janus.transport.http.jcfg
# set the following
http = true
https = true

Now start Janus WebRTC Server using the following command.


Configuring NGINX Web Proxy to access Janus Demo Content

NGINX has been already installed above, furthermore, to access demo content we can use any Web Server. However, to configure NGINX perform the following steps.

Edit the NGINX configuration file.

vi /etc/nginx/nginx.conf
# Check to see if enabled on Port 80
listen 80 default_server;
# Set the server name
server_name;  # Replace with your hostname

Copy demo data to NGINX Document Root.

cp -Rv /opt/janus/share/janus/demos/* /usr/share/nginx/html

Restart NGINX

service nginx restart

Install Let’s Encrypt SSL

apt-get install software-properties-common
add-apt-repository universe
add-apt-repository ppa:certbot/certbot
apt-get update
apt-get install certbot python-certbot-nginx
certbot --nginx

Now you can access Janus WebRTC on You will be able to access all Demo Content with complete WebRTC functionality.

Final Thoughts on Janus WebRTC

After installation of Janus WebRTC, you can play around with the Demo Plugins and get an idea of how you will be using it for your own requirements.

Explore more posts related to CentOS here.

[rb_related title=”You May Also Like” total=”2″]

Leave a Reply