Your Raspberry Pi can replace a dedicated game streaming box like an NVIDIA Shield, and this guide shows you exactly how to make it happen. By the end, you’ll have Sunshine running on your gaming PC as the host and Moonlight Qt running on your Pi as the client, streaming your full PC game library to any TV or monitor in your home. The full setup takes under 45 minutes.
TL;DR: Sunshine is an open-source, self-hosted game streaming server that runs on your gaming PC. Moonlight is the client app that runs on your Raspberry Pi and receives the stream. Your PC does all the heavy game processing; the Pi just decodes the video and sends your controller input back. Install both, pair them with a PIN, and you’re streaming.
What You’ll Need Before You Start
Getting your hardware and software lined up first saves you from hitting a wall mid-setup. Here’s what the working configuration requires:
Hardware
- Raspberry Pi 4 or Pi 5 (Pi 4 is the minimum recommended; older models lack reliable hardware video decoding)
- Gaming PC with a dedicated GPU: NVIDIA GTX 900 series or newer, or AMD RX 5000 series or newer
- HDMI cable to connect your Pi to a TV or monitor
- USB or Bluetooth game controller (Xbox, PS4, or PS5 all work)
- MicroSD card with at least 16GB of space
Software
- Raspberry Pi OS 64-bit Bookworm (the current recommended release)
- Sunshine installed on your Windows gaming PC
- Moonlight Qt client installed on your Pi
Network Requirements
- Both devices on the same local network
- Wired Ethernet strongly recommended for the gaming PC
- 5GHz Wi-Fi acceptable for the Pi; avoid 2.4GHz if you can
How Moonlight Streaming Works
Sunshine is an open-source streaming server from the LizardByte project that replaces NVIDIA’s discontinued GameStream service. It runs on your gaming PC, captures the game output, encodes it as H.264 or H.265 video, and sends it across your network. Moonlight Qt is the client app that receives that stream on your Pi, decodes the video, and displays it on your screen.
All the game processing happens on your PC. The Pi only handles video decoding and controller passthrough, which is why even a Pi 4 can handle a 1080p60 stream without breaking a sweat. Sunshine also works with both NVIDIA and AMD GPUs, so you’re not locked into any particular hardware brand.
One thing worth knowing: Moonlight Qt is the current, actively maintained version for Raspberry Pi OS. You may find older references to “Moonlight Embedded” in forum posts and tutorials. That build is outdated and won’t install cleanly on current Pi OS versions. Moonlight Qt is the right choice for 2025.
Installing Sunshine on Your Gaming PC
Download the Sunshine installer from the official LizardByte GitHub releases page. Grab the Windows installer (.exe) for your system. Run it, accept the prompts, and Sunshine will install as a background service that starts automatically with Windows.
Accessing the Sunshine Web Dashboard
After installation, open a browser on your gaming PC and go to https://localhost:47990. Your browser will warn you about a self-signed certificate; click through to proceed. Sunshine will prompt you to create an admin username and password on first launch. Do this now and bookmark the URL — you’ll come back here to manage settings and approve pairing requests.
Configuring Applications in Sunshine
Sunshine auto-detects Steam and adds it to the applications list. You can also add individual game executables manually through the Applications tab in the dashboard. For most setups, pointing Moonlight at Steam Big Picture mode gives you a clean, controller-friendly interface to launch any game in your library.
When Moonlight connects for the first time, a PIN pairing request will appear in the Sunshine web UI. You’ll need to enter that PIN to approve the connection. Keep your browser open to https://localhost:47990 during the pairing step below.
Installing Moonlight Qt on Your Raspberry Pi
Open a terminal on your Pi. You’ll add the official Moonlight Qt repository using this curl command, then install the package:
- Add the Moonlight Qt repository:
curl -1sLf 'https://dl.cloudsmith.io/public/moonlight-game-streaming/moonlight-qt/setup.deb.sh' | sudo -E bash - Update your package list and install Moonlight Qt:
sudo apt update && sudo apt install moonlight-qt - Launch Moonlight Qt from the desktop application menu, or run it directly from the terminal:
moonlight-qt
On both Pi 4 and Pi 5, Moonlight Qt automatically enables hardware-accelerated H.264 decoding. The Pi 5 handles H.265 (HEVC) hardware decoding more reliably than the Pi 4, so if you’re on a Pi 5, you can push higher quality at lower bitrates. On a Pi 4, H.264 is the safer codec choice for a stable stream.
Pairing Moonlight with Sunshine
This is where first-timers often get confused, so pay attention to the sequence here.
How to Pair Your Devices
- Launch Moonlight Qt on your Pi. It will scan your local network and should display your gaming PC as a detected host automatically.
- If your PC doesn’t appear, tap the “+” button and enter your PC’s local IP address manually. You can find this in Windows by running
ipconfigin Command Prompt and looking for the IPv4 address. - Click the PC tile in Moonlight. A 4-digit PIN will appear on your Pi’s screen.
- On your gaming PC, open
https://localhost:47990in your browser. The Pairing section will show a PIN entry field. Type in the 4-digit PIN from your Pi and confirm. - Moonlight will confirm the pairing and show your available applications.
Pairing is a one-time process. After this, Moonlight connects to Sunshine automatically without needing another PIN.
Optimizing Stream Quality and Performance
Getting the settings right makes the difference between a laggy, frustrating experience and one that genuinely feels like playing locally. Open Moonlight’s preferences and adjust these settings:
Recommended Settings by Hardware
| Setting | Pi 4 (Ethernet) | Pi 5 (Ethernet) | Pi 4/5 (5GHz Wi-Fi) |
|---|---|---|---|
| Resolution | 1080p | 1080p or 1440p | 1080p |
| Frame Rate | 60fps | 60fps | 60fps |
| Bitrate | 20–30 Mbps | 20–40 Mbps | 15–20 Mbps |
| Codec | H.264 | H.265 (HEVC) | H.264 |
Enable hardware decoding in Moonlight’s settings. This offloads video decoding to the Pi’s GPU instead of the CPU, which reduces latency and prevents frame drops during fast action. If you see stuttering, reduce bitrate before you reduce resolution. Network congestion is almost always the cause, and dropping from 30 Mbps to 20 Mbps on a Wi-Fi connection often clears it up immediately.
Wired Ethernet eliminates packet loss and jitter that wireless connections introduce. On Wi-Fi, even a single packet retransmission can cause a visible frame stutter. If your Pi is far from the router, a powerline adapter is worth considering over a long Wi-Fi run.
Connecting a Controller and Starting Your First Game
Moonlight passes controller input from the Pi back to the gaming PC transparently. Any USB or Bluetooth controller connected to the Pi appears as a standard gamepad on the Windows host. Xbox controllers work plug-and-play over USB. PS4 and PS5 controllers pair over Bluetooth using the Pi’s built-in Bluetooth radio.
Select the Steam Big Picture tile or any game from the Moonlight app grid and tap to start the stream. Your game will launch on the PC and appear on your Pi’s connected display within a few seconds. To exit the stream cleanly without closing the game on your PC, press Start + Select simultaneously (or the quit shortcut shown in Moonlight’s settings). The game keeps running on your PC, ready to resume.
Troubleshooting Common Setup Issues
PC Not Appearing in Moonlight
Confirm Sunshine is running on your PC (check the system tray). Windows Firewall sometimes blocks the ports Sunshine needs: 47984, 47989, and 48010. Add inbound rules for these ports in Windows Defender Firewall, or temporarily disable the firewall to test. Also confirm both devices are on the same subnet — a guest Wi-Fi network on the Pi will prevent auto-discovery.
High Latency or Stuttering Stream
Switch your Pi to a wired Ethernet connection if possible. If you’re already wired, reduce the stream bitrate in Moonlight’s settings by 5–10 Mbps increments until the stuttering stops. Check that no other device on your network is saturating the connection during your session.
Black Screen After Connecting
Sunshine requires an active display output on the PC to capture. If your PC monitor is off or the PC is running headless, Sunshine can’t grab a screen to stream. A virtual display driver installed on the PC solves this by creating a software display that Sunshine can capture even when no physical monitor is connected.
Frequently Asked Questions
Can I stream PC games to a Raspberry Pi?
Yes. Using Sunshine on your gaming PC and Moonlight Qt on your Raspberry Pi 4 or Pi 5, you can stream PC games over your local network at 1080p60. The Pi handles video decoding; your PC runs the game.
Does Moonlight work on Raspberry Pi?
Moonlight Qt works on Raspberry Pi 4 and Pi 5 running 64-bit Raspberry Pi OS Bookworm. Both models support hardware-accelerated H.264 decoding. The Pi 5 adds reliable H.265 hardware decoding for better quality at lower bitrates.
What do I need to stream games from my PC to my TV?
You need a gaming PC with a dedicated GPU, a Raspberry Pi 4 or 5 connected to your TV via HDMI, Sunshine installed on the PC, and Moonlight Qt installed on the Pi. Both devices need to be on the same local network, with wired Ethernet recommended for the PC.
Is Moonlight better than Steam Link for Raspberry Pi?
Moonlight gives you more control over codec selection, bitrate, and resolution settings, and it works with both NVIDIA and AMD GPUs without depending on Steam being open. Steam Link is simpler to set up but locks you into the Steam platform. For makers who want a configurable, hardware-agnostic streaming setup, Moonlight is the stronger choice.
Once your streaming setup is running, the natural next step is building a dedicated Pi gaming enclosure with a controller mount for a clean living room setup, or configuring Moonlight for remote streaming outside your home network using a VPN. Either direction turns this project into something genuinely impressive. Drop a comment below sharing which game you streamed first, or ask if you hit a snag during setup.

Simon Gregory, a seasoned Raspberry Pi enthusiast and IoT innovator, brings a wealth of knowledge to Pi Beginners. With a background in computer science and a passion for teaching, Simon simplifies complex concepts, making Raspberry Pi accessible to all. His articles not only guide but inspire readers to explore the limitless possibilities of Raspberry Pi in the IoT realm.
