Project

General

Profile

Actions

Install Mediasoup API on Ubuntu Bionic » History » Revision 3

« Previous | Revision 3/9 (diff) | Next »
Olivier Bitsch, 04/15/2021 06:52 AM


Install Mediasoup API on Ubuntu Bionic

This guide will provide the correct way to deploy mediasoup-api on public server.

Install repository

echo "deb [trusted=yes] https://projects.iabsis.com/repository/mediasoup-api/debian bionic main" \
  > /etc/apt/sources.list.d/iabsis.list

cat > /etc/apt/auth.conf << EOF
machine projects.iabsis.com
login iabsis-apt
password <password>
EOF

Install package

apt install mediasoup-api nginx

Configure Mediasoup

## Define random key here
JWT_SECRET=<change secret>

## Configure credentials used to consume mediasoup API
API_USER=<define login>
API_SECRET=<define password>

## Define here the public IP server
PUBLIC_IP=<define local server IP>

## If server is behind nat, you might need to advertise 
# the real public IP by commenting out this line.
;ANNOUNCED_IP=1.2.3.4

## You will need to open UDP port in the follow range, you
# can adjust the range if required.
RTC_MIN_PORT=40000
RTC_MAX_PORT=49000

## If this server is behind a reverse proxy, you might need to trust it
TRUST_PROXY=127.0.0.1

## The best practice is to use reverse proxy, but if you want
# this API to serve directly HTTPS, you might need to configure the
# following lines
HTTP_ONLY=true
LISTEN=3480
;CERT=/etc/mediasoup-api/sample.localhost.cert.pem
;KEY=/etc/mediasoup-api/sample.localhost.key.pem
LISTEN_REDIRECT=3481

Enable mediasoup at boot

systemctl enable mediasoup-api

Updated by Olivier Bitsch over 3 years ago · 3 revisions