Setting Up Your Own RTMP Streaming Server on VPS: Nginx + Ubuntu 24.04
Greetings, friends!
In 2026, video streaming has long surpassed standard gaming broadcasts and casual blogging. Professional video content production, private corporate broadcasts, censorship-free online education, and the necessity of multistreaming (simultaneous broadcasting to YouTube, Twitch, VK, and Telegram) are driving content creators away from commercial B2B platforms. Relying on public services like Restream.io means bumping into rigid pricing tiers, resolution limits, and strict bitrate caps.
Deploying your own stream processing and relay server on a VPS solves this issue once and for all. You gain full control over the source stream quality, ultimate privacy, and zero data throughput limitations. Raising your own multistreaming platform on a server will also save you significant financial resources.
In this practical guide, we will break down the media server architecture, set up a lightweight stack powered by Nginx with the RTMP module on Ubuntu 24.04, and launch a live stream using OBS Studio.
Key Takeaways: Advantages of Your Own RTMP Server
Free Multistreaming: Your server can accept a single high-definition stream from OBS Studio and replicate it to external platforms independently, saving your home internet bandwidth.
Latency Control: Fine-tuning buffer sizes allows you to reduce stream latency down to 1–2 seconds, which is crucial for real-time viewer interaction.
Minimal System Resource Usage: The Nginx + RTMP stack is written in pure C, runs at the kernel level, and consumes a mere 20–50 MB of RAM, leaving the CPU free for network packet handling.
Broadcast Security: Access to publish stream feeds is restricted by unique stream keys—unauthorized third parties cannot hijack your server's bandwidth.
Video Guide for Setting Up an RTMP Server
A few years ago, we recorded a video demonstrating the entire installation process step by step:
Key Milestones from the Video Tutorial:
[
] Package Installation: Installing00:10 libnginx-mod-rtmpon the server using the package manager.[
] Nginx Configuration: Editing00:28 /etc/nginx/nginx.confto append thertmp { server { listen 1935; application live { live on; record off; } } }block.[
] Firewall Setup: Opening port 1935 via UFW (01:08 ufw allow 1935/tcp) and reloading the Nginx service [ ].01:15 [
] Pushing Streams with FFmpeg: Routing video feeds to03:37 rtmp://localhost/live/stream.[
] Playback Verification: Opening04:15 rtmp://185.163.45.72/live/streamdirectly in VLC Media Player to verify real-time video delivery.
Streaming Architecture
The classic cycle of self-hosted streaming consists of three phases: Ingest (receiving the video stream from an encoder like OBS), Processing/Routing (handling, recording, or relaying the stream on the server), and Delivery (distributing the video feed to viewers or external platforms).
Comparison of Modern Streaming Protocols
| Protocol | Average Latency | Key Advantage | OBS Studio Support |
| RTMP | 2–5 seconds | Global industry standard for stream ingest. | Native and absolute support. |
| SRT | 0.5–1 second | High resilience against packet loss on unstable networks. | Native support via Caller mode. |
| HLS | 5–20 seconds | Ideal for multi-viewer CDN edge delivery. | Unavailable for direct ingest. |
| WebRTC / WHIP | < 0.5 seconds | Ultra-low latency directly in web browsers. | Fully integrated via WHIP. |
How to Verify and View the Incoming Stream
To confirm that your server properly processes the video feed and outputs it to the network, you can play the stream on any local device using VLC Media Player:
Launch VLC Media Player.
Click Media -> Open Network Stream (or press
Ctrl+N).Enter your full stream network URL containing the secret key specified in your setup [
]:04:13 rtmp://YOUR_VPS_IP/live/my_secret_streamClick Play. After a short buffering phase, your live screen capture or camera output from OBS Studio will display on screen in real time [
].04:17
FAQ: Briefly About the Essentials
How do I secure my server so unauthorized users cannot stream through my VPS?
By default, your secret stream key (e.g.,
my_secret_stream) acts as a password, as the final stream endpoint URL is constructed around it. To implement professional authentication, use theon_publish http://localhost/auth.php;directive within your Nginx RTMP configuration module. When a broadcast attempts to start, Nginx sends a POST request to your script, which verifies the key against a database and returns a200 OK(allow) or403 Forbidden(deny) HTTP status code.What server hardware specifications does streaming demand from a VPS?
By itself, Nginx RTMP does not re-encode (transcode) video; it merely routes raw network packets. Consequently, CPU and RAM utilization remain remarkably low. The primary requirement is high network throughput and port stability. Streaming at 1080p resolution at 60 FPS requires a clean, dedicated upload and download bandwidth channel of 6 to 10 Mbps per target stream.
Conclusion
Operating your own RTMP server is a decisive step toward professional independence for content creators and businesses from third-party B2B platforms. It eliminates subscription fees for multistreaming, grants flexible control over video quality, and ensures broadcasts remain immune to arbitrary bans from centralized networks.
Because real-time video processing and relaying demand a continuous pipeline of gigabytes across the wire, it is critical that your hosting provider delivers a genuine, dedicated network port without unannounced throttling or hidden data caps.
If you are looking for a reliable server foundation to launch live streams, media projects, or retransmission pipelines, check out our Hourly Cloud Servers / NVME VPS services. At MivoCloud, we provide pure KVM virtualization with guaranteed network throughput, high-speed interface performance, and stable static IP addresses.
Article Author: Anatolie Cohaniuc

