To create a high-performance
RTMP server VPS capable of relaying a 1080p60 stream to YouTube and Twitch simultaneously, a server with at least 2 vCPUs (3.0 GHz+), 4 GB RAM, and a 1 Gbps port is required. The cost for such a configuration starts at $12-15 per month, allowing you to save up to 80% of your home ISP's outgoing traffic by using the VPS as a central hub (streaming relay).
Why a VPS RTMP Server is the Standard for Professional Streaming?
Using a home PC to live stream to multiple platforms simultaneously creates a massive load on the outgoing internet channel and the CPU. If you stream at a bitrate of 8000 kbps to three platforms (YouTube, Twitch, VK Play), your computer must output a stable 24 Mbps stream. The slightest network fluctuation from a local provider will lead to dropped frames across all platforms.
Advantages of Moving Relaying to a Remote Server
- Upload Savings: You send only one stream to the VPS, and the server distributes it to any number of destinations.
- 24/7 Stability: Data centers have redundant communication channels. If your home internet drops for a second, the RTMP server VPS will maintain the connection with YouTube, and the broadcast won't terminate; it will simply "freeze" until you reconnect.
- Reduced OBS Load: You don't need to run multiple encoder instances or use multi-RTMP plugins that consume GPU resources.
Use Cases for NDI and RTMP Relay
For remote work, an OBS NDI setup is often used. NDI (Network Device Interface) allows for transmitting uncompressed video over a local network with minimal latency. In conjunction with a VPS, you can use NDI to send a stream from a gaming PC to a streaming PC, which then sends the data to the RTMP server VPS. If your team is geographically dispersed, using a streaming relay based on a VPS becomes the only way to assemble a high-quality broadcast without 30-second delays.
Choosing a Configuration: How Many Resources Does a Streaming Relay Consume?
When choosing a VPS for streaming, the CPU metric is critical. Unlike web servers where multi-threading is key, processing video streams in real-time (especially when using FFmpeg for transcoding) requires high single-core clock speeds.
Server Technical Requirements
If your task is simple traffic forwarding without changing resolution (passthrough), hardware requirements are minimal. However, if you plan on multibitrate transcoding (creating 1080p, 720p, and 480p versions from a 4K stream for viewers with weak internet), the load grows exponentially.
| Task |
vCPU (Cores) |
RAM (GB) |
Port (Gbps) |
Recommended Plan ($) |
| RTMP Relay (1 stream to 3 targets) |
2 Cores @ 3GHz+ |
4 GB |
1 Gbps |
$10 - $15 |
| Transcoding (1080p -> 720p) |
4 Cores @ 3.4GHz+ |
8 GB |
1 Gbps |
$25 - $35 |
| SRS Server + WebRTC (Low Latency) |
4 Cores |
8 GB |
1 Gbps |
$30+ |
| NDI Bridge + FFmpeg Heavy |
8 Cores |
16 GB |
1 Gbps |
$50+ |
To monitor the server status and automatically restart services in case of failure, it is recommended to set up cron jobs on the VPS to check the availability of port 1935.
Looking for a reliable server for your projects?
VPS from $10/mo and dedicated servers from $9/mo with NVMe, DDoS protection, and 24/7 support.
View offers →
Installing and Configuring nginx-rtmp on Ubuntu 22.04/24.04
The most popular and lightweight solution for creating a relay is the combination of Nginx and the
nginx-rtmp module. This is a time-tested solution with minimal memory overhead.
Step 1: Installing Dependencies
Update packages and install the necessary libraries for building or use the ready-made repository:
sudo apt update
sudo apt install libpcre3 libpcre3-dev libssl-dev zlib1g-dev ffmpeg -y
sudo apt install nginx libnginx-mod-rtmp -y
Step 2: RTMP Module Configuration
Edit the /etc/nginx/nginx.conf file. Add the RTMP block to the end of the file (outside the http block):
rtmp {
server {
listen 1935;
chunk_size 4096;
application live {
live on;
record off;
# Relay to YouTube
push rtmp://a.rtmp.youtube.com/live2/YOUR_YOUTUBE_KEY;
# Relay to Twitch
push rtmp://live.twitch.tv/app/YOUR_TWITCH_KEY;
}
}
}
After making changes, restart the service: sudo systemctl restart nginx. Now, in the OBS broadcast settings, select "Custom", server rtmp://YOUR_VPS_IP/live, and any stream key. Your RTMP server VPS will automatically start distributing video to the specified platforms.
Scalability and Modern Protocols: SRS Server vs. nginx-rtmp
While nginx-rtmp is simple, it is limited in functionality. If you need latency under 1 second or support for WebRTC, SRT, and HTTP-TS protocols, you should consider
SRS server (Simple Realtime Server).
Why Professionals Choose SRS?
- SRT Support: This protocol is much more resilient to packet loss (jitter) on the "last mile" between your home and the VPS.
- WebRTC: Allows watching the stream directly in the browser without using players, with a latency of 500ms.
- Dashboard: SRS has a built-in monitoring console for bitrate and the number of connected clients.
For those involved in media project automation, such as creating Discord bots on a VPS to notify about the start of a stream, SRS provides a rich API and Webhooks. You can configure the system so that when a stream reaches the server, the bot automatically sends messages to all social networks.
Video Transcoding via FFmpeg: Creating Multi-bitrate Streams
One of the most resource-intensive tasks for an
RTMP server VPS is transcoding. This is the process of re-compressing the incoming stream into several quality options. This is necessary if you want your stream to be accessible to users with mobile internet.
Example FFmpeg Configuration for Transcoding
Inside the application live block in nginx, you can specify the FFmpeg launch command:
exec ffmpeg -i rtmp://localhost/live/$name
-c:a copy -c:v libx264 -preset veryfast -b:v 3000k -s 1280x720 -f flv rtmp://localhost/hls/$name_720
-c:a copy -c:v libx264 -preset veryfast -b:v 1500k -s 854x480 -f flv rtmp://localhost/hls/$name_480;
Important: This process consumes a lot of CPU resources. On a standard VPS without GPU acceleration (NVENC/QuickSync), one vCPU core can process a maximum of one 720p60 stream. If you are planning serious production, it is better to rent a dedicated server with Intel QuickSync.
For storing broadcast archives and source video materials, it is convenient to use self-hosted Nextcloud on a VPS. This allows your editing team to access recordings immediately after the broadcast ends without using paid cloud storage.
OBS NDI Integration and Remote Broadcast Management
OBS NDI technology allows for transmitting video over the network with virtually no loss in quality. However, NDI requires huge bandwidth (up to 150 Mbps for a single 1080p stream), making direct transmission over the public internet impossible without a VPN.
Setting Up Remote NDI via VPS
- Set up a VPN tunnel (e.g., WireGuard or ZeroTier) between your gaming PC and the VPS.
- Use NDI Bridge to encapsulate the traffic.
- On the VPS side, receive the stream and convert it to RTMP for delivery to platforms.
This scheme allows for a "remote director" setup—where the streamer is in one country and the director, managing scenes in OBS, is in another. All heavy traffic is processed within the VPS network.
Cost Optimization and Bypassing ISP Restrictions
Many home ISPs limit speeds on "non-standard" ports or throttle UDP traffic. Using an
RTMP server VPS allows you to bypass these restrictions since the traffic goes through the standard TCP port 1935 (or even 443 if proxying via Nginx is configured).
How to Save on YouTube Live Upload?
If you stream in 4K with a bitrate of 40-50 Mbps, your home connection might not handle it. Using a VPS allows you to send one stream, and the server will "mirror" it. In this case, you only pay for the VPS traffic. Many providers, such as Valebyte, provide packages with included traffic from 10 TB to unlimited, which is sufficient for daily 8-hour streams.
To analyze your audience and the effectiveness of your streams, you can install an analytics system. Self-hosted analytics on a VPS will help track transitions from different platforms to your site or donation page without relying on heavy Google Analytics scripts.
Securing Your RTMP Server
An open RTMP port is a prime target for attackers who might start streaming to your keys. Be sure to set up authorization.
- IP Restriction: Allow
allow publish only for your home IP address in the nginx config.
- on_publish: Use this hook to verify the stream key via a simple PHP or Python script.
- Change the Port: Change the standard 1935 to any random port to avoid automatic scanning by bots.
Conclusion
For stable relaying of streams to YouTube and Twitch, the best solution is an
RTMP server VPS with 2-4 vCPUs and a gigabit channel, configured based on nginx-rtmp or SRS. This will ensure minimal latency, protection against home ISP connection drops, and allow you to scale the broadcast to any number of platforms without loading your local PC.
Ready to choose a server?
VPS and dedicated servers in 72+ countries with instant activation and full root access.
Start Now →