Moonlight can’t find or connect to your gaming PC
Short answer: Put both devices on the same home network, then add the PC to Moonlight by its IP address instead of waiting for it to appear. If it still won’t connect, the usual causes are the PC firewall, a VPN, or the PC being on two networks at once. Moonlight’s docs give the exact firewall rules to add.
Checked October 30, 2026 against Moonlight PC v6.2.0 and Sunshine v2026.914.233613 (latest stable releases) and their documentation. Sources are listed at the end of the page.
1. Same network, then add the PC by IP
- The PC normally appears in Moonlight after a few seconds. If it doesn’t, use Add PC manually and type the PC’s local IP address.
- Apple TV, iPhone and iPad can only add a PC on the same local network (an App Store rule), and must pair while on that network.
- To check Sunshine is running, open its web UI on the host at
https://localhost:47990. A certificate warning there is expected. - If the PC’s IP keeps changing, a static DHCP reservation on your router keeps it the same. Moonlight’s guide recommends this for port forwarding, and it helps any setup that relies on a fixed IP.
2. Firewall rules
Sunshine should create Windows Firewall rules automatically. To test, Moonlight suggests briefly disabling the PC firewall and antivirus, rebooting and trying again. If that works, turn protection back on and add the rules from an administrator Command Prompt or PowerShell:
netsh advfirewall firewall add rule name="GameStream UDP" dir=in protocol=udp localport=5353,47998-48010 action=allow
netsh advfirewall firewall add rule name="GameStream TCP" dir=in protocol=tcp localport=47984,47989,48010 action=allow
These are the default ports. Sunshine’s port setting (default 47989) sets the whole family of ports, so if you changed it, the others shift too; the Sunshine config UI shows the resulting ports.
3. The usual blockers
- Reboot the PC and the client device.
- One connection only. If the PC is on both Ethernet and Wi-Fi, disconnect everything except the fastest (usually Ethernet).
- VPN off. A VPN on the gaming PC can hide your local network. Some VPNs also have a “block local network” setting to turn off.
- Known conflicting software. Moonlight’s list includes third-party firewalls and antivirus (Kaspersky may need a full uninstall; Malwarebytes Web Protection), Safing Portmaster, DisplayLink software and Razer Synapse, among others.
- Reset Winsock. From an administrator command prompt run
netsh winsock reset, then reboot. - Remote Desktop leaves the PC locked. On Sunshine hosts, log back in through Moonlight’s “Desktop” app, then start the app you wanted.
4. Pairing shows up but fails
When you select the PC, Sunshine should show a pairing notice. Enter the PIN from Moonlight on the PIN page of Sunshine’s web UI. If Sunshine answers with “Too many pending pairing sessions”, see Sunshine error 503.
FAQ
Which ports does Moonlight need open on the PC?
By default, TCP 47984, 47989 and 48010, and UDP 5353 and 47998 to 48010. Moonlight’s setup guide gives netsh commands that add these rules to Windows Firewall.
Why can’t I add my PC on Apple TV or iPhone from outside my home?
Apple’s App Store rules mean Moonlight on iOS and tvOS can only add PCs on the local network. Add and pair the PC while both devices are at home.
Could a VPN stop Moonlight from finding my PC?
Yes. Moonlight’s docs say to disable a VPN on the gaming PC if Moonlight can’t discover it, and to turn off any VPN setting that blocks local network access.
Sources
- Moonlight wiki: Unable to stream at all on the same network (official Moonlight docs)
- Moonlight wiki: Known application compatibility issues (official Moonlight docs)
- Moonlight wiki: Firewall setup (official Moonlight docs)
- Moonlight wiki: Setup Guide (official Moonlight docs)
- Moonlight wiki: Frequently Asked Questions (official Moonlight docs)
- Sunshine docs: Configuration (official Sunshine docs)
- Sunshine docs: Troubleshooting (official Sunshine docs)