Creating Your First RTMP Application
In Nginx RTMP, an application is the part of the URL that decides where a stream goes. For example, in rtmp://example.com/live/myshow, the application is live and the stream name is myshow. This structure is useful because you can create separate applications for public streams, private tests, recordings or relay feeds.
Step 1: Open your RTMP configuration file:
sudo nano /etc/nginx/conf.d/rtmp.conf
Step 2: Create a basic application:
rtmp { server { listen 1935; application live { live on; record off; } } }
Step 3: Save the file and test it:
sudo nginx -t
Step 4: Reload Nginx:
sudo systemctl reload nginx
Step 5: Open OBS Studio and go to Settings > Stream.
Step 6: Set Service to Custom, then enter:
Server: rtmp://your-server-ip/live
Stream Key: test
Step 7: Start streaming. If everything is correct, OBS should connect without errors.
Step 8: Use VLC to test playback with:
rtmp://your-server-ip/live/test
For production, do not allow random stream names forever. Anyone who knows your server address could try publishing to /live/anything. Once testing works, add authentication, stream key validation or firewall restrictions. Start simple, prove the stream works, then tighten access. That approach makes troubleshooting much easier than building a complicated secure setup before confirming the basics.
Hosting tip: For Online Audience style hosting guides, remind users to test changes outside busy broadcast times, keep a backup of the last working configuration, and avoid exposing admin services publicly. A clear checklist, sensible firewall rules and careful bitrate choices will prevent most support issues before they happen.