How to Stream to Twitch and YouTube Using a VPS as an RTMP Relay

Streaming to multiple platforms simultaneously from your home internet connection puts huge strain on your upload bandwidth. The solution many streamers use is routing their stream through a VPS as an RTMP relay.
Here is what an RTMP relay is, why it helps, and how to set one up in 2026.
What Is an RTMP Relay
RTMP is the Real-Time Messaging Protocol used by streaming platforms to receive video. When you set up an RTMP relay on a VPS, your OBS (or other encoder) sends one stream to the VPS, and the VPS then forwards that stream to Twitch, YouTube, Kick, and any other platforms you want to reach.
This means your home connection only needs to support one upload stream instead of two, three, or four separate uploads.
Why Use a VPS for Streaming
A VPS running in a professional Data Center has a much more stable and faster network connection than typical home broadband. For 24/7 streams or IRL streams where network reliability matters most, a VPS provides the consistent uptime that home connections cannot guarantee.
The VPS also acts as a buffer. If your home connection drops briefly, the VPS can continue streaming using buffered data while your encoder reconnects.
Getting Your Twitch Stream Key
Your Twitch stream key is found in the Twitch Creator Dashboard under Stream settings. It is a unique identifier that tells Twitch which account to associate your incoming stream with. Never share your stream key publicly, as anyone with it can stream to your channel.
For YouTube, the stream key is found in YouTube Studio under Live streaming options.
Setting Up nginx-rtmp on a VPS
- Install nginx with the RTMP module on your VPS:
apt install nginx libnginx-mod-rtmp - Edit
/etc/nginx/nginx.confto add an RTMP block with your push destinations - Point OBS to your VPS IP with
/liveas the stream path - Set your Twitch and YouTube stream keys as push targets in the nginx config
- Restart nginx and start streaming from OBS
VPS Requirements for RTMP Relay
For relaying a 1080p60 stream, a VPS with at minimum 2 CPU cores and a 1Gbps network port handles the job comfortably. The actual CPU usage for pure relay (not re-encoding) is very low.
Space-Node VPS plans include 1Gbps network connections and are well-suited to running continuous RTMP relay setups. If you are looking to stream more stably and reach multiple platforms at once, a Space-Node VPS is a practical option to look at.
