/

Microsoft Azure Installation


Installing Red5 Pro on an Azure Virtual Machine

The following describes the steps in setting up a new Azure Virtual Machine. This document assumes that you have an Azure account, or a trial account.

The following instructions are paraphrased from Azure's Virtual Machine setup tutorial:

Create Virtual Instance

  1. From the Azure portal pull-down menu on the left, choose *Virtual Machines**.
  2. Click on +Create and then +Virtual Machine
  3. Choose your Subscription and Resource Group (or create a new one)
  4. Assign a server name ("name must be 1-15 characters long and it cannot contain special characters.")
  5. Select your region and zone.
  6. For Image, click on See all images and search for Ubuntu Server 20.04 Minimal
  7. Select a VM size. The B2s VM type will be able to support minimal testing - however, because they do not have dedicated CPUs you may see issues. The F4s_v2 (suggested both for number of CPUs and network performance) will support most live production streaming implementations.
  8. In choosing the instance type, note that WebRTC uses more memory and CPU than RTSP and RTMP streaming and that higher the resolution, bitrate and framerate of your streams, they more load they will incur on your server.
  9. You can either generate a new key pair, use an existing key pair, or choose to login with username and password (not recommended for production environments).
  10. Select inbound ports - you can leave the default port 22 for the initialization. Later you will want to create a network ruleset. Click on Next to select the disk type.
  11. Disk type: Premium SSD is recommended for production; standard SSD is fine for development. Select the default encryption type.
  12. Networking - create a new Virtual Network and Public IP; accept other defaults
  13. You can accept other defaults for the next steps, unless you have specific relevant requirements.
  14. Review and Create.

It takes a few minutes for a VM to be available on Azure. After the instance has been created, go to the Overview page to get the IP address. Then choose Networking from the left-hand menu and add the following to the Inbound Port rules.

PortDescriptionProtocol
22SSHTCP
5080default web access of Red5 Pro/Websockets for WebRTCTCP
443modified https access of Red5 Pro; secure websockets for WebRTCTCP
1935default Red5 Pro RTMP portTCP
8554default RTSP portTCP
40000-65535TURN/STUN/ICE port rangeUDP

Note: each rule needs to have a different priority number (ssh port 22 is priority 1000 by default; for this example we made Red5 Port 5080 100, RTMP port 1935 200, etc).

Click OK to accept the new security group, OK again to accept all custom settings, and then OK again to create the virtual instance (right to left on the OKs, collapsing the expanded menu).

Log into the Virtual Machine

Using the login method selected in creating the machine, first SSH into your server via the public IP assigned and the username that you assigned:

ssh -i yourprivatekeyname username@<public-ip-address>

Copy Red5 Pro Distribution to Server

Exit back to your desktop, then change to the directory where you have downloaded the latest Red5 Pro server distribution. You should then sftp the zip file up to your Azure VM instance:

sftp -i yourprivatekeyname username@<public-ip-address>
sftp> put red5pro-server-version.zip /tmp/
sftp> quit  (after file has been loaded)

Red5 Pro Installation

Refer to the Ubuntu Server Install document to install Red5 Pro server on your Virtual Machine instance.

After installation, navigate to port 5080 of the public IP address of your VM to validate that Red5 Pro has successfully been started.


Installing Red5 Pro on an Azure Windows VM

If you wish to install on Windows, repeat the above with the following modifications:

Add a new security group with the Red5 Pro ports in addition to port 3389 (for Remote Desktop). You will need to configure a username and password, (you will use these to connect to the server via Remote Desktop), and add the Red5 Pro ports to the Inbound Firewall rules on the server.

You can connect to your Windows virtual machine by clicking on the connect icon. This will download a .rdp file, which you can run with Microsoft Remote Desktop to connect to the virtual machine.

You will want to "Enable folder redirection" from your local machine to the remote machine, so that you can copy the the Red5 Pro Server distribution to the virtual machine.

Once you have logged into the Windows virtual machine, you need to open the Windows Firewall and add inbound rules for the Red5 Pro ports:

PortDescriptionProtocol
22SSHTCP
5080default web access of Red5 Pro/Websockets for WebRTCTCP
443modified https access of Red5 Pro; secure websockets for WebRTCTCP
1935default Red5 Pro RTMP portTCP
8554default RTSP portTCP
40000-65535TURN/STUN/ICE port rangeUDP

Refer to Installing Red5 Pro on Windows here.