Skip to content
Bytearium

No ads or affiliate links active

Networking

Game streaming at home: Sunshine and Moonlight

Game streaming at home with Sunshine and Moonlight: pick the encoder, cable the host and play remotely over a VPN instead of open router ports.

Your gaming PC lives under the desk, but tonight you want to play on the sofa. Carrying the whole tower to the TV is one option. Sending only the picture over your network is the one your back prefers.

The short answer

How do you stream games from your PC to a TV, handheld or laptop? Install Sunshine on the gaming PC as the host and Moonlight on the device you play on as the client. Sunshine captures the screen, encodes it with the graphics card's hardware encoder and sends it over the network; Moonlight decodes it and sends your controller input back [1][7]. Both are free and open source [1][9]. At home, use a cable for at least one side. Away from home, connect through a VPN instead of opening ports on your router.

How it works

  1. Why Sunshine and not GameStream. Moonlight began as an open-source client for NVIDIA's GameStream protocol [9]. NVIDIA announced the end of GameStream in late 2022; an update planned from mid-February 2023 was to remove it from the NVIDIA Games app on SHIELD devices [8][11]. According to the Moonlight project, NVIDIA's newer NVIDIA app no longer supports GameStream and removes GeForce Experience when you install it [8]. Moonlight therefore recommends Sunshine as the host [7][9].
  2. Sunshine on the host. Sunshine runs on Windows, Linux, macOS and FreeBSD and supports hardware encoding on AMD, Intel and NVIDIA GPUs; software encoding is also available [1]. On Windows it uses NVENC (NVIDIA), AMF (AMD) and Quick Sync (Intel); on Linux mainly VA-API, NVENC and Vulkan Video [1]. As of 25 Oct 2026, the newest stable release is v2026.1017.185028 of 17 Oct 2026 [5]. Two September releases carried security fixes, one marked critical and one high-severity for Linux hosts [5]. So update an older installation before anything else.
  3. The web interface. After installation, Sunshine opens its configuration page at https://localhost:47990/. Your browser warns about the certificate; Moonlight's guide says you can ignore that warning here [6]. On first start you create an account. Do it carefully: anyone with access to this interface can add new clients to your PC [6].
  4. Pairing. Moonlight usually finds the host on the same network by itself; otherwise you enter its IP address. Moonlight shows a PIN, and you enter it on Sunshine's PIN page [6]. Each Moonlight client generates its own key during pairing, and there is no online account in between [7]. Sunshine comes with Steam and the desktop as ready-made entries; you add other games and apps in the web interface [6].
  5. Moonlight on the client. Official Moonlight clients exist for Windows, macOS, Linux, Raspberry Pi 4, Steam Link hardware, Android, Amazon Fire devices, iOS, Apple TV and ChromeOS. The community maintains ports for other devices, such as Xbox consoles and some smart TVs [7][9]. The PC client streams up to 4K with HDR on a capable client and up to 120 FPS [9]. As of 25 Oct 2026, Moonlight PC is at v6.2.0 of 4 Oct 2026, with Windows, macOS and Linux builds (Flatpak, Snap, AppImage) [10].

Encoder and codec

The encoder is the part of the graphics card that compresses video without loading the shader cores. Sunshine can send H.264, HEVC and AV1 [1][8]. AV1 is the newest of the three. NVIDIA lists AV1 encoding for the GeForce RTX 40 and 50 series, not for RTX 30 or older [12]. AMD advertises AV1 encoding for the Radeon RX 7000 series [14], Intel lists AV1 encoding for Arc GPUs [15]. The client has to decode the same codec, so check its specifications too. If the client cannot decode AV1 in hardware, HEVC or H.264 is the safer choice.

What the host and network need

Sunshine's own requirement table names, among other things, an NVENC-capable NVIDIA card, AMD VCE 1.0 or newer, or Intel Quick Sync from Skylake onwards on Windows, plus 4 GB of RAM and Windows 11 or newer, Ubuntu 22.04 or newer, Debian 13 or newer or Fedora 43 or newer [1]. For the network it asks for 5 GHz Wi-Fi to 802.11ac on host and client; for 4K it suggests CAT5e Ethernet or better on both sides [1]. Sunshine warns that these tables are a work in progress and that you should not buy hardware based on them [1]. We follow that warning and name no products.

Ports, and why they stay closed

