Create Your Own RTMP Server using Linode

  1. Create a 1 GB Nanode
  2. Login and run “apt-get update && apt-get -y dist-upgrade && apt-get -y autoremove && apt-get autoclean”
  3. Run “apt-get install libpcre3 libpcre3-dev build-essential libssl-dev git zlib1g zlib1g-dev ffmpeg”
  4. Find the latest stable version of Nginx at http://nginx.org/en/download.html and then run “wget http://nginx.org/download/nginx-lastest.stable.version.tar.gz”
  5. Run “tar xzf nginx-lastest.stable.version.tar.gz”
  6. Run “git clone https://github.com/arut/nginx-rtmp-module.git”
  7. Run “cd nginx-lastest.stable.version”
  8. Run “./configure –add-module=/root/nginx-rtmp-module”
  9. Run “make”
  10. Run “make install”
  11. Run “cd”
  12. Run “nano /usr/local/nginx/conf/nginx.conf”
  13. Replace the file with the below text and hit CTRL+X and then Y.
  14. Run “reboot”
  15. Run “/usr/local/nginx/sbin/nginx” (you must do this every time your server reboots)
  16. Find your server address on the Linode panel Networking tab.
  17. Use “rtmp://your-linode-url/live” as your server url and whatever you want as your key on your streaming application and then make sure to use “rtmp://your-linode-url/live/your-key” when opening the stream in VLC or whatever application you chose to view it from.

/usr/local/nginx/conf/nginx.conf File

events {
    worker_connections 1024;
}
rtmp {
    server {
        listen 1935;
        chunk_size 4096;
        application live {
            record off;
            live on;
        }
    }
}