How to set up your own private RTMP server using nginx

A somewhat advanced guide for Linux-based servers

  1. Ereboss
    Ereboss
    5/5,
    Thanks to you were able to stream our whole gaming event at school.
    Twenty PC's on one server and it works fine, not on an raspberry pi but on a normal PC and of cures an 1gbit lan.
    With the push function and a rented vserver streaming on multiple platforms was also no problem, one stream out to the rtmp on the vserver and than with 10gbit up to the web.
  2. Mike H
    Mike H
    5/5,
    Super easy to follow, got me out of a hole. Thanks so much.
  3. Liam Green
    Liam Green
    5/5,
    THis is fantastic. Thank you very much for the post. Quick question do you know if there is a way to buffer the frames for the stream? Say if you have slow internet the frames get uploaded. Yeah i understand there would be a bigger delay but is this possiable?
  4. DvdGiessen
    DvdGiessen
    5/5,
    Works great. Set up a Docker version of it (see https://github.com/DvdGiessen/nginx-rtmp-docker ), so installing Docker (`sudo apt-get install docker.io`) and running `sudo docker run -dp 1935:1935 dvdgiessen/nginx-rtmp-docker` should do everything.
  5. tomisme
    tomisme
    5/5,
    This got me set up easily way back!! It mad my stream quality amazing. I am having trouble now I have upgraded to windows 10. I cant seem to push to the server any more. I get a "Could not access the specified channel or stream key, please double check your stream key. If it is correct, there may be a problem contacting the server" error. I know my IP/Port are correct as if I try any other port through OBS I get an instant failure to connect. Using the ip and set port in my config file is the only connection attempt that returns that error. Any suggestions? I'm pulling my hair out.
  6. SiLeNtCovenant
    SiLeNtCovenant
    3/5,
    This was really simple to set up. Although, having issues with timing and keyframe intervals. Twitch and Youtube keep complaining odd timing.
  7. ws_ubi
    ws_ubi
    5/5,
  8. AnthonyG70
    AnthonyG70
    5/5,
    Used the above information to port over a CentOS server, worked like a charm. Was up and running to four different stream hosts, from one source, in under an hour. Good information!
  9. wired420
    wired420
    5/5,
    Used this to setup a YouTube like service for a media editing team on an intranet, between this guide, and a little php and SQL. Was able to deliver what they wanted without having to build a java app through Red5. Was a huge help. Didn't realize nginx could do this. Running on CentOS 6 VM via a intranet XenServer flawlessly.
  10. M1notaur
    M1notaur
    5/5,
    Awesome!
  11. mechanikism
    mechanikism
    5/5,
    I was able to loosely follow these instructions and set up a working RTMP server on CentOS 6. Excellent guide!
  12. dacoder
    dacoder
    5/5,
    Great review! I have wanted to try this for ages :D
  13. Kenji
    Kenji
    5/5,
    This is almost exactly the kind of thing I was looking for. Thanks for posting!