Unraid Multi-Streaming Server

This is a “guide” to make a Unraid a game re-streaming server, so you can stream to Twitch, Mixer, YouTube, or any RTMP supported service. In this example we will only be configuring our container to stream to Twitch. Let’s take a look!

The Hardware

The server I’m using is a left over beast that was almost decommissioned, here is a list of the build at it’s most basic form.

Let’s Install

I am running Unraid version 6.8.3 to make this happen. You will also need Community Apps with Docker Hub enabled.

Community Apps Plugin

Community Apps version 2020.03.14

To install the Unraid Community Apps plugin, simply click the Plugins tab then click the Install Plugin sub tab then paste this URL/link into the form to install it, don’t forget to click the Install button.

https://raw.githubusercontent.com/Squidly271/community.applications/master/plugins/community.applications.plg

Great! Now that you have it installed, navigate to the newly created Apps tab, you may need to refresh or reboot Unraid if the Apps tab doesn’t appear.

Scroll all the way down and look in the left pane for the Other section. Click Settings link and set “Enable additional search results from dockerHub?” to ‘Yes’

Thirdly, search for “dvdgiessen” in the search bar. Click “Click Here To Get More Results From DockerHub”, “nginx rtmp docker” should be the first available option. Click the icon with a downward arrow to install the container.


Configure NGINX RTMP Docker in Unraid

This is the bread and butter part right here. Once you configure this part correctly we are almost ready to stream to Twitch with Unraid.

  1. Click the Docker tab

  2. Click the question mark icon next to nginx-rtmp-docker

  3. Click edit

  4. Change Network Type: to Host

  5. Click the “Add another Path, Port, Variable, Label or Device

    1. Add port 1935

    2. Connection Type: TCP

  6. Repeat step 5

    1. Add Path

      1. Container Path: /etc/nginx

      2. Host Path: /mnt/cache/appdata/nginx-rtmp/

Your configuration should look very similar to this.

Apply your changes. Now the hard part. Either SSH into your server or open a terminal. Unraid allows you to open a terminal in your browser if you click the >_ icon in the top right corner.

Once you are at the command line type the following commands

  1. cd /mnt/cache/appdata/nginx-rtmp/

  2. vi nginx.conf

You should be looking at an empty file. Press i on the keyboard to “insert” text. Copy and paste the following into the terminal window.

user nginx;
worker_processes auto;
rtmp_auto_push on;
events {}
rtmp {
        server {
        listen [::]:1935;
        chunk_size 4096;

                application live {
                live on;
                record off;
                push 'rtmp://live-atl.twitch.tv/app/<yourTwitchStreamKey>';
                }
        }
}

Note: You will need to get the Twitch Streaming server near you. Mine happens to be Atlanta. To find the nearest click this link -> Twitch Ingest Server. Replace the “live-atl.twitch.tv/app/” with the correct server URL. You can get your Stream Key from Twitch and place it into the above text. This is where you would also enter the second, third, or fourth line for different services to stream to.

3. Once you are done making the necessary changes, press the escape key and then type: Shift + :

4. Now type: wq! and press the Enter key to save your changes/work

The following pictures is what the process above would look like.

Finally, go back to the Apps tab and “Start” the container. If you did everything correctly, it should start up and give you no problems.


Configure Streamlabs OBS or OBS Project

This is possibly the easiest part of the entire setup. I’m using Streamlabs for this example.

  • Custom Server

  • URL: rtmp://yourUnraidServerIPaddress:1935/live

  • Stream Key: test

Once you get your stream setup how you like it, as soon as you “Go Live” you will immediately begin streaming to Twitch. Done!

Customize the Icon Next to the Container

Enable Advanced View then scroll down for “Icon URL:” Enter in a URL or file path to an Icon you want to use. See below.


Purpose

Why would you want a server with the ability to stream to multiple services? Well, you are probably trying to reach a broad audience across different services, clearly. This is a great simple way to make that goal happen.

What kind of hardware do I need?

You don’t need anything crazy. While streaming, my Unraid server didn’t even flinch. See the gif below as an example and observe how little the RAM and CPU are being utilized.

Any Loss in Quality?

I’ll let you be the judge on this one. Here are my Streamlabs settings in their most basic form. There is no sound, it’s not you. In my opinion, there should be no perceptible difference (insert lots of caveats here).

  • 3440x1440 Canvas down sampled to 1920x1080 (yes it is scrunched up and looks bad, this is just a test!)

  • NVEC, default settings

  • 6000 Bitrate

  • 60 FPS

Why Unraid?

This is ideal if you already have an Unraid server and are looking to do more with it. It’s also pretty simple to do and won’t require you to install a virtual machine or install inside of your operating system. This is all done through Docker and running as a container. This is all web configurable which is great so that way from your gaming computer you can access the server and terminal through a web browser. So in theory, it will limit the frequency of interruptions during your stream if you are a one man show. Unraid is the ultimate tool, it’s an enabler!

Kind Regards

With this setup all of the work will be handled by your gaming / streaming box. The sole purpose of the NGINX container is to help you stream to multiple services without doing anything too crazy. Perhaps in the future we will look at a way to leverage the server to do all the heavy lifting (encoding/transcoding) so that way you can save your precious resources on your gaming computer for more of those sweet frames.

My gaming computer, the “Truncator”, is getting pretty old now so offloading any amount of work is probably beneficial at this point. Sure I could upgrade the hardware but the hardware is perfectly good for gaming. I also already have an Unraid server that has spare resources I can leverage to do more tasks and provide more services within my network. May as well take advantage of it while I can.

As always, drop a comment below if you have questions and I will try and help as best as I can! Cheers.