How to install RED5 Media Server on Ubuntu 18.04 x64 2018

Install RED5 Media Server on Ubuntu 22.04 LTS – 2023 & 2024

Updated December 2023

In this post we’d previously written about how to install Red5 (free edition) on an Ubuntu 18.04 server so thought it was time to update it for Ubuntu 22.04 LTS for 2023 and 2024.

Updated instructions: -The Free and Open Source Red5 Media Server can be notoriously difficult to install and get up and running on any server, whether it be Ubuntu, CentOS or any other server system you care to mention. In this tutorial, we’ll show you how to quickly get up and running so you can test and play around with the free edition of RED5 Media Server on Ubuntu 22.04 LTS.

Set up your Ubuntu Ubuntu 22.04/RED5 Media Server environment

In this example, for ease, we’re going to be using a Digital Ocean VPS but of course, any VPS provider will do. We like Digital Ocean because they’re reliable and cheap, and it only takes a couple of minutes to “spin up” a brand new virtual server environment for us to play with (called a Droplet on Digital Ocean).  You only pay for the time that the server is active so using their service to practice on will only cost you a fraction of Cent/Pound/Euro etc. In other words, if you follow this demo and then delete your D.O. Droplet, it will literally cost you virtually nothing.

Choose your “datacenter”

It will only take around one minute to create your new RED 5 server environment with Ubuntu 22.04 automatically installed but first we need to choose the geographical location of our digital Ocean server. I’m close to London so I’ve chosen that one (see image below). Obviously, just choose the one that’s closest to you instead.

Choose a datacentre

Install Ubuntu 22.04

Setting up our Ubuntu 22.04 Serrver for Red 5 on a Digital Ocean droplet

As you can see from the screenshot above, there are various versions of Ubuntu to choose from. At the time the screenshot was taken, a newer (non-LTS) version of Ubuntu was available so we needed to select the dropdown and select Ubuntu 22.04 (LTS) x64. This will only cost you $6 per month (less than $0.01 per hour ) if you then select the 1GB of server memory and 25GB disk size option (like in the bottom left of the screenshot), which will be enough to get your new RED5 server up and running for a quick test on 22.04.

Set your password

For simplicity in this demo, we’re going choose the “password” option for root access to our server:

Set up a password

Name your server

Now let’s change the default “hostname” to something that’s more relevant. As you can see below, I’ve chosen “Red5” for ease:

Give your Red5 server a hostname

After you’ve done this, simply scroll down the page and create your Droplet.

Open PuTTY and connect to your Ubuntu 22.04 server

In this tutorial, we’ve used puTTY to gain access to our server because it’s free, widely used and reliable.

Open Putty to connect to your Red 5 server

Installing RED5 on Ubuntu 22.04 LTS (x64)

Now we drill down to the nitty-gritty and get on with the install! **PLEASE NOTE – This guide is only brief and is designed to help you test and experiment with a set of basic instructions to get you up and running with RED5 on Ubuntu 22.04 x64 as quickly as possible. For this reason, we’re not going into server security, SSH keys, changing from “root user” or tweaking the install.

Copy and paste each command and hit return. Leave out the hash/pound sign (#) when you’re copying from below (we don’t need to use sudo because we’re logged in as root). Wait for each command to finish before running the next one.

If you get prompts pop up when upgrading/updating/installing openjdk, for the sake of this tutorial, we’re just going to hit “enter” to accept the default options (unless you want to make any changes).

Choose the default options

# apt-get update

# apt-get -y upgrade

# apt install openjdk-11-jdk

# wget

# tar xvzf red5-server-1.3.25.tar.gz

# cd red5-server

# sh &

And that’s it, you’re all done! You may need to wait a little while after you’ve run the last command before you see the results in your browser so be patient.

Now you can visit the demo page that has the “JWPlayer” video player installed- Obviously, replace YOURIPADDRESS with your own: –


Please be aware that SSL hasn’t been covered in this tutorial so you have to visit the http (not https) version of the page.

Here’s what you should see:

The JW Player bundled with Red 5 media server installation

Playing a test MP4 file

By default, the JW Player is set to play an old Flash .flv (‘BladeRunner2049.flv’) when you hit the play button on the player: this is the default script of the player:

<script type='text/javascript'>
    'flashplayer': 'player.swf',
    'file': 'BladeRunner2049.flv',
    'streamer': 'rtmp://localhost/oflaDemo',
    'controlbar': 'bottom',
    'width': '720',
    'height': '480'

If you want to play a test video, you’ll need to edit the index.html file and tweak it so that it plays other formats e.g. mp4 files. Keep in mind there are two scripts in the file though. Here is the modified script I used:

<script type='text/javascript'>
    'file': 'the_rise_of_skywalker_360p.mp4',
    'width': '720',
    'height': '480',
    'controls': true, 
    'autostart': false, 
    'stretching': 'uniform', 
    'primary': 'html5' 

You’ll notice that I’ve changed the file to ‘the_rise_of_skywalker_360p.mp4’. This Star Wars mp4 demo file is one of two videos that come bundled with the install and if you set the correct path to it (it’s in a different directory/folder so you can just move it up one level), it will play as below:

Red 5's JW Player playing an mp4 demo file

We hope this worked for you (it worked for us in December 2023) in setting up your new Red 5 Media Server on Ubuntu 22.04 LTS – Time permitting, we may do a post regarding what to actually do with RED5 once you have it up and running and also expand on how to play video files

We’ll be showing you how to connect and stream to it, and also how to embed a player onto your own website so your visitors can see your stream – Bookmark this page and check back soon. In the meantime, happy Red5 testing!

Not interested in Red 5? How about trying our guide for setting up the free, Community Edition of Ant Media Server on Ubuntu instead?