Skip to main content

dCDN Setup

To scale up your streaming platform and make it available through a powerful and decentralized CDN, register your Media Server instance as a new CDN resource. This can be done through the Media App, a front-end developed by the Media Foundation to interact with Media Network, enabling developers to set up and configure CDN resources.

Pre-requisites

  • Ensure you have a Media Server instance installed and running.
  • Ensure your Media Server instance is accessible.
  • Ensure you have a compatible wallet with enough MEDIA to use the CDN service. MEDIA is currently available to buy in the following markets.

Add a new CDN Resource

Change your RTMP ingest URL and CDN URL

After the transaction is confirmed on the blockchain, a new random subdomain will be assigned to you. This is your new endpoint URL cached by Media Network.

Edit the config file of your Media Server, adding this newly generated endpoint. You can also change your ingest RTMP server details here.

nano config.js
mediaserver/config.js
const config = {
//...
cdn_url: "https://Resource_ID.medianetwork.cloud",
rtmp_url: "rtmp://YOUR.IP.ADDRESS",
//...

Then, run the Media Server again to apply the changes:

node app.js
note

Congratulations! Your Media Server instance is now powered and scaled by Media Network's dCDN. End-users accessing the new link will load the resources from their closest Media Edge node instead of your original server.