NeuroAgent

How to set up continuous music playback with VLC on VPS

Complete guide to setting up continuous music playback through VLC on Windows 11 VPS after disconnecting RDP. Learn the best methods for background launching.

How do I configure continuous music streaming through VLC after disconnecting from a remote desktop session on a Windows 11 VPS?

NeuroAgent

Setting Up Continuous Music Playback with VLC on Windows 11 VPS After Disconnecting from Remote Desktop

There are several ways to configure continuous music playback through VLC on a Windows 11 VPS after closing Remote Desktop, including running VLC as a Windows service or using the command line for background playback. The main issue is that when disconnecting from an RDP session, all applications running within it are stopped, but there are special methods to bypass this limitation.

Table of Contents

The Main Problem and Why It Occurs

When connecting to a VPS through Remote Desktop (RDP), you are working in a user session. When you disconnect from RDP, Windows by default closes all applications running in that session. This is standard Windows behavior designed to free up resources.

Interesting fact: As noted in this article about disabling remote access, many routers automatically allow remote access through external network connections, making disabling the Remote Desktop function less effective than it seems.

To solve this problem, you need to make VLC work independently of the user session or run it in a way that it continues working after disconnection.

Using VLC as a Windows Service

The most reliable method is to configure VLC to work as a Windows service. This allows the application to run in the background, regardless of whether there is an active user in the system.

Steps for setup:

  1. Download VLC for Windows 11 - available in Microsoft Store or 64-bit version from the official website

  2. Use utilities to create a service:

    • NSSM (Non-Sucking Service Manager) - a popular tool for running applications as services
    • Or the built-in sc tool for Windows
  3. Command to create a service through NSSM:

    bash
    nssm install VLCService "C:\Program Files\VideoLAN\VLC\vlc.exe" --intf=dummy --no-video --play-and-exit "C:\music\playlist.m3u"
    
  4. Configure service parameters:

    • Startup type: Automatic
    • Recovery: Restart service on failure

The advantage of this method is that the Windows service continues to work even when completely logging out of the system or rebooting.

Running VLC Through Command Line

If you prefer not to use services, you can run VLC with specific command line parameters for background playback.

Basic command:

bash
"C:\Program Files\VideoLAN\VLC\vlc.exe" --intf=dummy --no-video --play-and-exit "C:\music\playlist.m3u"

Advanced parameters:

  • --intf=dummy - runs VLC without a graphical interface
  • --no-video - disables video, leaving only audio
  • --play-and-exit - plays the file and exits
  • --loop - loops playlist playback
  • --no-stats - disables statistics in the console

For continuous playlist playback, use:

bash
"C:\Program Files\VideoLAN\VLC\vlc.exe" --intf=dummy --no-video --loop "C:\music\playlist.m3u"

You can create a bat file with this command and configure it to run at system startup through the Windows Task Scheduler.

Alternative Media Players

If VLC causes issues, there are alternative media players that may work better in background mode:

Best alternatives for Windows 11:

The advantage of Windows Media Player is that it’s better integrated into the system and may work more stably in the background.

Setting Up VLC for Streaming

To stream music to remote devices, VLC supports multiple protocols.

Setting up streaming:

  1. Open VLC and select MediaStream/Save

  2. In the source, select Capture/Device Input

  3. Configure stream parameters:

    • Method: HTTP
    • Port: 8080 (or another available port)
    • Encoding parameters: audio codec of your choice
  4. For background startup, use the --sout parameter:

bash
"C:\Program Files\VideoLAN\VLC\vlc.exe" --intf=dummy --no-video --loop --sout="#transcode{acodec=mp3,ab=128,channels=2,samplerate=44100}:http{mux=raw,dst=:8080}" "C:\music\playlist.m3u"

As noted in this article about streaming through VLC, VLC offers extensive capabilities for streaming over local networks and the internet.

VLC Web Interface for Remote Control

VLC has a built-in web interface that allows you to control playback from any browser.

Activating the web interface:

bash
"C:\Program Files\VideoLAN\VLC\vlc.exe" --intf=dummy --no-video --loop --extraintf=http --http-port=8080 "C:\music\playlist.m3u"

After this, you can control playback through a browser at http://localhost:8080. This is especially useful for VPS as it allows you to control music even without an active RDP session.

Tip: As noted in this article about streaming to TV, VLC’s web interface can be used as a remote control to play video from any device on your home network.

Sources

  1. How to Disable Remote Access in Windows 10/11: Complete Guide
  2. How to Install VLC for Windows 11
  3. I Found a VLC Replacement That Doesn’t Look Like It’s From 2002
  4. How to Install Windows Media Player in Windows 11
  5. How to Play RTMP Files in VLC Media Player on Windows/Mac in 2025
  6. Download VLC media player (Free) for Windows, macOS, Android, APK, iOS and Linux
  7. How to Use VLC to Stream Video to TV (Mac & Windows)
  8. Winamp - Updated Version of Lightweight Music Player

Conclusion

To set up continuous music playback on a Windows 11 VPS after closing Remote Desktop, we recommend:

  1. Use VLC as a Windows service - the most reliable method ensuring continuous playback
  2. Configure VLC’s web interface - for remote control from any browser
  3. Use command line parameters - to run VLC without a graphical interface in the background
  4. Consider alternative players - such as Windows Media Player or Screenbox if you encounter issues with VLC

These methods will ensure continuous music playback regardless of whether you’re connected to the VPS via Remote Desktop or not. For better performance and stability, it’s recommended to use a combination of these approaches.