DEV Community

Cover image for Self Host your Own Restream Application using Nginx and Docker Today
Humphrey Mpairwe
Humphrey Mpairwe

Posted on

Self Host your Own Restream Application using Nginx and Docker Today

Streaming content to multiple channels is something every streamer can get excited about, but their is a catch, highly-priced licenses. Well, that's where Nginx comes in as your saviour to self host your own solution.

Last year, i was tasked to stream to 8 platforms all at once, 3 Facebook pages, 2 Twitter Pages, and 3 Youtube accounts.

Restream had limits to its own licensing, the same applied to Castr.io. So, I chose the manual way of getting things done, create the solution myself. So, i cloned and improved a solution by Rafalfaro18 on Github.

If you are in the same situation as i was, worry not, simply follow the steps below.

  • Deploy a cloud server probably running a friendly distro such as Ubuntu, or CentOS.

I use Vultr, but if you have a Digital Ocean or Linode account, you can use that, there are no limitations.

  • Login using a regular account that's a member of the Sudoers group.
  • Install Docker and Docker Compose on the server.
  • Clone my Github repository.
  • View contents of the README file and setup your streaming platforms.
  • Deploy the application and make sure the container is running, and allow port 1935 through your firewall.
  • Start sending your stream to the server, Nginx will broadcast it to all streaming platforms you set in the .env file.
  • Go to your Youtube channel or other channels you set and verify that your stream is going through.

Just like that, you can break the chains all thanks to open-source. More over, once you are done streaming your content, you can safely delete the server to avoid any extra costs billed to your account.

Now, compare that to a 1 month Restream license that will remain unused when you are not streaming.

I hope you find this post useful, if you do, a thumbs up would not be bad either.

Top comments (0)