GeForce NOW and Xbox Cloud Gaming charge a monthly fee to rent a GPU you may already own. Sunshine, an open-source implementation of NVIDIA's discontinued GameStream protocol, turns your own gaming PC into that same kind of streaming server, paired with the free Moonlight client on almost any screen you own. The part most guides gloss over is what happens when you leave your home network: Sunshine talks over seven different ports, and the one you must never expose is the one every beginner tries first. This guide covers installing Sunshine, pairing Moonlight locally, and reaching your PC from anywhere with Localtonet, the right way.
Why Rent a GPU You Already Own
Cloud gaming services solved a real problem: not everyone owns a powerful gaming PC. But if you already do, and it spends most of the day idle while you are at work or traveling, a subscription to stream someone else's hardware stops making sense.
Sunshine and Moonlight solve the same problem from the other direction. Your PC does the rendering, exactly like it always has, and the stream travels to whatever screen you happen to be holding.
The hardware you need is very likely the gaming PC already sitting under your desk.
What Are Sunshine and Moonlight?
Sunshine is the host, the software that runs on your gaming PC and captures, encodes, and streams your screen. Moonlight is the client, a free app you install on the device you want to play from. Together they reimplement NVIDIA's GameStream protocol, the same one that originally shipped with GeForce Experience before NVIDIA discontinued it.
Install Sunshine and Pair Moonlight Locally
Install Sunshine on your gaming PC
Download the installer for your OS from the LizardByte Sunshine releases page. The Windows installer configures the firewall rules for you automatically.
Open the Sunshine web UI
Visit https://localhost:47990 on the same machine. Your browser will warn about an insecure certificate, this is expected, Sunshine self-signs it. Write down the username and password shown on first run, it is not shown again.
Confirm your encoder
Sunshine tries encoders in order and picks the first one that works. Check the Configuration tab to confirm it selected NVENC, QuickSync, or AMF rather than falling back to software encoding.
Install Moonlight and pair on the same network
Install Moonlight on your phone, laptop, or streaming device while it is still on the same Wi-Fi as your PC. Add the host, enter the PIN Sunshine displays, and confirm you can stream before going any further. iOS and tvOS require this local pairing step by platform policy.
Two Ways to Reach Sunshine From Outside Your Home
Once local pairing works, you have two real options for streaming away from home. Pick based on how many devices you need to reach it from.
๐ Option A: Localtonet VPN Manager (recommended)
VPN Manager creates a private mesh network between your gaming PC and every device you add to it, each one gets a Virtual IP, and traffic between them never touches the public internet. Sunshine's seven ports simply work, the same way they do on your home Wi-Fi, because as far as Sunshine and Moonlight are concerned, your phone across the country and your PC are on the same network. There is nothing to expose publicly and no port list to manage. This is the better option if the devices you stream from are ones you control and can install the Localtonet Client on.
๐ Option B: Direct TCP/UDP tunnels (for streaming to someone else's device)
If you want to let a friend connect from a device where installing the Localtonet Client is not practical, you can tunnel Sunshine's ports directly. This requires more setup and, unlike VPN Manager, involves exposing ports publicly, so treat it as the option for occasional access rather than the default.
Port 47990 is Sunshine's web UI, the same page that shows pairing PINs and configuration. Sunshine's own documentation is explicit: do not expose this port to the internet. Only tunnel the streaming ports listed below.
| Port | Protocol | Purpose | Tunnel it? |
|---|---|---|---|
| 47984 | TCP | Legacy HTTPS | Yes |
| 47989 | TCP | Web / pairing handshake | Yes |
| 47990 | TCP | Sunshine configuration UI | No, never |
| 48010 | TCP | Video (RTSP) | Yes |
| 47998 | UDP | Control | Yes |
| 47999 | UDP | Audio | Yes |
| 48000 | UDP | Video | Yes |
| 48002 | UDP | Input | Yes |
Most Moonlight clients cannot be told to use a non-standard port, they expect Sunshine's default numbers. That means each tunnel above needs Localtonet's Reserved Port add-on set to the same external port as the internal one: 47984 stays 47984, 47998 stays 47998, and so on. Without a reservation, the public port can change on restart and Moonlight will fail to find your host.
Create one tunnel per row in the table above
Go to localtonet.com/tunnel/tcpudp, select TCP or UDP to match the port, set the local IP to 127.0.0.1, and enter the port.
Reserve each port from Add-ons
Set the reserved external port equal to the local port for every tunnel, so the numbers match Moonlight's expectations exactly.
Add the host manually in Moonlight
Use Moonlight's "Add PC Manually" option and enter your Localtonet public address instead of a LAN IP. Pair with the PIN Sunshine shows, same as the local pairing step.
๐ Tips for a Smoother Stream
Self-Hosted Streaming vs. Cloud Gaming Subscriptions
| Feature | GeForce NOW / Xbox Cloud Gaming | Sunshine + Moonlight + Localtonet |
|---|---|---|
| Monthly cost | Subscription tier required | Free, beyond hardware you already own |
| Game library | Limited to supported titles | Anything installed on your own PC |
| Save files and mods | Tied to the provider's environment | Exactly what is already on your PC |
| Session limits | Time caps on lower tiers | Limited only by your own PC being on |
| Setup effort | None, sign up and go | An evening of one-time setup |
The honest trade-off: a cloud gaming subscription is genuinely the easier path if you do not already own a capable gaming PC, there is no hardware to buy and nothing to configure. Self-hosting wins the moment you already have the PC, since every dollar of the subscription is then paying for something you own twice over.
Troubleshooting Common Issues
| Symptom | Likely cause | Fix |
|---|---|---|
| Moonlight cannot find the host remotely | A tunnel's public port does not match the reserved local port | Recheck each Reserved Port setting against the table above, they must match exactly |
| Pairing PIN never appears | Port 47989 (or the web UI at 47990) is not reachable | Confirm the 47989 tunnel is running; never rely on 47990 for this, it should not be tunneled at all |
| Stream connects but freezes or stutters | Insufficient upload bandwidth or Wi-Fi on the host | Wire the host machine with Ethernet and lower the bitrate in Moonlight's stream settings |
| Encoder falls back to software mode | Outdated GPU driver or unsupported GPU generation | Update the GPU driver; confirm your card meets Sunshine's minimum generation for NVENC or QuickSync |
Frequently Asked Questions
Do I need an Nvidia GPU to use Sunshine?
No. Sunshine supports hardware encoding on Nvidia (NVENC), Intel (QuickSync), and AMD (AMF) GPUs, plus a software encoder as a fallback on anything else, though software encoding uses more CPU and adds latency.
Should I use VPN Manager or direct port tunnels?
VPN Manager for your own devices, it avoids exposing any Sunshine port publicly and needs no port reservation. Direct tunnels only make sense when you need to stream to a device you cannot install the Localtonet Client on, such as a friend's PC.
Why can't I just tunnel port 47990 and use the web UI remotely?
Sunshine's own documentation explicitly warns against exposing it. That page controls pairing and configuration, and anyone who reaches it could pair their own device with your PC. Manage configuration locally or over VPN Manager instead.
Can I stream to my phone on mobile data?
Yes, as long as your home upload speed and your phone's mobile connection can both sustain the bitrate. Expect to lower the bitrate compared to a Wi-Fi connection.
Why does Moonlight require pairing on the same network first?
It is the officially recommended setup order, and mandatory on iOS and tvOS by platform policy. It also confirms your Sunshine and Moonlight setup works before you add tunneling into the mix.
Can I stream multiple PCs from one account?
Yes. Install Sunshine and the Localtonet Client on each PC, they each authenticate with their own device token, and Moonlight can pair with as many hosts as you add.
Does my PC need to stay on for streaming to work?
Yes, Sunshine and the Localtonet Client both need to be running on the host PC. Running both as background services means they are ready the moment the PC is on, without manually starting anything.
Ready to Stream Your Own PC Anywhere?
Install Sunshine, pair Moonlight on your home network, then reach your PC from anywhere with a Localtonet VPN or tunnel. Free to start, no credit card required.
Get Started Free โ