By default Sunshine uses TCP 47984, 47989, 47990 (the web interface) and 48010, plus UDP 47998 to 48000 for video, control and audio [3][4]. These ports only need to be reachable inside your home network. Sunshine's UPnP option, which would open them on the router automatically, is off by default [2]. Moonlight's guide presents this UPnP option as the automatic way to set up streaming over the Internet [6]. We recommend against it, because it exposes the host's ports to the whole Internet. The web interface is limited to devices in the local network by default (origin_web_ui_allowed = lan) [2]. Leave it that way.

Streaming from outside: VPN instead of port forwarding

For remote play, put host and client into the same private network. Moonlight's guide describes Tailscale and ZeroTier for this [6]. With Tailscale, check that the connection is direct: run tailscale ping <device>. If the answer still comes "via DERP" after a few pings, the devices talk through a shared relay server, and Moonlight's guide says you will not be able to stream between them [6]. Choose a bitrate in Moonlight that is at least 1 Mbps below your home upload speed [7]. Moonlight's FAQ says that full encryption is used by default for capable devices when streaming over the Internet [7]. Waking the PC from outside does not work with every router; Moonlight recommends leaving it awake if you want to stream remotely [7].

Controllers on Windows

Since the Sunshine releases of September 2026, full virtual gamepad support on Windows requires the separately installed Virtual HID Driver with a paid licence; lifetime and yearly options are available [5]. The free ViGEmBus remains a limited fallback for Xbox 360 and DualShock 4 emulation and is no longer bundled [1][5]. We do not know the licence price; check it in Sunshine's web interface before you rely on PlayStation-style controller features.

A worked setup

This is an example setup, not a test. We have not measured latency or picture quality.

  • Host: desktop PC with a GeForce RTX 40 card, Windows 11, connected to the router by cable.
  • Client 1: laptop on 5 GHz Wi-Fi in the living room, Moonlight PC v6.2.0.
  • Client 2: phone on mobile data when travelling, with Tailscale on phone and host.

At home, HEVC is the starting point and AV1 an option if the laptop can decode it in hardware. When travelling, assume an invented upload speed of 40 Mbps at home: following Moonlight's rule, the bitrate stays at 39 Mbps or below, and on mobile data you lower it further [7]. If the stream stutters, open Moonlight's performance overlay, which shows the host's capture and encoding latency [8], and check Wi-Fi before you blame the graphics card.

Checklist

  • Update Sunshine to the current release and note the version.
  • Create the web interface account and keep origin_web_ui_allowed at lan.
  • Pair every client at home with a PIN.
  • Connect the host by cable and the client by cable or 5 GHz Wi-Fi.
  • Pick the codec that both host and client support in hardware.
  • Leave UPnP off in Sunshine and on the router, and forward no streaming ports.
  • Use Tailscale or ZeroTier for remote play and check with tailscale ping that the connection is direct.
  • Set the remote bitrate at least 1 Mbps below your upload speed.
  • Remove clients you no longer use in Sunshine's web interface.

Related pages: LAN, Wi-Fi or powerline: what lowers ping?; WireGuard or Tailscale; UPnP; Media server transcoding; A mini PC for your homelab; Wake-on-LAN; CGNAT.

Primary sources

These sources are the basis of this page. That does not mean every claim was checked individually; whether a review record exists is shown above under “Status”. The interpretation and checklist are our own work.

There is no documented review record for this version yet. The text relies on the sources listed.

How this page was made: Bytearium creates these pages with the help of AI and is responsible for publishing them. AI can be wrong, so we show our sources and review status openly.

  1. LizardByteSunshine
  2. LizardByteSunshine documentation, Configuration
  3. LizardByteSunshine documentation, Docker
  4. LizardByteSunshine documentation, Advanced Usage
  5. LizardByteReleases, LizardByte/Sunshine
  6. Moonlight projectSetup Guide
  7. Moonlight projectFrequently Asked Questions
  8. Moonlight projectNVIDIA GameStream End Of Service Announcement FAQ
  9. Moonlight projectMoonlight Game Streaming
  10. Moonlight projectReleases, moonlight-stream/moonlight-qt
  11. The VergeNvidia ends support for its GameStream feature on Shield devices
  12. NVIDIACompare Current and Previous GeForce Series of Graphics Cards
  13. NVIDIAVideo Codec SDK
  14. AMDAMD Radeon RX 7000 Series Graphics Cards
  15. IntelVideo Codecs Supported by Intel Arc GPUs

This page has no ads and no affiliate links.