Nvidia shut down GameStream in 2020. Google mothballed Stadia the same year. Game streaming did not die with them, it just changed hands. Today the open-source pairing of Sunshine and Moonlight lets anyone turn a Windows, Linux, or macOS gaming PC into a private streaming host, no subscription and no platform holder’s permission required. This tutorial walks through the full setup: installing Sunshine on your host machine, picking the correct GPU encoder, opening the right network ports, pairing Moonlight on a Steam Deck, phone, or smart TV, and tuning bitrate so the stream holds up whether you are on the same Wi-Fi network or three states away. Budget about 60 minutes for the full 14-step process, longer if you also configure VPN-based remote access.
Don't miss new tech stories on Google
Add Tech Insider once in the Google app and our stories appear in your news suggestions.
Why Self-Hosted Streaming Is Having a Moment in 2026
Search interest around self-hosted streaming tools has been climbing steadily through 2026, and the reasons are not hard to find. Cloud gaming subscriptions keep adding restrictions rather than removing them. GeForce NOW’s newly enforced 100-hour monthly cap is a good example of the friction pushing people to look elsewhere, since a hard usage ceiling on a service you already pay for tends to send technically minded players looking for an alternative they fully control. Sunshine game streaming is that alternative for anyone who already owns a capable gaming PC, because the only recurring cost is electricity.
The other driver is hardware. Steam Deck, ROG Xbox Ally, and Legion Go S all put a full PC-class screen in your hands, and each one runs Moonlight natively. Pair that with a beefy desktop sitting idle while you are at work or on a couch across the house, and self-hosted streaming turns an otherwise unused GPU into a second gaming device for free. Plenty of players now run a hybrid setup by default: local play at the desk, streamed play everywhere else in the house, and a Tailscale tunnel for the rare session away from home entirely. None of that requires a cloud subscription or a second gaming PC purchase, just an hour spent on the steps below.
What Self-Hosted Game Streaming Means (and Why Sunshine and Moonlight Won)
Self-hosted game streaming means your own PC does the rendering, then compresses the video and sends it over your network to a second screen. No cloud data center in the loop, no monthly fee, no game library restrictions beyond what you already own. The technical foundation goes back to Nvidia’s GameStream protocol, originally built to pipe games from a gaming PC to a Shield tablet or Shield TV. Nvidia wound that program down years ago and locked GameStream to its own hardware while it lasted, which left a gap for open-source developers to fill.
That gap is where Sunshine comes in. Built by the LizardByte project and distributed free on GitHub, Sunshine reimplements the GameStream protocol as a host application that runs on almost any GPU, not just Nvidia cards. Moonlight is the matching open-source client, and it long predates Sunshine, having started life as a way to stream from real Nvidia GameStream hosts before Nvidia’s support faded. Pair the two together and you get sunshine game streaming: a self-hosted pipeline that treats your gaming PC as the server and nearly any device on your network, or off it, as the display.
The project ships updates on a near-weekly cadence using calendar-based version numbers, and the GitHub releases page shows active development well into mid-2026, including a security-focused release in June 2025 that patched a critical issue in the pairing flow. Official Sunshine documentation currently lists support for Windows 11, Ubuntu 22.04 and newer, Fedora 43 and newer, Debian 13 and newer, FreeBSD 14.4 and newer, and macOS 14.2 and newer, plus a Docker image for anyone who wants to run the host on a headless Linux box. None of this requires touching a game you do not already own. Sunshine streams your existing library, your existing Steam or Epic or GOG installs, and your existing save files. It is a remote display pipe, not a piracy tool.
Prerequisites: Hardware, Software, and Network Requirements
Before you install anything, confirm your host PC and your target client can actually talk to each other over the ports this setup needs. A sunshine game streaming host will technically install on weaker hardware than what is listed below, but the experience degrades fast once you drop below a hardware encoder that can keep pace with 1080p60 or better.
| Component | Minimum | Recommended |
|---|---|---|
| Host GPU | Any GPU with a hardware encoder (Nvidia GTX 950 or newer, AMD RX 400-series or newer, Intel UHD 630 or newer) | Nvidia RTX 20-series or newer, or AMD RX 6000-series or newer |
| Host OS | Windows 11, Ubuntu 22.04+, Fedora 43+, Debian 13+, macOS 14.2+ | Windows 11 64-bit with current GPU drivers |
| Host CPU | Quad-core, 2.5GHz or faster | 6-core or better if you plan to game and encode at once |
| Network (host) | 5GHz Wi-Fi or wired Ethernet | Gigabit wired connection |
| Upload bandwidth | 20 Mbps for 1080p | 50+ Mbps for 4K or for streaming outside the LAN |
| Client device | Any device that runs Moonlight | Steam Deck, Android/iOS phone, LG webOS TV, or a second PC |
A hardware encoder is not optional in any practical sense. Sunshine can fall back to software encoding using the CPU, but that fallback competes with the game itself for processor time and tends to introduce stutter well before it introduces smooth 1080p60. If your host PC also handles other tasks, like a recently upgraded GPU on a fresh 12VHPWR cable or a system you just tuned with faster XMP memory timings, that headroom will make the encoding pass close to invisible to your frame rate.
Step 1-2: Download and Install Sunshine on the Host PC
Step 1. Update your GPU driver first. Nvidia, AMD, and Intel all ship encoder fixes inside routine driver updates, and an outdated driver is one of the most common causes of a Sunshine install that installs cleanly but refuses to encode.
Step 2. Grab the installer that matches your host OS from the official Sunshine GitHub releases page. Windows users get an executable installer, Linux users get RPM, DEB, or an AppImage depending on distro, and macOS users get a generic build. On Windows, the installer registers Sunshine as a background service so it can start automatically at boot, which matters if you want the host ready before you have physically walked over to it.
If your host runs headless Linux, such as a dedicated server tower with no monitor attached, the Docker route avoids installing a full desktop environment just to run one background service.
docker run -d \
--name=sunshine \
--restart=unless-stopped \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Etc/UTC \
-p 47984-47990:47984-47990/tcp \
-p 48010:48010/tcp \
-p 47998-48000:47998-48000/udp \
-p 48002:48002/udp \
--device /dev/dri:/dev/dri \
-v /home/user/sunshine-config:/config \
lizardbyte/sunshine:latest
The --device /dev/dri line passes through the host’s GPU render node so the container can reach VAAPI hardware encoding on Linux. Skip that line and Sunshine falls back to software encoding inside the container, which works but burns CPU cycles you would rather spend on the game.
Step 3-4: First-Run Setup in the Sunshine Web UI
Step 3. Once installed, Sunshine runs a small local web server for configuration. Open a browser on the host and navigate to https://localhost:47990. Your browser will flag the self-signed certificate as untrusted. That warning is expected for a locally generated cert with no public certificate authority behind it, so proceed past it.
Step 4. On first load, Sunshine prompts you to create a local admin username and password for the web UI. This is separate from the PIN you will use later to pair Moonlight clients, so do not skip it thinking it is redundant. Set a real password here, since this web UI can change encoder settings, add or remove streamable applications, and view connection logs. Anyone who reaches it on your network can reconfigure your streaming host.
With the account created, you land on the main dashboard, which shows host status, connected clients, and links to the Applications, Configuration, and PIN pages. Everything from here forward happens inside this same interface.
Step 5: Choosing the Right Hardware Encoder
Open the Configuration tab and find the Audio/Video section. This is the single most important screen in the entire setup, because it decides whether your GPU or your CPU does the heavy lifting. Sunshine auto-detects available encoders, and the exact list on your machine depends on the platform and the GPU vendor. On Windows, Nvidia cards expose NVENC, AMD cards expose AMF, and Intel graphics expose QuickSync. On Linux and FreeBSD, AMD and Intel both route through VAAPI, with Vulkan Video available in partial support on some setups, and Nvidia still uses NVENC. On macOS, Apple Silicon uses VideoToolbox. Software encoding through x264 is available everywhere as a fallback, and should stay a fallback rather than a first choice.
Pick your GPU’s native hardware encoder explicitly rather than leaving the setting on auto, especially on laptops with both integrated and discrete graphics. A hybrid-graphics laptop will sometimes default to the weaker integrated GPU for encoding while the discrete GPU renders the game, which quietly caps your stream quality without any error message telling you why.
A representative slice of the underlying sunshine.conf file looks like this once you have picked NVENC on an Nvidia host:
# sunshine.conf - encoder and quality settings
sunshine_name = Living Room PC
encoder = nvenc
adapter_name = NVIDIA GeForce RTX
output_name = 0
nvenc_preset = p4
nvenc_twopass = quarter_res
qp = 22
min_threads = 2
fec_percentage = 20
channels = 2
You rarely need to hand-edit this file since the web UI writes to it directly, but knowing the underlying keys helps when you are troubleshooting a setting that does not seem to take effect through the browser. HEVC (H.265) is broadly supported across recent encoder generations and gives noticeably cleaner detail at the same bitrate as H.264. AV1 support is newer and depends heavily on your specific GPU generation and driver version, so treat it as something to test rather than something to assume works out of the box.
The nvenc_preset value deserves a second look before you move on. Nvidia’s encoder presets range from p1, the fastest and lowest quality, up to p7, the slowest and highest quality, and each step trades encode latency for image detail. For live streaming where responsiveness matters more than archival quality, p4 or p5 is the usual sweet spot, since presets past that point start adding encode delay that you will feel as extra input lag before you notice any visual improvement. AMD’s AMF and Intel’s QuickSync expose similar quality-versus-speed sliders under different names, and the same rule of thumb applies: resist the urge to max out quality settings on an interactive stream, because a game is not a video file you are trying to compress as small as possible, it is a real-time input loop where every extra millisecond of encode time shows up directly in how the game feels to play.
Step 6-7: Adding Games and Applications to Stream
Step 6. Sunshine streams your entire desktop by default, which is fine for casual use but adds a click before you reach your game. Go to the Applications tab and add entries for the titles or launchers you use most: Steam, a specific executable, or a batch file that launches a game directly. Each entry can point to its own executable path and can optionally run a “prep command” first, useful for things like switching audio output or launching a virtual display driver before the stream starts.
Step 7. For Steam specifically, point the application entry at Steam’s executable with a launch argument for the game’s App ID, so selecting that tile on Moonlight boots straight into the game rather than into the Steam library screen first. This shaves several seconds off every session and matters more than it sounds once you are doing it daily.
If your host GPU is aging and struggling to hit target frame rates at higher settings, this is also a natural point to weigh in a frame generation layer. A guide on setting up Lossless Scaling for roughly double the frame rate pairs well here, since a smoother local frame rate gives Sunshine cleaner source material to encode.
Each application entry also supports an “undo” command, which runs when the stream session ends rather than when it starts. This is where the prep and undo pair earns its keep: a prep command can switch your host’s audio output to a virtual device and force a specific display resolution before the game launches, and the matching undo command can switch everything back to normal the moment you disconnect, so the host PC returns to its regular desktop state instead of staying stuck on streaming-specific settings after you have already put the controller down. Anyone who shares the host PC with someone else in the household will appreciate not having to manually reset audio output and resolution by hand after every session.
Step 8-9: Opening Firewall Ports and Router Configuration
Step 8. Sunshine needs a specific set of ports open on the host’s firewall to accept incoming Moonlight connections. The Windows installer usually adds these rules automatically, but it is worth confirming, and on Linux or a manually configured firewall you will need to add them yourself.
| Port | Protocol | Purpose |
|---|---|---|
| 47984 | TCP | HTTPS, secure web interface |
| 47989 | TCP | HTTP, base connection port |
| 47990 | TCP | Web UI (the page you configured in Step 3) |
| 48010 | TCP | RTSP session signaling |
| 47998 | UDP | Video stream data |
| 47999 | UDP | Control data (keyboard, mouse, gamepad input) |
| 48000 | UDP | Audio stream data |
| 48002 | UDP | Microphone input (unused in most default builds) |
On Windows, you can add the full block with a single elevated PowerShell command rather than clicking through eight separate firewall rule dialogs:
New-NetFirewallRule -DisplayName "Sunshine TCP" -Direction Inbound -Protocol TCP -LocalPort 47984,47989,47990,48010 -Action Allow
New-NetFirewallRule -DisplayName "Sunshine UDP" -Direction Inbound -Protocol UDP -LocalPort 47998-48000,48002 -Action Allow
Step 9. If you only plan to stream within your own home network, stop here. Your router does not need any changes for LAN-only Moonlight steam deck or phone connections, since both devices already sit on the same local subnet. Port forwarding only becomes relevant if you want to reach your host from outside your home network, and that decision deserves its own section below because opening these ports directly to the public internet is a real security tradeoff, not a checkbox to tick without thinking about it.
Step 10-11: Installing and Pairing Moonlight on Your Client Devices
Step 10. Moonlight is free and available for practically every screen you own. The official Moonlight client covers Windows, macOS, Linux, Android, iOS, Apple TV, Android TV, LG webOS smart TVs, Raspberry Pi, and yes, a native build for Steam Deck that installs cleanly through Discover or Flatpak in Desktop Mode. If your household already leans toward handhelds, the choice of client device often comes down to whichever one is already sitting on the coffee table. A side-by-side look at Steam Deck, Xbox Ally X, and Legion Go S is worth a read if you have not settled on a handheld yet, since Moonlight steam deck support is currently the most mature of the three.
Step 11. Launch Moonlight on the client. It scans the local network automatically and should list your host PC by the name you set in Step 4. Tap it, and Sunshine generates a four-digit PIN that displays back on the host’s web UI under the PIN tab. Enter that PIN on the client within its short expiry window to complete pairing. Devices that cannot auto-discover the host, often because of a firewall blocking mDNS broadcasts or a client on a different VLAN, can add the host manually by IP address instead.
On platforms that support it, such as Linux and Steam Deck’s Desktop Mode, Moonlight also accepts command-line pairing and streaming, which is handy for scripting a one-tap “resume my PC” shortcut:
# Pair with the host once
moonlight pair 192.168.1.50
# Stream a specific app directly, skipping the menu
moonlight stream 192.168.1.50 "Steam Big Picture" -1080 -60fps -bitrate 20000
A successful pairing on the host’s web UI log looks roughly like this:
[info] Client connected: Steam Deck (192.168.1.87)
[info] PIN accepted, pairing successful
[info] Starting session: Steam Big Picture
[info] Encoder: nvenc | Resolution: 1920x1080 | FPS: 60 | Bitrate: 20000 kbps
Step 12-13: Tuning Bitrate, Resolution, and Frame Rate
Step 12. Moonlight’s in-app settings menu controls resolution, frame rate cap, and bitrate independently of anything on the host. Start with a resolution that matches your client screen exactly. Streaming 4K to a 1080p handheld wastes bandwidth encoding detail nobody will see, and streaming 1080p to a 4K TV leaves visible softness.
Step 13. Bitrate is the setting that most directly trades image quality for network headroom. These starting points work for most home networks and give you a baseline to adjust up or down from:
| Target | Recommended Bitrate | Minimum Upload Needed |
|---|---|---|
| 720p60 | 10 Mbps | 12 Mbps |
| 1080p60 | 20 Mbps | 25 Mbps |
| 1080p120 | 30 Mbps | 35 Mbps |
| 1440p60 | 35 Mbps | 45 Mbps |
| 4K60 | 60-80 Mbps | 90 Mbps |
| 4K120 | 100+ Mbps | 120+ Mbps |
On a wired LAN, push these numbers up until you see diminishing returns, since a gigabit connection has plenty of headroom to spare. Over Wi-Fi, back off a notch from whatever number technically fits your measured bandwidth, because Wi-Fi throughput fluctuates in ways a wired connection does not, and a bitrate that maxes out your link leaves zero margin for that fluctuation. Frame rate cap should match what your GPU can actually sustain in the game you are playing, not an arbitrary high number, since an inconsistent frame rate reads as far choppier over a stream than it does sitting at the PC directly.
Step 14: Streaming Beyond Your LAN Without Exposing Your PC
Step 14. Forwarding Sunshine’s eight ports directly on your router works, and plenty of guides stop there. It also means your gaming PC’s streaming host sits exposed to the open internet, reachable by anyone scanning for those specific ports. A four-digit PIN is a thin barrier against a determined attacker, and the smarter path is to skip port forwarding entirely and reach your host through a private network tunnel instead.
Tailscale is the most common choice for this because it is free for personal use, takes about five minutes to configure, and creates a private mesh network between your devices without touching your router’s port forwarding table at all. Install it on the host and on each client device, sign into the same account on both, and each device gets a stable private IP address that works identically whether you are on the same Wi-Fi network or on mobile data on the other side of the country.
# On the host PC
winget install Tailscale.Tailscale
tailscale up
# On a Linux/Steam Deck client
curl -fsSL https://tailscale.com/install.sh | sh
tailscale up
# Then point Moonlight at the Tailscale IP instead of the LAN IP
moonlight stream 100.x.x.x "Steam Big Picture"
WireGuard is the other common option if you would rather self-host the VPN layer instead of relying on a third-party coordination service, though it takes more manual configuration than Tailscale’s near-zero-setup approach. Either way, the principle is the same: authenticate at the network layer before Sunshine’s PIN ever gets involved, rather than leaving those eight ports facing the public internet directly.
Sunshine and Moonlight vs Steam Link vs Parsec vs GeForce NOW
Moonlight game streaming is not the only way to get a game off your PC and onto a second screen, and it is worth knowing where it sits next to the alternatives before you commit an hour to setting it up.
| Option | Cost | Self-Hosted | GPU Vendor Lock-In | Best For |
|---|---|---|---|---|
| Sunshine + Moonlight | Free, open source | Yes | None (Nvidia, AMD, Intel, Apple Silicon) | Power users who want full control and any client device |
| Steam Link / Remote Play | Free | Yes, via your own PC | None | Steam library owners who want the simplest setup |
| Parsec | Free tier, paid team plans | Partial (self-host or hosted) | None | Co-op sessions and remote collaboration, not just gaming |
| GeForce NOW | Subscription | No, fully cloud-rendered | Nvidia cloud hardware only | Players without a capable gaming PC at all |
Steam Link is the path of least resistance if your entire library already lives in Steam and you never plan to stream anything else. It just does not reach as many client platforms as Moonlight does, and it ties you to Valve’s ecosystem decisions. Parsec earns its keep in collaborative use cases beyond gaming, like remote pair programming or streaming a production tool to a client, and its free tier covers casual solo use well. GeForce NOW solves a different problem entirely, letting someone without any gaming PC play at all, though it comes with recurring subscription costs and session limits. Coverage of GeForce NOW’s recent 100-hour monthly cap is worth a look if a cloud subscription is genuinely on your shortlist instead of self-hosting. Sunshine sits apart from all three by charging nothing, running on hardware from any GPU vendor, and reaching the widest spread of client devices, at the cost of you being the one who has to configure and maintain it.
6 Common Pitfalls When Setting Up Sunshine and Moonlight
- Leaving the encoder on auto instead of picking it explicitly. Laptops with hybrid graphics are the worst offenders here. Auto-detection sometimes routes encoding to a weak integrated GPU while the discrete card renders the game, and you get a soft, low-bitrate stream with no error message explaining why.
- Forwarding all eight Sunshine ports straight to the internet. It works, but it also puts your gaming PC’s streaming host on the public internet with only a four-digit PIN standing guard. Use Tailscale or WireGuard instead, as covered in Step 14.
- Setting a bitrate that matches your theoretical max bandwidth exactly. Wi-Fi throughput moves around from moment to moment. A bitrate with zero margin turns any small dip into a visible stutter, where backing off by even 15-20% would have absorbed it.
- Streaming to a headless host with no display attached and getting a black screen. Windows sometimes refuses to render anything, or renders at the wrong resolution, when it thinks no monitor is connected. A cheap HDMI dummy plug or a virtual display driver solves this, and it is covered in the advanced tips section below.
- Forgetting that a firewall update or a Windows update can silently reset custom firewall rules. If a stream that worked yesterday cannot be found by Moonlight today, checking whether the Sunshine firewall rules are still active is the fastest first diagnostic step, before assuming anything more complicated is wrong.
- Maxing out the NVENC or AMF quality preset thinking higher always means better. As covered in Step 5, the slowest, highest-quality presets add encode latency that you will feel as input lag before you notice any real gain in picture detail on a stream you are actively playing rather than just watching.
Troubleshooting: 10 Sunshine and Moonlight Problems (and Fixes)
Moonlight cannot discover the host on the network. Confirm both devices sit on the same subnet and that mDNS traffic is not being blocked by an isolated guest Wi-Fi network. As a workaround, add the host manually by typing its local IP address into Moonlight instead of waiting for auto-discovery.
The pairing PIN times out or gets rejected. The PIN window is short by design. Have the host’s web UI PIN page open and ready before you tap “pair” on the client, rather than switching over to look for it after the countdown has already started.
The stream connects but shows a black screen. This is almost always a headless-host display issue. Check the advanced tips section for the dummy plug and virtual display fix.
High latency or stutter, but only when streaming outside the LAN. Drop your bitrate for remote sessions specifically. A setting tuned for a gigabit LAN connection is usually too aggressive for a home upload connection, and Moonlight lets you save separate profiles for local versus remote use.
Audio is missing or drifts out of sync with video. Confirm the host’s default playback device matches what Sunshine is capturing from, since a device switch after Sunshine starts can leave it capturing a now-silent audio endpoint. Restarting the Sunshine service after changing default audio devices usually resolves it.
Controller input is not recognized on the client. Moonlight translates controller input through its own virtual gamepad layer, and some games need a restart after the stream begins for that virtual controller to be detected correctly. On Steam Deck specifically, confirm Steam Input is not intercepting the controller before Moonlight gets it.
Stream resolution does not match the client’s actual display. Set the resolution inside Moonlight’s settings menu to match the client screen exactly rather than relying on the host’s current desktop resolution, which may differ if the host runs a different display setup.
The Sunshine service will not start, or crashes right after launch. Check the service logs first. An outdated GPU driver and a port conflict with another application are the two most common culprits. Confirming the ports from Step 8 are not already in use by another program narrows this down quickly:
# Windows: check if a Sunshine port is already bound by something else
Test-NetConnection -ComputerName localhost -Port 47990
# Linux/macOS equivalent
netstat -an | grep 47990
The stream connects fine, then freezes or drops a few minutes in. This pattern usually points to Wi-Fi interference or a router that deprioritizes long-lived UDP streams after some idle heuristic kicks in. Switching the host to a wired connection is the most reliable fix, and if that is not possible, moving both the host and the client onto the 5GHz band rather than 2.4GHz cuts down on the interference that causes this specifically.
The Moonlight app itself crashes or will not launch on the client. This is more common on older Android TV boxes and budget streaming sticks with limited memory. Force-closing other background apps before launching Moonlight, or reinstalling the client entirely, resolves most of these cases, and checking the client device against Moonlight’s minimum OS version for that platform rules out the rest.
Advanced Tips: HDR, Virtual Displays, Controller Mapping, and Wake-on-LAN
HDR passthrough. Sunshine can stream HDR content to a Moonlight client capable of displaying it, but both ends of the chain need to cooperate. Confirm the host’s display or virtual display is running in HDR mode, and that the client device’s HDR toggle inside Moonlight is turned on, before assuming the picture should look wrong. A mismatch here tends to produce washed-out, flat-looking color rather than an outright error.
Virtual displays for headless hosts. If your streaming PC has no monitor physically attached, Windows may refuse to output a proper signal for Sunshine to capture. A cheap HDMI dummy plug, which tricks the GPU into thinking a real display is connected, is the low-tech fix. A more flexible option is a virtual display driver, which creates a display Windows treats as real without any hardware at all, and lets you set a custom resolution and refresh rate that exactly matches whatever client you are streaming to that day.
Controller mapping. Moonlight supports Xbox, DualSense, and Steam Deck controllers through its virtual gamepad layer, and most games see it as a standard Xbox-layout controller regardless of what you are actually holding. If a game does not recognize inputs correctly, checking whether Steam Input, DS4Windows, or a similar remapping layer is intercepting the controller before Moonlight does usually resolves it.
Wake-on-LAN. Sunshine supports waking a sleeping host over the network on most builds, provided your motherboard and network adapter both have Wake-on-LAN enabled in BIOS and in the OS network adapter settings. This means your host PC does not need to sit powered on around the clock waiting for a stream request. Moonlight can send the wake packet directly before attempting to connect, so the whole process from “tap the icon” to “playing” can happen without you touching the host at all.
Multiple clients and multi-monitor hosts. Sunshine can serve more than one paired Moonlight client, though only one stream typically runs at a time unless you have specifically configured multiple virtual displays for concurrent sessions. If your host has more than one monitor attached, the output_name setting in the encoder configuration controls which physical display gets captured, and pointing it at the wrong index is a common reason a stream shows the wrong desktop, or a completely black one if that index does not correspond to an active display at all. Households running more than one handheld off the same desktop should plan around one active stream at a time rather than expecting true simultaneous multi-user sessions out of the box.
A Complete Working Sunshine and Moonlight Project
Putting every step above together, a full working setup for a Windows gaming PC streaming to a Steam Deck over both LAN and Tailscale looks like this once assembled:
# 1. sunshine.conf (host) - core settings after setup
sunshine_name = Living Room PC
encoder = nvenc
adapter_name = NVIDIA GeForce RTX
nvenc_preset = p4
qp = 22
channels = 2
origin_web_ui_allowed = lan
upnp = disabled
# 2. Firewall rules (Windows, elevated PowerShell)
New-NetFirewallRule -DisplayName "Sunshine TCP" -Direction Inbound -Protocol TCP -LocalPort 47984,47989,47990,48010 -Action Allow
New-NetFirewallRule -DisplayName "Sunshine UDP" -Direction Inbound -Protocol UDP -LocalPort 47998-48000,48002 -Action Allow
# 3. Tailscale on host and client (private WAN access, no port forwarding)
tailscale up
# 4. Moonlight client connect (Steam Deck, Desktop Mode)
moonlight pair 100.x.x.x
moonlight stream 100.x.x.x "Steam Big Picture" -1080 -60fps -bitrate 20000
With upnp = disabled and no router port forwarding at all, this configuration never exposes Sunshine’s ports outside your Tailscale mesh. On the home Wi-Fi network, Moonlight discovers and connects to the host directly. Away from home, the same Moonlight profile connects over the Tailscale IP instead, with no separate configuration needed on the client side beyond swapping which address it points at. That single project covers the entire loop this tutorial walks through: install, configure, pair, tune, and secure.
Security Best Practices for Self-Hosted Game Streaming
Treat your Sunshine web UI password the same way you would treat any admin panel exposed on your home network, since it is not a login you want reused from another site. Keep Sunshine itself updated, since the project’s June 2025 security release patched a real vulnerability in the pairing handshake, and rolling releases mean fixes like that ship fast once found. If you do choose port forwarding over a VPN tunnel for remote access, at minimum change Sunshine’s default ports to nonstandard values in sunshine.conf, since default ports are the first thing an automated internet scanner checks. And review the PIN pairing log inside the web UI occasionally. An unfamiliar device name in that list is the clearest early signal that something you did not authorize is trying to reach your PC.
It is also worth separating your streaming host from anything sensitive. If the same PC handles banking, work email, or stores personal documents, treat that as a reason to be more conservative about remote access choices rather than less, since a compromised Sunshine pairing effectively hands over keyboard and mouse control of that entire machine. Running Sunshine behind Tailscale or WireGuard rather than a forwarded port is the single biggest security improvement available here, and it costs nothing beyond the five minutes it takes to install.
Frequently Asked Questions
Is Sunshine free to use?
Yes. Sunshine and Moonlight are both open source and free, with no subscription tier, no paywalled features, and no account required beyond what your client device’s OS itself asks for.
Is streaming my own games with Sunshine legal?
Yes. Sunshine streams a live desktop or application session from a PC you already own to a client device you already own. It does not copy, crack, or redistribute game files, and it requires the game to already be legitimately installed on the host PC.
Does Sunshine work without an Nvidia GPU?
Yes. AMD GPUs use AMF on Windows or VAAPI on Linux, Intel GPUs use QuickSync on Windows or VAAPI on Linux, and Apple Silicon Macs use VideoToolbox. Nvidia is not required at any point in the pipeline.
What is the difference between Sunshine and Steam Link?
Steam Link only streams from and to devices inside Valve’s own ecosystem and is built specifically around Steam’s library. Sunshine and Moonlight streams any application on the host, reaches a far wider range of client platforms, and works regardless of which storefronts you use.
Can I stream to a Steam Deck with Moonlight?
Yes, and moonlight steam deck support is one of the most mature client integrations available, with a native build installable directly in Desktop Mode. Moonlight game streaming to a Steam Deck is one of the most common pairings for a sunshine game streaming host.
Do I need to forward ports to use Moonlight away from home?
No, and this tutorial recommends against it. A VPN tool like Tailscale or WireGuard gives you the same off-network access without exposing Sunshine’s ports directly to the public internet.
How much upload bandwidth do I need for 4K streaming?
Plan for at least 90 Mbps of upload bandwidth at the host for a stable 4K60 stream, more if you are also pushing 4K120. Check the bitrate table above for other resolution and frame rate combinations.
Can Sunshine run headless on a server with no monitor attached?
Yes, using either an HDMI dummy plug or a virtual display driver so the GPU always has a display target to render and encode against, even with nothing physically plugged in.
Related Coverage
- Steam Deck vs Xbox Ally X vs Legion Go S: $450 Gap [2026]
- Lossless Scaling: 2x FPS in 12 Steps, 30 Min [2026]
- 12VHPWR GPU Cable Setup: 10 Steps, 30 Min [2026]
- How to Enable XMP/EXPO RAM: 12 Steps, 40 Min [2026]
- Gaming GPU Prices Surge: RTX 5090 Nears $3,000 [2026]
- CrowdSec: Block Malicious IPs in 12 Steps, 40 Min [2026]
- GeForce NOW’s 100-Hour Cap Hits 6% of Players [2026]


