Moonlight is a game streaming client: your PC renders the picture, your Recalbox displays it and sends the pad input back. Streamed games show up like any other game in EmulationStation, artwork included.
Moonlight is available on Raspberry Pi 3, Pi Zero 2, Pi 4/400, Pi 5/500 and PC (x86_64). It is not offered on the Anbernic handhelds (RG351x, RG353x).
On the PC side you need a server to capture and encode the picture. Historically that was NVIDIA GameStream — but NVIDIA discontinued it in 2023. Its successor is Sunshine, free and open source, which works with every graphics card (AMD, Intel, NVIDIA) on Windows, Linux and macOS.
With Sunshine you can go up to 4K/120 fps, with HDR and VRR depending on your hardware, and stream a game, the whole desktop or a launcher (Steam Big Picture, Playnite…).
Everything is done with three commands, typed over SSH on the Recalbox. Always use the full path.
/recalbox/scripts/moonlight/Moonlight.sh find
The command lists the servers found on the local network, with their name and IP address.
/recalbox/scripts/moonlight/Moonlight.sh pair <host>
Replace <host> with the PC's name or IP address. A four-digit PIN is printed at the end of the command: enter it in Sunshine's web interface — open https://<PC-address>:47990 in a browser (accept the certificate warning), go to the PIN tab, type the code, give the device a name and confirm with Send.
If pairing fails with the machine name, try again with its static IP address: that is by far the most common case.
/recalbox/scripts/moonlight/Moonlight.sh init <host>
Recalbox queries the PC, creates one entry per game or application declared in Sunshine, and fetches the artwork. The Moonlight system then appears in the system list; launching a game starts the stream.
To reset everything for a host (pairing, configuration and game entries):
/recalbox/scripts/moonlight/Moonlight.sh clean <host>
Everything that shows up in Recalbox comes from Sunshine's Applications tab. Add one application per game or launcher you want to see in the list, then run init again.
Two useful command examples:
"D:\Games\Steam\steam.exe" -bigpicture
"C:\Users\<user>\AppData\Local\Playnite\Playnite.FullscreenApp.exe" --hidesplashscreen --startfullscreen
Video decoding is hardware accelerated, with a setup tailored to each board:
| Board | Decoding | Codec |
|---|---|---|
| Raspberry Pi 5 / 500 | V4L2 DRM | HEVC |
| Raspberry Pi 4 / 400 | V4L2 DRM | HEVC |
| Raspberry Pi 3, Pi Zero 2 | MMAL | H.264 |
| PC (x86_64) | automatic | HEVC |
Up to four players are supported, as well as keyboard and mouse. Recalbox automatically forwards your pad configuration to Moonlight.
To force a streaming session to close, use the keyboard combination CTRL + ALT + SHIFT + Q.
/recalbox/share/system/configs/moonlight/
├── moonlight-<host>.conf (host address and settings)
├── keydir-<host>/ (pairing certificates)
└── gamelist.txt (entry ↔ Sunshine application mapping)
/recalbox/share/roms/moonlight/<host>/
└── <game>.moonlight (one entry per game)
Streaming from a remote PC is possible, but it requires port forwarding on your router and a decent upload speed on the PC side. Follow the official Moonlight guide, then set the public address in the moonlight-<host>.conf file.
For advanced users only: on a local network, always prefer a wired link — far simpler and far more stable.