- Debian 10+
- 512mb RAM
- 1 Core
apt update; \
apt install -y git curl nano xz-utils; \
curl -sL https://deb.nodesource.com/setup_15.x | bash -; \
apt install -y nodejs
cd /tmp; \
rm -r ffmpeg*; \
wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz; \
tar xvf ffmpeg-release-amd64-static.tar.xz; \
cd /tmp/ffmpeg-*/; \
mv ffmpeg ffprobe /usr/bin/;
cd ~; \
git clone https://github.com/mediafoundation/mediaserver.git; \
cd mediaserver; \
npm i
Make sure you are on the correct path, and run the following command to start your Media Server:
node app.js
Open a web browser and go to your server IP address, you will see your Media Server home page if everything is setup correctly.
http://YOUR.IP.ADDRESS/
In order to prevent unauthorized users to stream to your RTMP server, it's recommended to change the default secret passphrase. This passphrase is utilized to create safe stream keys.
nano config.js
const config = {
passphrase: "My Secret Passphrase",
//...
Optionally, to scale up your streaming plaform to million of users and make it available through a truly powerful and decentralized CDN, you can add your server as a resource on Media Network through the Media Network App.
Follow this tutorial using your server IP address.
After adding your origin server IP address to Media Network, a new random subdomain will be assigned to you. The next step is editing the config file of your Media Server, assigning this newly generated domain as the CDN layer for your server.
nano config.js
const config = {
//...
cdn_url: "https://Resource_ID.medianetwork.cloud",
//...
:::info Make sure to restart your Media Server instance after editing the configuration file, as it's required to apply changes. :::
curl -X "DELETE" http://admin:admin@localhost/api/streams/live/STREAM_NAME
Media Server comes with an admin panel and an API installed by default. Through this panel you'll be able to check streams and network usage details. It can be accessed through any web browser using the following URL:
http://YOUR.IP.ADDRESS:8080/admin
Admin Username and Password can be set-up by editing the config.js file and restarting the Media Server instance.
//...
auth: {
api : true,
api_user: 'admin',
api_pass: 'admin',
},
//...
Media Server is a fork of illuspas' Node-Media-Server, a Node.js modified implementation of RTMP/HTTP-FLV/WS-FLV/HLS/DASH Media Server Based on Arut's nginx RTMP Module.