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

From the Azure portal, click on +New, Virtual Machines, and then choose an OS.

For this example, we are going to choose the Ubuntu Server 14.04 image.

azurevm01

Select a deployment model: choose the default (Resource Manager) and click on the Create button.

deploymentmodel

Assign a server name ("name must be 1-15 characters long and it cannot contain special characters.")

Since you will need to SSH into the linux device, you'll need to set up an SSH key pair. You need to copy and paste the full text of the public key into the SSH public key text box.

If this is your first instance, then Create new Resource Group, and choose your preferred location for the instance. Click OK.

basic1

Choose the virtual machine size. For development the DS1-V2 (1CPU, 3.5GB RAM) will be sufficient. For production, we recommend at minimum the DS2_V2 (dual core, 7GB ram). Note that Microsoft includes estimated monthly costs for each server type. Click on the Select button.

ds1v2standard

In the next step, "Configure optional features", make sure that you are assigned a dynamic Public IP address. Next, click on Network security group (firewall) and create a new security group.

Add the following ports to the Inbound list:

Port Description
22 SSH
5080 default web access of Red5 Pro
1935 default Red5 Pro RTMP port
8554 default RTSP port
6262 websockets (for second screen and HLS)
8088 second screen client registry

Ports required for WebRTC server using SSL:

Port Description Protocol
22 SSH TCP
80 modified web access of Red5 Pro TCP
443 standard HTTPS port TCP
1935 default Red5 Pro RTMP port TCP
8554 default RTSP port TCP
6262 websockets for HLS TCP
8081 websockets for WebRTC TCP
8083 secure websockets for WebRTC TCP
40000-65000 TURN/STUN/ICE port range UDP

addinboundrule

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).

Your rules should look like this:

firewallrules

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).

You should see the instance "deploying" if everything has been set up correctly.

deploying

Log into the Virtual Machine

Using the keypair that you referenced 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)

Install Red5 Pro Server

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.

connect

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.

redirection

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:

Port Description
22 SSH
5080 default web access of Red5 Pro
1935 default Red5 Pro RTMP port
8554 default RTSP port
6262 websockets (for second screen and HLS)
8088 second screen client registry

Ports required for WebRTC server using SSL:

Port Description Protocol
22 SSH TCP
80 modified web access of Red5 Pro TCP
443 standard HTTPS port TCP
1935 default Red5 Pro RTMP port TCP
8554 default RTSP port TCP
6262 websockets for HLS TCP
8081 websockets for WebRTC TCP
8083 secure websockets for WebRTC TCP
40000-65000 TURN/STUN/ICE port range UDP

windowsfirewall

Refer to Installing Red5 Pro on Windows here.


Viewing your Virtual Machines in Azure

Since we created these with the new portal, the virtual machines will be listed under Virtual Machines, not "Virtual Machines (classic)"

vms