Start with a working local stream
For remote game streaming, install Sunshine on the computer running the game and Moonlight on the device displaying it. First pair and stream on the same LAN. Once that works, add a private network such as Tailscale and connect Moonlight to the host’s private overlay address.
This order separates capture and encoding problems from remote network problems. A VPN connection alone does not prove that the stream will have acceptable latency.
The host, the client and the network
Sunshine captures and encodes video on the host; Moonlight decodes it and sends input back. Hardware encoder support, display capture permissions, decoder support, and the game’s own frame time all affect the result. Follow the Moonlight setup guide and Sunshine getting started guide for your platform.
Tailscale
Tailscale gives enrolled devices private addresses and attempts to establish a direct connection. When that is unavailable, traffic can use a relay. A successful login or ping is not evidence that the connection is direct.
ZeroTier
ZeroTier is an alternative virtual networking approach. Join both devices to the intended network, authorize them, and use the host’s assigned address in Moonlight. Troubleshoot it independently rather than running two overlays simultaneously and guessing which route carries the stream.
Headscale
Headscale provides a self-hosted coordination service for compatible Tailscale clients. It adds responsibility for server operation, updates, identity, and relay configuration. Self-hosting coordination does not automatically produce a direct or faster media path. Check the Headscale documentation before choosing it.
Why NAT traversal sometimes needs a relay
Routers and firewalls differ in how they map UDP traffic and accept incoming packets. Carrier-grade NAT, restrictive networks, and changing mappings can prevent peers from reaching each other directly. Labels such as “full-cone” or “symmetric” are diagnostic hints, not reliable universal success percentages.
For streaming, the practical question is whether the current host-to-client connection is direct, relayed, or blocked. See Tailscale’s connection types. A relay adds another route segment and may become a throughput or latency bottleneck; measure the actual connection instead of assuming it is unusable.
Check the actual path
With Tailscale installed and connected on both devices, run these on the client, replacing the example address with your host’s Tailscale address:
tailscale status
tailscale ping 100.101.102.103
tailscale netcheck
Read the reported connection type and latency. Initial packets may use a relay while a direct path is negotiated, so inspect subsequent output too. netcheck describes the local network’s connectivity; it does not replace a host-to-client test.
Configure the Tailscale path
- Install Tailscale on the host and client, sign in to the intended tailnet, and confirm both devices are available.
- Check access policy and the host firewall for the intended client-to-host traffic. A device appearing in the device list does not grant every application access.
- Record the host’s Tailscale address and verify connectivity before opening Moonlight.
Use official platform installers and your own network policy. Avoid solving an application firewall problem by disabling the firewall entirely.
Configure Sunshine on the host
Install a platform-supported Sunshine release, configure its capture and encoder, and create credentials through its local web interface. The usual local administration address is https://localhost:47990; consult the installed version’s documentation if it differs.
Keep this administration interface private. It is separate from the game stream and should not be forwarded to the public internet. Finish a LAN pairing and test before changing remote networking settings.
Pair Moonlight
In Moonlight, add the host manually using its Tailscale address if automatic discovery does not find it. Start pairing, then enter the PIN in Sunshine’s interface. Launch an application and test video, sound, and input.
If pairing fails, confirm that Sunshine is running and that the firewall rule applies to the overlay interface. Device discovery broadcasts need not cross the overlay; manual addition avoids relying on them.
Use ZeroTier instead
Keep the same LAN-tested Sunshine and Moonlight configuration. Join and authorize both devices in ZeroTier, test connectivity to the host’s ZeroTier address, and add that address manually in Moonlight. Recheck firewall scope for the new interface.
Operate a Headscale setup
Deploy and secure the coordination service using its documentation, enroll the clients against that service, and verify routing and relay availability. Then repeat the same host reachability and Moonlight pairing checks. Treat this as a network operations choice, not a required streaming optimization.
Tune one variable at a time
Start with a moderate resolution, frame rate, and bitrate that both devices can handle. Compare the Moonlight statistics on the LAN and remotely. Raise quality only after the remote connection is stable.
The host’s upload capacity matters as much as the client’s download speed. Leave room for other traffic, connect the host by Ethernet where possible, and avoid assuming that a high speed-test result guarantees low jitter.
Disconnects or failed connections
Check host sleep settings, Sunshine availability, overlay connectivity, and firewall logs in that order. If the overlay path itself fails, changing the video bitrate will not fix pairing.
High latency
Compare direct and relayed path information, then inspect network delay, dropped frames, host encoding time, and client decoding time separately. Lower the stream load to see which component improves. A codec change can help one decoder and overload another.
Poor image quality
Check the selected resolution, bitrate, codec, and packet loss. Increase bitrate gradually only when bandwidth and latency are stable. For a blurry desktop, also compare host display scaling and the stream resolution.
Check IPv6 without opening everything
Working IPv6 on both sides may help direct connectivity, but an IPv6 address is not proof that an inbound application is reachable. Keep host and router firewall rules in place. Use overlay diagnostics and a real streaming test to assess whether the path improves.
Keep access deliberate
Use a private network with access limited to the devices that need the host. Keep Sunshine, Moonlight, and the overlay client updated. Protect the host’s credentials and remove devices that should no longer connect.
Do not expose the Sunshine administration UI or enable broad router forwarding as a default fix. If you intentionally use internet-facing streaming, follow the separate security and port guidance for that deployment.
A repeatable troubleshooting order
Confirm the LAN stream, verify the remote address, inspect the overlay path, test pairing, and then tune picture quality. Save those observations before changing several settings. This makes a relay problem, an encoder problem, and a firewall problem distinguishable.
References and configuration guidance were reviewed on October 16, 2026. This is a setup and diagnostic guide, not a measured performance result for every network combination.