Sunshine fork: wlgrab Vulkan HW-encode capture path for RDNA4 (no VAAPI), packaged as sunshine-vulkan
  • C++ 75.7%
  • CMake 4.9%
  • HTML 4.6%
  • Vue 3.3%
  • Objective-C++ 3.1%
  • Other 8.3%
Find a file
gabrielgad 5eb88fd508
All checks were successful
build-arch-package / package (push) Successful in 15m48s
prep cmds: follow the client that is actually connected
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.
2026-08-21 10:08:00 -04:00
.forgejo/workflows dist: anchor the CI capture-path canary on the symbol 2026-08-07 06:32:31 -04:00
.github build: bump freebsd version to 14.4 and build-deps to v2026.516.30821 (#5129) 2026-05-16 10:38:33 -04:00
cmake main: name the threads that are still alive when shutdown stalls 2026-08-18 07:24:42 -04:00
dist prep cmds: follow the client that is actually connected 2026-08-21 10:08:00 -04:00
docker build(linux): add ubuntu 26.04 support (#5051) 2026-05-06 23:59:05 -04:00
docs prep cmds: follow the client that is actually connected 2026-08-21 10:08:00 -04:00
gh-pages-template fix(gh-pages): style fixes for theme switcher (#4748) 2026-02-19 21:28:26 -05:00
packaging dist: retry the submodule fetch instead of failing on one bad minute 2026-08-05 18:59:26 -04:00
scripts build(macos): configure C++ standard and ICU root (#5101) 2026-05-13 19:01:34 -04:00
src prep cmds: follow the client that is actually connected 2026-08-21 10:08:00 -04:00
src_assets prep cmds: follow the client that is actually connected 2026-08-21 10:08:00 -04:00
tests main: name the threads that are still alive when shutdown stalls 2026-08-18 07:24:42 -04:00
third-party build: bump freebsd version to 14.4 and build-deps to v2026.516.30821 (#5129) 2026-05-16 10:38:33 -04:00
tools build(macos): configure C++ standard and ICU root (#5101) 2026-05-13 19:01:34 -04:00
.clang-format chore: update global workflows (#4216) 2025-08-30 23:09:06 -04:00
.dockerignore dist: keep makepkg output out of the build context 2026-08-17 12:58:35 -04:00
.flake8 chore: update global workflows (#3907) 2025-06-12 20:42:08 -04:00
.gitattributes ci: use actionlint and problem matchers (#4116) 2025-07-29 22:08:30 -04:00
.gitignore dist/arch: make install.sh refuse the three ways it shipped a dead host 2026-08-07 08:19:57 -04:00
.gitmodules feat(capture/linux): add KWin direct screencast capture method (#5009) 2026-05-04 20:58:35 -04:00
.prettierrc.json Fixed Formatting of HTML pages, added Prettier Support 2021-08-17 19:12:15 +02:00
.readthedocs.yaml build(deps): bump third-party/doxyconfig from 671b494 to 6d145da (#2979) 2024-08-07 23:07:51 +00:00
.rstcheck.cfg Documentation Update: Add linux ssh guide (#1527) 2023-09-14 13:42:35 -04:00
CMakeLists.txt build(macos): configure C++ standard and ICU root (#5101) 2026-05-13 19:01:34 -04:00
crowdin.yml chore(l10n): update translations (#3582) 2025-06-27 20:45:10 -04:00
DOCKER_README.md ci(linux): migrate Archlinux build to GitHub workflow (#4478) 2025-12-07 09:01:57 -05:00
LICENSE Create LICENSE 2020-02-09 22:54:06 +01:00
NOTICE NOTICE file added with Steam trademarks notice 2022-02-03 22:15:13 +01:00
package-lock.json chore(deps): update dependency @vitejs/plugin-vue to v6.0.7 (#5122) 2026-05-15 08:50:34 -04:00
package.json chore(deps): update dependency @vitejs/plugin-vue to v6.0.7 (#5122) 2026-05-15 08:50:34 -04:00
pyproject.toml chore(deps): update dependency setuptools to v81 (#5003) 2026-04-16 21:17:25 -04:00
README.md build: bump freebsd version to 14.4 and build-deps to v2026.516.30821 (#5129) 2026-05-16 10:38:33 -04:00
renovate.json chore: update global workflows (#5126) 2026-05-15 18:53:56 -04:00
sunshine.ico Update sunshine.ico 2022-03-15 22:30:01 -04:00
sunshine.png Remove white background from png logo 2022-04-28 18:20:53 -04:00
sunshine.svg add tray icon (#1035) 2023-03-15 16:30:18 -04:00
vite.config.js feat(web-ui): add logout (#5121) 2026-05-14 23:23:02 -04:00

Sunshine icon

Sunshine

Self-hosted game stream host for Moonlight.

GitHub stars GitHub Releases Docker GHCR Flathub installs Flathub Version Winget Version Gurubase GitHub Workflow Status (CI) GitHub Workflow Status (localize) Read the Docs Codecov

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

Gamepad Emulation
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
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
Screen Capture
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 → Encoding Compatibility (Linux/FreeBSD)
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.

Minimum Requirements
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
4k Suggestions
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
HDR Suggestions
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

Sponsors

👥 Contributors

Thank you to all the contributors who have helped make Sunshine better!

GitHub

GitHub contributors

CrowdIn

CrowdIn contributors

Previous Next
Getting Started
[TOC]