❬ Back to Blog
How to build the nginx RTMP module
Want to enable RTMP streaming on nginx? Here's how.
This post will cover how to build the rtmp module for nginx without the need to re-compile your whole nginx installation.
Things you need:
- nginx source code (e.g. http://nginx.org/download/nginx-1.17.9.tar.gz)
- rtmp module source code (https://github.com/arut/nginx-rtmp-module)
Be sure that the version of nginx you download matches your installed version. Use
sudo nginx -v to find your correct version.
Download the nginx code with wget or curl. Clone the rtmp source code into a directory of your choice.
The next step is to build the module.
Enter the directory of the nginx source code. Then compile the sources using the following command:
Once the compilation has finished build the module.
Next step is to copy the module (.so extension) to the desired folder where nginx expects it to be:
sudo mv objs/ngx_rtmp_module.so /usr/lib/nginx/modules/
Then instruct nginx to load the module by creating a config file under
That's it. If you want to use the module then add the following section to your
Over and Out