Skip to content

Instantly share code, notes, and snippets.

@Alistair1231
Last active May 3, 2024 13:31
Show Gist options
  • Save Alistair1231/6e867021a47b72f75caa914aa9c563af to your computer and use it in GitHub Desktop.
Save Alistair1231/6e867021a47b72f75caa914aa9c563af to your computer and use it in GitHub Desktop.
Headless Moonlight Streaming PC

Moonlight Streaming Setup

Installing Windows

Boot from a Windows ISO
First download the ISO under this section Download Windows 11 Disk Image (ISO) for x64 devices on the following link:
https://www.microsoft.com/en-us/software-download/windows11

Make it somehow bootable. I would recommend using Ventoy which after installation on an usb stick, allow for simply copying the ISO file over. Alternatively try Rufus.

Convert account to local
This Reddit post lays it out well: FYI: it’s super easy and quick to switch to a local account after setup. / (archive)

Disable Password/Pin
Win + I → Accounts → Sign-in options
Disable Password and Pin.


Following, are the steps I took to disable passwords, it is possible that not all of them are necessary. But this works.

Disable Lock Screen after sleep
I went with Option Three: Enable or Disable Require Sign-in on Wakeup in Windows 11 / (archive)

Disable Password requirement in netplwiz

D6cDmvF

Installing Software

  1. Install Chocolatey:

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
  1. Install Sunshine, Parsec (as a backup), Steam, Playnite, Epic Games Launcher, Firefox (or Chrome if you have bad taste) and finally Zerotier for Access from anywhere.

choco install -y sunshine parsec steam playnite epicgameslauncher firefox zerotier-one
  1. We need a virtual display, since our PC will run headlessly, I use this and it works well. Just follow the installation steps as described:
    itsmikethetech/Virtual-Display-Driver

Various Tweaks and Fixes

RDP, i.e. Windows Remote Desktop is awesome for remote control, as long as you are not gaming. I prefer this for setup and general work to moonlight, parsec etc. It’s also really easy to turn on:

oxgBU6X
Figure 1. Enable RDP

To allow RDP without password, which we need since we disabled the password, we need to change a setting. I went with Method 1:
How Can I Connect Remote Desktop without Password? / (archive)


Since I have a firewall in my router and don’t want the windows firewall to annoy me in my LAN, I just disable it. Be careful with this.

7wGVoys
Figure 2. Disable Firewall

This is supposed to help with "bad connectivity" issues, source: Moonlight has constant poor network connection warnings, on 1gb network. / (archive)
Set this too 100mbit full duplex, or 1gbit full duplex, depending on your network.

HqwXdOm
Figure 3. Set Speed and Duplex in Ethernet Adapter option

Automatically changing the display resolution

I use an addon for Playnite called Display Helper With my settings, games are always launched in 3440x1440 144hz if the game is started from the "normal" desktop mode. If the game is started from Playnite’s Fullscreen mod (which is kind of like Big Picture in Steam), it is started in 1280x800 144hz, which is the resolution of my Steamdeck. Technically, 90Hz would suffice here.
These are my settings:

OUUVbCO
SdUS0JV

All you need to do, is add Playnite.FullscreenApp.exe to your list of apps in Sunshine and start a game.

Wake on Lan

You will need to enable WOL in your BIOS, it is often called something like "Power on by PCI" or "Power on by LAN".
Then you need to enable it in your network adapter settings. And in my experience you will also want to limit it to only Magic Packets. You do this again in the Adapter Properties:
once set up, you can wake you PC using Moonlight.

fvePuNe

I hope I didn’t miss anything. Good luck

@Alistair1231
Copy link
Author

Alistair1231 commented May 3, 2024

Images backup
wol
dh2
dh1
duplex
fw
rdp
netplwiz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment