Installing Red5 Pro on Windows

The following describes the steps in installing Red5 Pro on an Windows desktop or server. (please note, We recommend running Red5 Pro on linux for optimal performance.)


Software Dependencies

You will need to download and install Java SE Runtime Envrionment (JRE) - recommended version 8 or higher - to run Red5 Pro server.

After installing java, add a new system variable for JAVA_HOME. Find the installation folder for your Java installation, then go to System Properties, Advanced System Settings, Environment Variables. Under System variables, click on New....

JAVA HOME environent

Red5 Pro With WebRTC

We recommend running WebRTC on linux, due to CPU and memory requirements. Please see Installing Red5 Pro on an Ubuntu Linux Server

If you want to run Red5 Pro WebRTC on your windows desktop for development purposes, you will need to install Microsoft Visual Studio redistributables if you don't have Visual Studio on your machine.

Red5 Pro Installation

To install the Red5 Pro Server:

  1. Download the server .zip distribution to your local machine. Make sure to login with your account on http://account.red5pro.com and download the server from https://account.red5pro.com/download.
  2. Copy the server .zip distribution into the directory you wish to run Red5 Pro from
  3. Unzip the Red5 Pro distribution in the directory
  4. For ease of use, rename the Red5 Pro distribution directory to red5pro

If you have a Professional License Key

If you have purchased a Red5 Pro Professional license from http://account.red5pro.com, then you need to add it to the root of the Red5 Pro Server installation. Create a new text file named LICENSE.KEY, and type or copy/paste your 16-digit license code into that file before starting Red5 Pro.

Add execute permissions to the following files:

Modify Maximum Java Heap Size For Red5 Pro Java Process

You can modify the maximum Java heap size by modifying red5.bat. Increasing the maximum heap size will allow the server to assign as much memory as is available to Red5 Pro when necessary.

The default maximum heap size is 2 gigabytes (-Xmx2g).

REM JAVA options
REM You can set JVM additional options here if you want
if NOT DEFINED JVM_OPTS set JVM_OPTS=-Xms256m -Xmx2g -Xverify:none -Djava.net.preferIPv4Stack=true -XX:TieredCompilation -XX:+UseBiasedLocking -XX:InitialCodeCacheSize=8m -XX:ReservedCodeCacheSize=32m -Dorg.terracotta.quartz.skipUpdateCheck=true -XX:MaxMetaspaceSize=128m -XX:+UseParNewGC -XX:+UseConcMarkSweepGC

Running Red5 Pro

To start the Red5 Pro, double-click on red5.bat. A Command Prompt window will launch and you will observe the startup logs.

To stop Red5 Pro, you can either close the command prompt window, or double-click on red5-shutdown.bat.

Security

The following Inbound ports need to be open on your server/firewall for Red5 Pro features to work:

Port Description
22 SSH
5080 default web access of Red5
1935 default Red5 RTMP port
8554 default RTSP port
6262 websockets (for second screen and HLS)
8088 second screen client registry
3939 Windows Remote Desktop (required for cloud hosted management)

Ports required for WebRTC server using SSL:

Port Description
22 SSH
80 modified web access of Red5
443 standard HTTPS port
1935 default Red5 RTMP port
8554 default RTSP port
6262 websockets for HLS
8081 websockets for WebRTC
8083 secure websockets for WebRTC

NOTE: if you are running Windows on a cloud hosting service (such as AWS or Azure) you will need to open these ports both in the cloud security policy and on the Windows firewall on your system.

Verifying Red5 Pro is Running

Once you have started the Red5 Pro Server, you can verify that it is running and available by visiting your instance at port 5080.

Open a web browser and navigate to http://__your server ip__:5080 (like http://127.0.0.0:5080)

To not publicly expose the default web access at port 5080, you can do either of the following:

Note: currently there is no documented way to configure Red5 Pro as a Windows service.

How to modify default ports

Some firewalls or even service providers may block some of the Red5 Pro default ports, so you may want to modify those. There are two files that allow you to define the ports that Red5 Pro uses: {red5pro}/conf/red5.properties, and {red5pro}/conf/red5pro-activation.xml

red5.properties file : RTMP, HTTP, Websockets

To modify the default RTMP port, edit {red5pro}/conf/red5.properties RTMP section:

# RTMP
rtmp.host=0.0.0.0
rtmp.port=1935

To modify the default HTTP (or HTTPS) port, edit the HTTP section:

# HTTP
http.host=0.0.0.0
http.port=5080
https.port=5443

To modify the default Websockets port, edit the Websocket section:

# WebSocket
ws.host=0.0.0.0
ws.port=8081

Note: this is also where you define secure websockets (wss) if you need them.

red5pro-activation.xml file: RTSP, secondScreen, websocket (for HLS)

Modify the configuration bean if you wish to modify any of the default ports for RSTP, WebSockets for HLS, or Second Screen:

<bean name="configuration" id="configuration" class="com.red5pro.activation.Red5ProConfiguration">
<property name="rtsp" value="true"/>
<property name="secondscreen" value="true"/>
<property name="websockets" value="true"/>
<property name="rtspPort" value="8554"/>
<property name="secondScreenPort" value="8088"/>
<property name="websocketPort" value="6262"/>
<property name="enableRecording" value="true"/>
</bean>