24/7 OBS Streaming from a VPS: Complete Setup Guide for 2026

Published on | Updated

Run OBS on a Linux VPS so your stream keeps going when your PC is off: install OBS and a virtual display, set up 24/7 scenes, and keep it running with PM2.

Streaming setup Your stream is at 500 concurrent viewers. Your home internet goes out, and the stream goes offline with it. Running OBS on a VPS takes your home connection and PC out of that chain: the stream runs from a data center, so a power cut or a router restart at home no longer ends it.

Why VPS Over Home Streaming

Home streaming constraints:

  • Upload bandwidth: a 1080p60 stream to Twitch uses up to 6000 Kbps of video (the limit in OBS's Twitch preset), and your upload is shared with everything else in the house. OBS's own troubleshooting guide suggests starting the bitrate at 75% of your upload speed.
  • Power outages and internet drops: Both terminate your stream
  • PC upgrades and reboots: Cannot reboot without stream interruption

VPS streaming advantages:

  • Upload: a 1 Gbps port in the data center instead of your home upload
  • Separation from your PC: a looping or relayed 24/7 stream keeps running while you game on, restart or switch off your own PC

Installing OBS-Studio on Ubuntu VPS

OBS's download page lists two official Linux builds: the Flatpak on Flathub and a PPA for Ubuntu 26.04 and newer. OBS 33.0 removed Ubuntu 24.04 support, so on 24.04 the PPA stops at OBS 32.2.0. The commands below are for Ubuntu 26.04; on Ubuntu 24.04 or Debian 12, install the Flatpak as our cloud OBS guide shows.

# Update system
sudo apt update && sudo apt upgrade -y

# Install OBS Studio (official PPA, Ubuntu 26.04 and newer)
sudo add-apt-repository ppa:obsproject/obs-studio
sudo apt update
sudo apt install obs-studio

# Install virtual display (VPS has no monitor)
sudo apt install xvfb

Xvfb is an X server for machines with no display hardware: OBS runs on it, but nobody can see its window. So set up your scenes, the stream key and the settings below in a VNC desktop first (the cloud OBS guide sets one up behind an SSH tunnel), then close OBS and stop that desktop with vncserver -kill :1 before PM2 starts OBS on Xvfb below.

OBS Scene Configuration for 24/7 VPS Streams

For a 24/7 automated stream (lo-fi radio, game stream relay):

  • Scene 1: Media source (looping video file or RTMP input)
  • Scene 2: Countdown/offline screen (for scheduled downtime)

For the countdown, our OBS countdown guide builds a timer page that switches to your live scene at zero.

For a lofi radio channel, our 24/7 lofi streaming guide walks through these scenes with a looping background, a music playlist and chat overlays.

OBS settings (Output > Streaming):

Encoder: x264 (software encoding on CPU)
Rate Control: CBR
Bitrate: 6000 Kbps (the most OBS's Twitch preset allows)
Keyframe Interval: 2
Preset: veryfast (balance of CPU and quality)

Automating OBS with Scripts

Run both the virtual display and OBS under PM2 (it needs Node.js and npm):

npm install -g pm2

# Virtual display (VPS has no monitor)
pm2 start "Xvfb :1 -screen 0 1920x1080x24" --name xvfb

# OBS on that display, streaming from the start
pm2 start "DISPLAY=:1 obs --startstreaming --minimize-to-tray" --name obs-stream --kill-timeout 10000

pm2 startup
pm2 save

Run these commands as the user you set OBS up with in the VNC desktop, not as root: OBS keeps its profiles, scenes and stream key in that user's ~/.config/obs-studio. pm2 startup prints a command to run with sudo. After that and pm2 save, PM2 starts Xvfb and OBS again at boot and restarts either one when it exits. What PM2 cannot do is click OBS's dialogs:

  • After a crash, a forced kill or a hard reset, OBS 33 opens an "OBS Studio Crash Detected" window on its next start and waits for Run in Normal Mode before --startstreaming does anything. On Xvfb nobody sees that window, which is why the VNC desktop from the cloud OBS guide is the easier home for a 24/7 OBS.
  • PM2 stops a process by sending SIGINT and then SIGKILL if it is still running after 1.6 seconds. OBS closes on SIGINT, but while a stream is live it first asks for confirmation ("OBS is still currently active") and waits, so a pm2 restart during a stream ends in SIGKILL and the crash window. --kill-timeout 10000 gives OBS 10 seconds instead; also untick Show active outputs warning on exit under Settings > Advanced.

PM2 only watches the process. To know whether the stream itself is live on the platform, use OBS's reconnect setting and the checks in our guide to monitoring a 24/7 live stream.

How many vCores x264 needs depends on your resolution, frame rate, preset and scenes, so test with your own stream before you pick a plan; the cloud OBS guide explains what to watch in OBS's stats. If you would rather skip the Ubuntu install, our OBS streaming VPS plans come with OBS preinstalled and open in your browser.

Start your 24/7 stream on Space-Node VPS

Related: OBS audio settings for a clean voice, Prometheus uptime alerts for a 24/7 stream, OBS auto reconnect for 24/7 streams

Sources

All opened on 31 October 2026: