- C++ 75.7%
- CMake 4.9%
- HTML 4.6%
- Vue 3.3%
- Objective-C++ 3.1%
- Other 8.3%
|
All checks were successful
build-arch-package / package (push) Successful in 15m48s
Two changes that together make a global prep command track the device on the other end of the stream rather than whichever one happened to launch the app. Export the verified client identity. SUNSHINE_CLIENT_* carries nothing identifying today, and the only client-identifying value Sunshine has on hand, "uniqueid", is an unauthenticated query parameter. nvhttp already resolves the TLS client certificate to a paired device in order to honour per-device enable/disable, so record that device at verify() time and hand its name and UUID down as SUNSHINE_CLIENT_NAME / SUNSHINE_CLIENT_UUID. The handlers are only given a Request -- Request::connection and Response::session are private and the friendship reaching them is not inherited -- so the identity is captured at accept() and looked up through a side map keyed on the Request. Every nvhttp handler sets close_connection_after_response, so Simple-Web-Server never reuses a Session and that key maps 1:1 onto a verified connection; the entry also holds a weak_ptr to its Request, so a recycled address fails to "unknown" rather than to the wrong client. A certificate that verifies without being in the paired list, and a device with no name, both stay allowed and simply yield empty strings. Optionally re-run the global prep commands on resume. Prep commands run on /launch but not /resume, so a host that switches display mode from SUNSHINE_CLIENT_WIDTH/HEIGHT is stuck on the first client's mode for every later client that resumes rather than relaunches -- switching from a 1080p laptop to a 2560x1600 tablet without quitting the app leaves the tablet upscaling the laptop's mode, and nothing in any log says why. New global_prep_cmd_on_resume, default off because prep commands have paired do/undo semantics and are not required to be idempotent. Only the "do" half of the commands that came from global_prep_cmd runs; the app's own prep commands and every "undo" are left alone, _app_prep_it is not moved so terminate()'s unwind is unchanged, and a failure is logged rather than aborting a resume for an app that is already running. The global commands are identified by the count recorded at parse time rather than by re-reading config::sunshine.prep_cmds, which keeps $(VAR) expansion and exclude-global-prep-cmd behaving exactly as they do at launch. |
||
|---|---|---|
| .forgejo/workflows | ||
| .github | ||
| cmake | ||
| dist | ||
| docker | ||
| docs | ||
| gh-pages-template | ||
| packaging | ||
| scripts | ||
| src | ||
| src_assets | ||
| tests | ||
| third-party | ||
| tools | ||
| .clang-format | ||
| .dockerignore | ||
| .flake8 | ||
| .gitattributes | ||
| .gitignore | ||
| .gitmodules | ||
| .prettierrc.json | ||
| .readthedocs.yaml | ||
| .rstcheck.cfg | ||
| CMakeLists.txt | ||
| crowdin.yml | ||
| DOCKER_README.md | ||
| LICENSE | ||
| NOTICE | ||
| package-lock.json | ||
| package.json | ||
| pyproject.toml | ||
| README.md | ||
| renovate.json | ||
| sunshine.ico | ||
| sunshine.png | ||
| sunshine.svg | ||
| vite.config.js | ||
Sunshine
Self-hosted game stream host for Moonlight.
ℹ️ About
Sunshine is a self-hosted game stream host for Moonlight. Offering low-latency, cloud gaming server capabilities with support for AMD, Intel, and Nvidia GPUs for hardware encoding. Software encoding is also available. You can connect to Sunshine from any Moonlight client on a variety of devices. A web UI is provided to allow configuration, and client pairing, from your favorite web browser. Pair from the local server or any mobile device.
LizardByte has the full documentation hosted on Read the Docs
🎮 Feature Compatibility
| Feature | FreeBSD | Linux | macOS | Windows |
|---|---|---|---|---|
|
What type of gamepads can be emulated on the host. Clients may support other gamepads. |
||||
| DualShock / DS4 (PlayStation 4) | ➖ | ➖ | ❌ | ✅ |
| DualSense / DS5 (PlayStation 5) | ❌ | ✅ | ❌ | ❌ |
| Nintendo Switch Pro | ✅ | ✅ | ❌ | ❌ |
| Xbox 360 | ➖ | ➖ | ❌ | ✅ |
| Xbox One/Series | ✅ | ✅ | ❌ | ❌ |
| Encoding API | GPU Vendor | FreeBSD | Linux | macOS | Windows |
|---|---|---|---|---|---|
| AMF | AMD | ➖ | ➖ | ➖ | ✅ |
| Media Foundation | Qualcomm | ➖ | ➖ | ➖ | ✅ |
| NVENC | NVIDIA | ➖ | ✅ | ➖ | ✅ |
| QuickSync | Intel | ➖ | ➖ | ➖ | ✅ |
| VAAPI | AMD | ✅ | ✅ | ➖ | ➖ |
| Intel | ✅ | ✅ | ➖ | ➖ | |
| NVIDIA | ➖ | ✅ | ➖ | ➖ | |
| Video Toolbox | Apple | ➖ | ➖ | ✅ | ➖ |
| Intel | ➖ | ➖ | ✅ | ➖ | |
| Vulkan Video | AMD | 🟡 | ✅ | ➖ | ➖ |
| Intel | 🟡 | 🟡 | ➖ | ➖ | |
| NVIDIA | ➖ | 🟡 | ➖ | ➖ | |
| Software | Any | ✅ | ✅ | ✅ | ✅ |
| Capture Method | FreeBSD | Linux | macOS | Windows |
|---|---|---|---|---|
| DXGI Desktop Duplication | ➖ | ➖ | ➖ | ✅ |
| KMS/DRM | ✅ | ✅ | ➖ | ➖ |
| NvFBC (X11 only) | ➖ | ✅ | ➖ | ➖ |
| ScreenCaptureKit | ➖ | ➖ | ✅ | ➖ |
| Wayland (wlroots) | ✅ | ✅ | ➖ | ➖ |
| Windows.Graphics.Capture | ➖ | ➖ | ➖ | 🟡 |
| ↳ Portable | ➖ | ➖ | ➖ | ✅ |
| ↳ Service | ➖ | ➖ | ➖ | ❌ |
| X11 | ✅ | ✅ | ➖ | ➖ |
| XDG Desktop Portal | ✅ | ✅ | ➖ | ➖ |
| KWin Screencast | ✅ | ✅ | ➖ | ➖ |
| Capture Method | VAAPI | Vulkan Video | NVENC (CUDA) | Software |
|---|---|---|---|---|
| KMS/DRM | ✅ | ✅ | ✅ | ✅ |
| NvFBC | ❌ | ❌ | ✅ | ❌ |
| Wayland (wlroots) | ✅ | ❌ | ✅ | ✅ |
| X11 | ✅ | ❌ | ✅ | ✅ |
| XDG Desktop Portal | ✅ | ✅ | ✅ | ✅ |
| KWin Screencast | ✅ | ✅ | ✅ | ✅ |
Legend: ✅ Supported | 🟡 Partial Support | ❌ Not Yet Supported | ➖ Not Applicable
🖥️ System Requirements
Warning
These tables are a work in progress. Do not purchase hardware based on this information.
| Component | Requirement |
|---|---|
| GPU | AMD: VCE 1.0 or higher, see: obs-amd hardware support |
|
Intel: FreeBSD/Linux: VAAPI-compatible, see: VAAPI hardware support Windows: Skylake or newer with QuickSync encoding support |
|
| Nvidia: NVENC enabled cards, see: nvenc support matrix | |
| CPU | AMD: Ryzen 3 or higher |
| Intel: Core i3 or higher | |
| RAM | 4GB or more |
| OS | FreeBSD: 14.4+ |
| Linux/Debian: 13+ (trixie) | |
| Linux/Fedora: 43+ | |
| Linux/Ubuntu: 22.04+ (jammy) | |
| macOS: 14.2+ | |
| Windows: 11+ (Windows Server does not support virtual gamepads) | |
| Network | Host: 5GHz, 802.11ac |
| Client: 5GHz, 802.11ac |
| Component | Requirement |
|---|---|
| GPU | AMD: Video Coding Engine 3.1 or higher |
|
Intel: FreeBSD/Linux: HD Graphics 510 or higher Windows: Skylake or newer with QuickSync encoding support |
|
|
Nvidia: FreeBSD/Linux: GeForce RTX 2000 series or higher Windows: Geforce GTX 1080 or higher |
|
| CPU | AMD: Ryzen 5 or higher |
| Intel: Core i5 or higher | |
| Network | Host: CAT5e ethernet or better |
| Client: CAT5e ethernet or better |
| Component | Requirement |
|---|---|
| GPU | AMD: Video Coding Engine 3.4 or higher |
| Intel: HD Graphics 730 or higher | |
| Nvidia: Pascal-based GPU (GTX 10-series) or higher | |
| CPU | AMD: Ryzen 5 or higher |
| Intel: Core i5 or higher | |
| Network | Host: CAT5e ethernet or better |
| Client: CAT5e ethernet or better |
❓ Support
Our support methods are listed in our LizardByte Docs.
💲 Sponsors and Supporters
👥 Contributors
Thank you to all the contributors who have helped make Sunshine better!
GitHub
CrowdIn
| Previous | Next |
|---|---|
| Getting Started |