Running a 24/7 livestream on a VPS is the most reliable way to stream lo-fi radio, ambient video, camera feeds, or automated content around the clock. Here is how to set it up.
Two Approaches
1. FFmpeg (No GUI, Most Efficient)
FFmpeg runs in a terminal and loops a video file or playlist to a streaming platform. No desktop environment needed.
ffmpeg -re -stream_loop -1 -i /path/to/video.mp4 \
-c:v libx264 -preset veryfast -b:v 2500k \
-c:a aac -b:a 128k -ar 44100 \
-f flv rtmp://a.rtmp.youtube.com/live2/YOUR-STREAM-KEY
This loops the video file indefinitely and streams to YouTube via RTMP.
2. OBS on a Windows/Linux VPS (Full GUI)
Install OBS on a VPS with a desktop environment. Use remote desktop (RDP or VNC) to configure scenes. Leave OBS running.
VPS Requirements
| Quality | CPU | RAM | Bandwidth |
|---|---|---|---|
| 480p FFmpeg loop | 1 core | 1 GB | 2 Mbps upload |
| 720p FFmpeg loop | 2 cores | 2 GB | 5 Mbps upload |
| 1080p FFmpeg loop | 2 cores | 4 GB | 8 Mbps upload |
| 1080p OBS (software encoding) | 4 cores | 4 GB | 10 Mbps upload |
| 1080p OBS (GPU encoding) | 2 cores + GPU | 4 GB | 10 Mbps upload |
Keeping It Online
Screen or tmux (FFmpeg)
tmux new -s stream
# start FFmpeg command
# detach with Ctrl-B, D
systemd service (auto-restart)
[Unit]
Description=24/7 Stream
[Service]
ExecStart=/usr/bin/ffmpeg -re -stream_loop -1 -i /path/to/video.mp4 -c:v libx264 -preset veryfast -b:v 2500k -c:a aac -b:a 128k -f flv rtmp://a.rtmp.youtube.com/live2/KEY
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
OBS Auto-Reconnect
OBS has built-in reconnect settings. Enable "Automatically Reconnect" in Settings > Advanced.
YouTube vs Twitch vs Kick
- YouTube: Best for 24/7. No timeout for continuous streams. Use RTMP.
- Twitch: 48-hour broadcast limit. Requires restarting the stream periodically.
- Kick: Allows 24/7 but check current TOS.
FAQ
What VPS should I use for 24/7 streaming? A VPS with 2+ cores, 4 GB RAM, and unmetered bandwidth. Space-Node streaming VPS plans start at 9.99 EUR/month.
Is FFmpeg better than OBS for 24/7? For simple loops, yes. FFmpeg uses less CPU and does not need a GUI.
How much bandwidth does 24/7 streaming need? At 1080p 2500kbps: about 1 TB/month. Ensure your VPS has unmetered bandwidth.
Related: RTMP vs SRT comparison, Streaming VPS guide