Back to articles
DevOps & Systems

Comprehensive Guide to Setting Up a Personal Cloud Gaming System with Sunshine and Moonlight on Windows vGPU VPS

This detailed guide walks through setting up a personal cloud gaming system using Sunshine and Moonlight on a Windows-based VPS with vGPU support. It covers installation, network...

DPTCloud Engineering4 min read
Comprehensive Guide to Setting Up a Personal Cloud Gaming System with Sunshine and Moonlight on Windows vGPU VPS

This detailed guide walks through setting up a personal cloud gaming system using Sunshine and Moonlight on a Windows-based VPS with vGPU support. It covers installation, network configuration, performance tuning, and connection testing for streaming games from your PC to mobile or other devices via local network or public internet.

Introduction to Personal Cloud Gaming

Personal cloud gaming enables users to stream games from their own computer to other devices such as smartphones, tablets, or low-spec desktops. With Sunshine and Moonlight, you can turn a Windows VPS with vGPU support into a game streaming server, allowing access to your games from anywhere. Sunshine acts as the server that streams content, while Moonlight serves as the client to connect and view the games. Both tools support efficient video encoding and low latency, making them ideal for use on NVMe-based VPS environments.

Requirements and Preparation

To deploy this system, you will need:

  • A Windows VPS with vGPU support (e.g., NVIDIA GRID or AMD MxGPU). See details at NVMe Cloud VPS for Docker, Nginx & Databases.
  • Windows Server 2019 or 2022 with administrative privileges.
  • Software: Sunshine (download from GitHub) and Moonlight (download from https://moonlight-stream.org).
  • A public IP address or static domain name if accessing from the internet.
  • GPU drivers and vGPU support software installed (e.g., VDI, RDP, or NVIDIA vGPU driver).

Note: Do not use a VPS without vGPU support, as GPU performance will be insufficient for real-time video encoding. NVMe VPS solutions at NVMe Cloud VPS for Docker, Nginx & Databases are typically pre-configured with dedicated GPUs for such tasks.

Installing and Configuring Sunshine

Step 1: Download and install Sunshine on the Windows VPS.

1. Download Sunshine from GitHub: https://github.com/username/sunshine/releases
2. Extract the files and run Sunshine.exe as administrator.
3. Open a browser and navigate to http://localhost:47990 to access the admin interface.

Step 2: Configure Sunshine.

  • Go to the \"Settings\" tab → \"GPU\" and select the vGPU-enabled device.
  • Go to \"Streaming\" → \"Encoder\" and choose NVIDIA NVENC (if available) or AMD AMF for video encoding.
  • Set \"Bitrate\" to 15–30 Mbps depending on desired quality.
  • Set \"Resolution\" and \"Frame Rate\" based on client device capabilities.
  • Go to \"Network\" → \"Port\" and ensure port 47990 is open (or change if needed).

Step 3: Configure firewall and open ports.

1. Open Windows Defender Firewall → \"Inbound Rules\" → \"New Rule\".
2. Select \"Port\" → \"TCP\" → \"Specific local ports\" → enter 47990.
3. Choose \"Allow the connection\" and apply to \"Domain\", \"Private\", \"Public\".
4. Repeat for port 47991 if required.

Tip: If using a different firewall like Windows Firewall with Advanced Security, ensure both Sunshine and Moonlight are allowed through the firewall for all network profiles.

Connecting with Moonlight

Step 1: Download Moonlight on the client device (Android, iOS, Windows, or macOS).

Step 2: Open Moonlight and select \"Add PC\".

  • Enter the VPS IP address or domain name.
  • Select \"Sunshine\" as the server type.
  • Enter device name and login credentials if required.

Step 3: Connect and test.

1. Tap \"Connect\" and wait for the connection to establish.
2. Check latency, video quality, and stability.
3. Adjust bitrate and codec settings if needed.

If the connection fails, verify:

  • Is port 47990 open on the VPS firewall?
  • Is the GPU detected by Sunshine?
  • Is the VPS IP address correct?
  • Is Moonlight on a compatible version?

Performance Optimization and Troubleshooting

To optimize performance:

  • Use the appropriate encoder: NVENC for NVIDIA, AMF for AMD.
  • Reduce resolution or bitrate if latency is high.
  • Ensure the VPS has sufficient RAM and CPU (minimum 8GB RAM, 4 CPU cores).
  • Run Sunshine with administrator privileges to avoid access permission errors.

Troubleshooting solutions:

  • Cannot connect: Check port forwarding, firewall rules, and network connectivity.
  • Low performance: Lower video quality, close unnecessary applications.
  • High latency: Check network conditions; use Ethernet if possible.
  • GPU not detected: Verify GPU drivers and ensure vGPU is enabled.

For more information, see: Optimizing Business Efficiency: Project Management Guide with Kanboard on VPS.

DPTCloud Tier III Infrastructure

Recommended NVMe Cloud VPS Plans to Deploy This Setup

Enterprise RAID 10 NVMe SSDs, CMC & FPT District 9 uplinks with Anycast Anti-DDoS and 99.99% SLA.

View 22 VPS Plans
ECO · vn-02

VPS-2E

94.600 ₫ / mo

10% VAT included

  • CPU: 2 vCPU
  • RAM: 2 GB
  • SSD: 30 GB NVMe
ECO · vn-02Recommended

VPS-3E

170.500 ₫ / mo

10% VAT included

  • CPU: 2 vCPU
  • RAM: 4 GB
  • SSD: 50 GB NVMe
BASIC · vn-01Recommended

VPS-05

457.600 ₫ / mo

10% VAT included

  • CPU: 4 vCPU
  • RAM: 8 GB
  • SSD: 50 GB NVMe

Related Articles

View all
ZaloZalo SupportDiscord0384 753 478