Back to articles
Technology Insight

Building a Personal 4K Cloud Gaming Infrastructure: Configuring Sunshine on Dedicated GPU VPS

May 28, 2026

Introduction to Personal 4K Cloud Gaming

The gaming landscape has shifted dramatically over the last few years. While commercial cloud gaming platforms offer convenience, they often come with limitations regarding library availability, geographic restrictions, and resolution caps. For enthusiasts who demand absolute control, uncompromised 4K resolution at 60 FPS (or higher), and ultra-low latency, building a personal cloud gaming infrastructure is the ultimate solution.

By leveraging a Dedicated GPU VPS combined with Sunshine—the leading open-source, high-performance stream server for Moonlight—you can turn a remote data center into your private gaming powerhouse. This technical guide will walk you through the end-to-end architecture, hardware selection, server optimization, and Sunshine configuration required to achieve a seamless 4K streaming experience.

1. Architectural Overview and Infrastructure Selection

To stream games at 4K resolution, your infrastructure must handle immense data throughput with minimal processing delays. Unlike traditional web hosting, cloud gaming requires real-time video encoding and rapid packet transmission.

Choosing the Right Dedicated GPU VPS

Do not mistake a standard VPS with shared virtual GPUs (vGPU) for a dedicated gaming rig. For 4K streaming, you need a server that provides direct access to the physical graphics hardware (GPU Passthrough). Look for providers offering the following minimum specifications:

  • GPU: NVIDIA Data Center GPUs (e.g., A10G, L4, or T4) or specialized workstation cards like the RTX 4090/A6000. The GPU must support hardware-accelerated NVENC (NVIDIA Encoder) for H.264, HEVC (H.265), or AV1.
  • CPU: At least 4 to 8 dedicated vCPUs with high single-core clock speeds (3.5 GHz+ preferred).
  • RAM: Minimum 16 GB DDR4/DDR5.
  • Storage: 512 GB to 1 TB NVMe SSD (Gaming libraries require massive read speeds).
  • Network: A dedicated 1 Gbps port with unmetered bandwidth or high data caps, ensuring a low-latency route to your physical location.
Note on Network Latency: For 4K streaming, your ping to the server should ideally be under 20ms, and absolutely no higher than 40ms. Choose a data center geographically closest to your home.

2. Preparing the Server OS (Windows Server / Windows 10/11 Pro)

While Sunshine runs flawlessly on Linux, most AAA Windows-based games require a Windows environment. We will focus on configuring a Windows Server or Windows 10/11 Pro instance on your remote VPS.

Step 2.1: Graphic Driver Installation

If your VPS uses an enterprise NVIDIA GPU (like the Grid or A10G series), standard GeForce drivers will not install. You must install the NVIDIA Virtual Workstation (vWS) drivers or the appropriate data center drivers provided by your host.

  1. Download the correct driver from the official NVIDIA enterprise portal.
  2. Run a clean installation and restart the server.
  3. Open the NVIDIA Control Panel to verify that the GPU is fully recognized and operating in WDDM (Windows Display Driver Model) mode rather than TCC mode.

Step 2.2: Implementing a Virtual Display Driver

Most headless VPS instances do not have a physical monitor attached, meaning Windows defaults to a generic non-hardware-accelerated display driver or caps the resolution at 1080p. To stream in 4K, you must trick Windows into thinking a 4K monitor is connected.

We highly recommend the IddSampleDriver (Virtual Display Driver):

  • Download the latest release of IddSampleDriver from GitHub.
  • Extract the files and install the certificate according to the project readme.
  • Device Manager will now show a "Virtual Display".
  • Go to Windows Display Settings, select the virtual monitor, and set the resolution to 3840x2160 and the refresh rate to 60Hz or 120Hz.

3. Installing and Configuring Sunshine

Sunshine acts as the host server that captures your screen, encodes the video stream via the GPU, and sends it to your client device running Moonlight.

Step 3.1: Installation

Download the latest Sunshine Windows installer from the official GitHub repository. Run the installer and ensure you check the option to Install Sunshine as a Windows Service. This guarantees that Sunshine starts automatically when the VPS boots, even before a user logs in via Remote Desktop (RDP).

Step 3.2: Accessing the Configuration Web UI

By default, Sunshine hosts its management portal locally. Open a browser on your VPS and navigate to https://localhost:47990. Create your secure admin username and password when prompted.

Step 3.3: Advanced Settings for 4K Optimization

To achieve a pristine 4K stream without stuttering, navigate to the Configuration tab in the Sunshine Web UI and adjust the following parameters:

  • Audio Settings: Ensure the Audio Sink matches your primary virtual audio device (e.g., Virtual Audio Cable or Sunshine Audio).
  • Video Settings: Set the FEC (Forward Error Correction) percentage to 10% to protect against packet loss over long-distance networks.
  • NVENC Encoder Configurations: Change the preset to P1 or P2 (Lowest Latency) or P4 (Optimal Quality) depending on your GPU's processing overhead. Set the rate control mode to CBR (Constant Bitrate).

4. Network Configuration and Security Protocols

Because you are exposing a powerful server to the internet, security cannot be an afterthought. However, standard RDP protocols can conflict with game controllers and video streaming hooks, meaning we must open specific ports for Sunshine while securing everything else.

Required Port Forwarding / Firewall Rules

Ensure your VPS provider's network security group (or Windows Firewall) has the following ports opened for Inbound traffic:

Port Range Protocol Purpose
47984-47990 TCP Moonlight Control & Web UI
47998-48000 UDP Video stream & Control Data
48010 UDP Audio stream

Security Tip: To protect your server from brute force attacks, never expose the Sunshine Web UI (Port 47990) globally. Restrict incoming access on that specific port to your home IP address, or use a secure VPN tunnel like Tailscale or WireGuard to manage your server internally.

5. Client-Side Connection and Optimization

With the server successfully configured, it is time to connect using the Moonlight Game Streaming client on your local machine, smart TV, or mobile device.

  1. Open Moonlight on your client device. It should automatically scan the local network. Since your VPS is remote, click "Add Host Manually" and input your VPS's public IP address.
  2. A 4-digit PIN will appear on your client screen.
  3. Log back into your Sunshine Web UI, navigate to the "PIN" tab, enter the code, and click "Pair".
  4. In the Moonlight client settings, set your target resolution to 3840x2160 (4K), select 60 FPS or 120 FPS, and adjust the bitrate slider to at least 50 Mbps to 80 Mbps for optimal 4K fidelity.

Conclusion

By shifting from mainstream cloud gaming services to a self-hosted Dedicated GPU VPS with Sunshine, you unlock unmatched graphical freedom and data privacy. While the initial setup requires technical precision—particularly around virtual display allocation and network firewall management—the reward is a premium, lag-free 4K gaming experience accessible from absolutely anywhere. Monitor your server metrics, fine-tune your bitrates, and enjoy your personal gaming cloud.

Building a Personal 4K Cloud Gaming Infrastructure: Configuring Sunshine on Dedicated GPU VPS | DPTCloud