Sunshine server setup with Tailscale and Moonlight Surface Pro client config

The goal of this post is to 1.) document my in-home game streaming setup, 2.) talk about the current status on setup and improvements I want to do, and 3.) any issues I am having. I am somewhat of a newbie to this, so all comments are appreciated.

Hardware:
Case: Fractal Define 7
Mobo: X570D4U-2L2T
CPU: Ryzen 9 5950X
Cooler: Noctua NH-D15 SE-AM4 (includes a 90deg bracket for mounting)
RAM: 128 GB 4x32GB PC4-3200 ECC UDIMM Supermicro 530T-I
Storage: 2 x WD Black WDS200T3X0E 2TB SN770 NVMe SSD Gen4 PCIe (in ZFS mirror)
GPU: NVIDIA Quadro P2000
Dummy plug: 4k 60Hz DisplayPort (for headless operation)

Software:
Proxmox VE 8.1

  • IOMMU and PCIe passthrough enabled for NVIDIA Quadro P2000
  • Blacklisted nouveau and nvidia kernel modules
  • vmbr2 configured on the 10Gbe interface for VM
  • Windows VM configuration:
    – 32GiB (no ballooing)
    – 1 socket, 8 cores (+AES option)
    – OVMF Bios (UEFI)
    – Display: none
    – Machine: pc-q35-8.1
    – Hard disk: local-zfs, 1TB, write-back cache, discard enabled, iothread=1 (I don’t know what this iothread option does)

Windows 11 Pro version 10.0.22621 Build 22621

  • Remote Desktop enabled
  • Fast restart disabled
  • Installed VirtIO drivers and QEMU (virtio-win-0.1.240.iso)
  • Installed NVIDIA Quadro P2000 driver version 537.99
  • Added custom resolution 2736x1824 60Hz (for streaming to a Surface Pro)

Sunshine version 0.21.0

  • Added 2736x1824 resolution
  • Using default NVENC encoder options:
    – P1 performance preset
    – Two pass mode: Quarter resolution
    – Enabled realtime priority in hardware accelerated GPU scheduling
    – Disabled prefer CAVLC over CABAC in H.264

I have Moonlight version 5.0.1 installed on a Surface Pro 2017 with Windows 10. I installed Moonlight with all the scripts and options, which includes a gamepad driver. At first, the game pad input was not working but it worked fine after rebooting both the gaming server and the Surface Pro.

Right now, I have Moonlight configured at 720p (10Mbps, 60FPS) with V-Sync on.

If I try to run native 2736x1824 at 60 FPS and V-Sync on, it works, but not for very long. This increases the bitrate to 51Mbps, which should be doable locally with my Wifi 6e capable AP, but the embedded Wifi 5 NIC in the Surface Pro 2017 is not great. The game is playable for a minute or two, but then freeze frames. I still hear the game audio and audio feedback from controller input, but the screen freezes on a frame and doesn’t change unless I restart the Moonlight session. While its working at native resolution, I got about 25FPS average in God of War 2018 with FSR set to Quality in game.

After switching to 720p (10 Mbps bitrate), V-Sync on, and FSR off, the God of War 2018 gameplay is buttery smooth. It’s a nice 45FPS on average. Unfortunately, this creates the black the bars on the 3:2 Surface Pro display.

Originally, I was using Parsec instead of Sunshine/Moonlight. I was having problems in Parsec where the signal would drop out. Additionally, I had problems with Steam Big Picture mode because the Xbox button needs to be available. My Xbox Series X controller center Xbox button works fine, but for some reason in Parsec, the gamepad drivers dropped those button presses. My gamepad works totally fine in Steam Big Picture Mode using Sunshine/Moonlight.

The two nice things I liked about Parsec were the Virtual Display Driver support (no dummy plug needed) and the remote access to the server outside my apartment.

Which brings me to my next adventure: How do I setup Sunshine/Moonlight so I can log in remotely outside of my residence? I am familiar with Tailscale and have used it before. I could install that in the Windows 11 VM.

However, I would like to be able to use Tailscale to access all the VMs on the server, not just the Windows 11 VM, and potentially the Proxmox VE web GUI too if possible. Would having a Tailscale container in Proxmox allow for that? How do I do that? I will need to research that.

Thanks for reading and I hope you have a good day!

I have a similar setup that works pretty good. Wireless is horrible, virtually a non-option, in my location (apartment building), so I run 100% wired (USB to Ethernet dongle ftw), and don’t have any hitches.
EDIT: So I can’t really speak to getting wireless running better.

I haven’t really messed with Tailscale, but just use the default Wireguard tools to setup the VPN on the host machine. I assume since Tailscale uses Wireguard for the VPN, it should be roughly the same thing, and work just as well.
Once you are connected to the VPN, you should be able to access the Proxmox web interface the same way as if you are on the local network.

1 Like