Skip to main content

dCDN Setup

Add your Owncast instance to Media Network

To scale your Owncast server and make it available to huge audiences through a community-powered CDN, you can register it as a resource on Media Network using the Media App front-end.

We're assuming you've already have your wallet loaded to pay for transactions fees, and the required amount of MEDIA in order to use the CDN service.

Pre-requisites

  • Make sure you have owncast installed.
  • Make sure you have a compatible wallet with enough MEDIA to use the CDN service. MEDIA is currently available to buy in the following markets.

Find out Owncast's port:

In this step you'll have to find out the details about your Owncast instance. You can check what is running in each port by executing the following command:

root@owncast:~# netstat -ntpl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:33257 0.0.0.0:* LISTEN 1292/./owncast
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 600/sshd
tcp6 0 0 :::1935 :::* LISTEN 1292/./owncast
tcp6 0 0 :::8080 :::* LISTEN 1292/./owncast
tcp6 0 0 :::22 :::* LISTEN 600/sshd

Owncast is running on port 8080 for HTTP and 1935 for incoming RTMP streams, both under PID 1292

Find out external IP address of your device:

root@owncast:~# ifconfig
eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 141.120.114.66 netmask 255.255.255.0 broadcast 141.120.114.66
inet6 fe80::2eea:7fff:fef0:f2fe prefixlen 64 scopeid 0x20<link>
ether 2c:ea:7f:f0:f2:fe txqueuelen 1000 (Ethernet)
RX packets 9245489 bytes 1915123059 (1.7 GiB)
RX errors 0 dropped 34 overruns 0 frame 0
TX packets 4943558 bytes 970078005 (925.1 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 49

The external IP address is 141.120.114.66 using the eno1 interface.

This means your Owncast instance is running at the following URL, which is what we'll need to add as a CDN resource:

http://141.120.114.66:8080

Adding your Owncast instance to Media Network

Access the Media App, connect your wallet and add a new CDN resource. Specify IP, port and approve the transaction.

Finalizing the process

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.

Congrats! Your Owncast 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.