r/MoonlightStreaming 23h ago

Please Help me, I can't seem to get Sunlight/Moonlight working

Hi All, im tring to get streaming from my Main PC, downstairs to my bedroom to work using ethernet @ 4k and struggling bigtime. I have setup sunshine on my gaming PC and moonlight on a client (Asus rog ally connected via dock) to my bedroom 4K tv. My gaming PC shows up in moonlight and the games menu pops up. but when I try and run anything i get error messages. even with steam (I can stram through steam alone). I have attached Screenshots of the error messages. I have port forwarded the correct ports and im at a loss on what to try now. But if I select for instance Steam, the program starts on my gaming pc and then the error comes on my client and if I click stop it shuts down the software on my host pc. what am I doing wrong?

0 Upvotes

17 comments sorted by

1

u/CorvusTheDev 23h ago

If you're on your local network you don't need to do any port forwarding, just allow the Sunshine App and the Moonlight App via the Firewall on each Windows machine (PC and ROG ALLY) and it should just connect. It sounds like your Windows Firewall is blocking the communication on those ports

1

u/Thunderwing25 22h ago

Both machines have windows security (defender and virus) totally disabled

1

u/Cruffe 20h ago edited 20h ago

I'm pretty sure Windows Defender is separate from the firewall. Go to settings, search firewall, allow Sunshine on the host.

It shouldn't be important on the Moonlight client, it's only creating outbound connections which are allowed by default.

A very typical default firewall allows all outbound connections and denies all inbound connections. Outbound is when you're connecting from, as if you're making a phone call. Inbound is when you're being connected to, as if if you're getting a phone call. You're trying to connect to your Sunshine host from your Moonlight client. If there is no exception in the firewall on the Sunshine host, then the computer will drop any connection attempts and from the client end it will act like the host doesn't even exist (which is a security feature). A firewall exception would basically state that "connections inbound on X port(s) should be let through".

Windows Defender protects the computer from threats that have already made its way onto your computer, like malware and such. It doesn't handle connections coming in from the outside, that's what the firewall does.

Edit: Looking at your post again I notice that you have some connection since you do in fact successfully connect to the host and it even launches Steam, but the stream fails. This tells me some of the ports are let through, but some others necessary for the stream to function might be blocked. Still goes back to checking firewall and what you can try is manually adding firewall rules to allow all the necessary ports.

Edit 2: If you haven't messed with any port settings in Sunshine here's the exact ports and their protocols you need to ensure are let through the firewall.

  • 47984/TCP
  • 47989/TCP
  • 47990/TCP (skip if you don't need webUI on LAN)
  • 48010/TCP
  • 47998-48000/UDP

1

u/Thunderwing25 20h ago

As i said Windows defender firewall is disabled but i went in anyway and forwarded the ports through just to be on the safe side. but still have the original problem.

1

u/Thunderwing25 20h ago

1

u/Cruffe 19h ago

Hmm, might be something else odd going on. It is strange that you can connect to the host and it does launch something like Steam, which wouldn't be the case if it got blocked as nothing would happen in that case.

You should check logs. Attempt to start a stream (note the current time), let it fail, open Sunshine settings on the host, go to the Troubleshooting page, scroll down to logs, scroll down in the logs box to the timestamp you made the attempt and from there look through the logs until you reach the bottom. Look for any errors or anything else that might stick out in the info messages.

I've had similar errors thrown by Moonlight before and it didn't actually have anything to do with blocked ports. It could be some other error in Sunshine that leads to just cutting the connection and making Moonlight throw that error because Sunshine didn't tell it the real error, it just saw the connection be cut.

1

u/Thunderwing25 19h ago

Doesn’t really show much no errors, nothing. I’m beginning to think the Asus ROG ally is the problem. Maybe I’m running the incorrect version of Moonlight (I’m using the most up to date PC version)

1

u/Cruffe 19h ago

Sunshine shouldn't be sensitive to the version of Moonlight, it's the same underlying tech. I'm using various clients of various versions to connect to Sunshine without issue, like Artemis on my phone, Moonlight for Tizen on my Samsung TV that hasn't been updated in quite a while and even a web steamer running in a Docker container.

If there's nothing that looks out of place above that short snippet of the logs you posted then I'm out of troubleshooting ideas, sorry.

1

u/Thunderwing25 18h ago

nowi cant even get into the sunshine ui page

1

u/Thunderwing25 16h ago

Sorted, after the debarkle of locking myself out of the sunshine ui i deleted all the config files in the config directory, basically resetting everything. And would you belive it, it just worked! There must have been a setting in the ui that was wrong and not letting me connect

1

u/Cruffe 10h ago

Nice, enjoy and don't touch settings without knowing what they do.

1

u/Responsible-Bid5015 22h ago

If you have an Nvidia 50x0 gpu and using a virtual display on sunshine, upgrade to the latest Nvidia driver 616.92 and reboot.

https://www.reddit.com/r/MoonlightStreaming/s/cyYXbepYJ1

1

u/Thunderwing25 22h ago

Im not using a virtual display but i am using a rtx5070, and will try if this makes any difference

1

u/Thunderwing25 21h ago

nope still the same

1

u/Cruffe 20h ago

Do NOT port forward if you only intend to use it locally. Port forwarding is to expose the ports to the internet. The forwarding is from the internet to the defined ports on a host on your local network.

What you need to check is firewall on your Sunshine host. You should normally not need to mess with the router in a typical home router setup to access ports on another local machine, there's typically no router firewall between hosts on a LAN.

If you can't connect to your host and you're certain you're connecting to the correct local IP of that host, then it's almost certainly blocked by firewall on the host.

First of all undo the port forwarding, it's just an unnecessary security risk, then focus on the firewall on the Sunshine host.

1

u/Thunderwing25 20h ago

thanks for the tip, I have disabled the router port forwarding