
Running OBS Studio on a Windows VPS or RDP server is a popular way to stream 24/7 without tying up your own computer or home connection. But many people find that the stream freezes, goes black or stops the moment they close the Remote Desktop window. This guide explains why that happens and shows reliable ways to keep OBS live after you disconnect, including redirecting the session to the console with tscon, using VNC, and setting up OBS itself for unattended streaming.
Quick answerBefore you disconnect, redirect your RDP session to the server's console instead of just closing the window. Run this in an elevated Command Prompt inside the RDP session:
for /f "skip=1 tokens=3" %s in ('query user %USERNAME%') do tscon.exe %s /dest:console
Your RDP window closes, but the desktop stays unlocked and active, so OBS keeps capturing and streaming.
Why OBS stops when RDP disconnects
When you close a Remote Desktop window, Windows disconnects the session: programs keep running, but the session no longer has an active display. Anything that captures the screen, such as OBS's Display Capture or Window Capture sources, then has nothing to draw, so the stream shows a black or frozen image, and some encoders or browser sources stop updating. Minimising the RDP window can cause the same problem, because the client stops sending screen updates.
Your audio and network connection are not the issue; the session's display is.
Method 1: Redirect the session to the console with tscon
tscon moves your session from the RDP connection to the server's local console. The session stays active and unlocked, as if someone were sitting at the machine.
- Start OBS and begin streaming.
- Open Command Prompt as administrator inside the RDP session.
- Find your session ID:
The line withquery user>is your session; note its ID (for example2). - Redirect it:
tscon 2 /dest:console
The RDP window closes immediately, and OBS keeps running. Save the one-line command from the Quick answer as a .bat file on the desktop and run it as administrator to do this in one click (in a batch file, write %%s instead of %s).
Notes:
- You need administrator rights; this does not work on a shared RDP account without them.
- The console session is unlocked while you are away. Use a strong password and do this only on servers you control.
- When you reconnect with RDP later, you take the session back as normal.
- On a VPS, the console resolution is set by the virtual display adapter; set OBS's canvas size to match what you need.
Method 2: Use VNC instead of RDP
A VNC server shares the console session rather than creating a separate RDP session, so disconnecting the viewer does not affect the desktop OBS is capturing.
- Install a VNC server such as TightVNC or TigerVNC on the Windows server and set a strong password.
- Do not expose the VNC port (usually 5900) to the internet. Allow it only from your IP address in Windows Firewall, or connect through an SSH tunnel or VPN.
- Connect with a VNC viewer, set up OBS on the console session and start streaming.
- Close the viewer when done; the stream continues.
VNC is slower than RDP for interactive work, so many people configure OBS over RDP and use tscon, keeping VNC as a backup.
Method 3: Configure OBS for unattended streaming
- Prefer sources that do not depend on the screen: Media Source (video files or playlists), VLC Video Source, Browser Source and Image Slideshow keep working better than Display Capture.
- Auto-reconnect: in Settings → Advanced → Automatically Reconnect, enable reconnection with a short retry delay.
- Encoder: on a VPS without a GPU, use the x264 software encoder with a CPU preset the server can sustain (for example veryfast), and watch the "skipped frames due to encoding lag" stat. A GPU server can use NVENC to offload encoding.
- Start automatically: launch OBS with
--startstreamingfrom a scheduled task at logon so the stream restarts after a reboot. - Keep Windows from interrupting: set Windows Update active hours, disable sleep and screen timeouts, and turn off "Disconnect idle sessions" policies.
Check your server can handle streaming
- CPU: software encoding at 1080p30 typically needs several dedicated vCPUs; 720p needs less.
- RAM: 4 GB or more for Windows Server plus OBS.
- Upload bandwidth: at least your stream bitrate plus headroom; data-centre connections handle this easily.
Check the platform's rules on pre-recorded and 24/7 streams, and only stream content you have the rights to use.
Frequently asked questions
Why does OBS show a black screen after I close RDP?
Disconnecting RDP leaves the session without an active display, so screen and window capture have nothing to capture. Redirect the session to the console with tscon before disconnecting.
Does minimising the RDP window stop OBS?
It can, because the client stops rendering the session. Leave the window open, or use the tscon method and close it.
Is the tscon method safe?
It is a built-in Windows tool. The trade-off is that the console session stays unlocked, so use it only on servers you control with strong passwords and restricted RDP access.
Can I stream 24/7 from a Windows VPS?
Yes, with enough CPU for encoding, stable bandwidth, and the tscon or VNC method so the stream keeps running when you disconnect.


