Use this script to automate the setup of a live-stream server on Ubuntu 22.04

image_pdfimage_print

I made a very useful script, I may say so myself, of which I’m very sure that a small group of people will find it to be really useful as well. In case you plan to build your own live-stream server, you automatically become a member of this group. In which case, you should definitely read this article. I decided to share the script with the world, so I made it publically available at this repository on Github.

What does it do?

What does the script do exactly, you ask? Well, it builds a proper live-stream server for you, from scratch, on a server running on Ubuntu 22.04, fully automized. The only thing that is asked of you is to enter your email address, and a valid domain name that points to your server. It needs an email address for when it requests certificates from Letsencrypt for the domain you entered. The script takes care of everything else! The live-stream server will be fully configured and will work straight out-of-the-box. It supports Adaptive bitrate streaming, and it outputs HLS and/or DASH streams to the viewers. A web page with a video player showing the stream is included, and a stat page showing stream statistics as well. Both are secured with certificates running on HTTPS. And to bring it all together for you, I even wrote a guide that will help you to get familiar with the environment and get started with live-streaming. That sounds pretty awesome, doesn’t it? (Yes, this is very awesome)

Before continuing, take a look at this video that I recorded, showing how to run the script, what the code looks like, and what things are important to know after it completed.

YouTube player

The script is able to handle almost the entire process of putting together a live-stream server. User interaction from your side is barely required. So, from this moment onwards, you won’t have to manually set up a live-stream server, ever again! No more of your precious time will be spent on performing such a tedious task. By the way, did I mention already that this is a super awesome script? I’m not just saying that because I’m the one who created it and am proud of it. Or, well, perhaps I am a little bit, to be honest.
I should mention that I did not do it all myself. Somebody helped me out a couple of times, mostly to produce some of the code. She’s always there for me in case I ever need help with coding. I’m talking of course about ChatGPT here.

Supported Operating Systems

So far, the script will run without errors on all the operating systems shown in the list below.

  • Ubuntu 22.04 – (Includes : Live server, Lubuntu, Xubuntu, Kubuntu, Ubuntu Studio)

I know this is probably not the longest list you’ve ever seen in your life. Maybe, someday, I’ll do some editing and start testing the script on other operating systems. It would be nice if this script would run on the most popular distro’s. We’ll see what happens..

How to run the script

Before running any foreign code on your server, you should always take a look at the script to see it doesn’t contain any crap. Especially when it is a bash script! Here’s a direct link to the script, so taking a look at it first would be wise. Once you’re ready to try it out, below is how you can run the script on your server. It doesn’t matter to what folder you want to download the files from Github.

git clone https://github.com/ustoopia/auto-install-livestream-server-hls
cd auto-install-livestream-server-hls
sudo bash auto-installer.sh

Installing everything doesn’t take long at all, but the very last step in the script where it starts to generate a DH parameters file unfortunately takes a really long time. If you created such a file at an earlier moment, it doesn’t make sense to create another one. Simply remove this last step from the script to save some time. I guess you know everything you need to know.

Hopefully, people who are searching the internet finding the best way to install a live-stream server will find their way to this page. And I’m hoping that everybody who used it will find it to be as useful as I find it to be. If this is the case, feel free to leave a comment to thank me.

To answer your questions; No, of course I don’t mind if you leave a comment to thank me. And yes, if you want to show your appreciation in the form of a donation, I’m totally ok with that.