Prerequisites
Compiler Requirements
It is recommended to use one of the following compilers:Common Tools
All platforms require:- CMake >= 3.25
- Git (for cloning with submodules)
- Ninja or Make (build system)
- Node.js and npm (for Web UI)
Clone the Repository
First, clone the repository with all submodules:--recurse-submodules flag is crucial as Sunshine depends on several third-party libraries included as submodules.
Platform-Specific Dependencies
Linux
Linux
Debian/Ubuntu
Fedora
Arch Linux
Optional: CUDA Toolkit (for NVFBC capture)
Sunshine requires CUDA Toolkit for NVIDIA’s NvFBC (NVIDIA Framebuffer Capture) feature.The CUDA version you use will determine compatibility with various GPU generations. At the time of writing, CUDA ~12.9 is recommended. See CUDA compatibility for more info.
KMS Capture Permissions
If you are using KMS capture, you need to set capabilities on the binary:Windows
Windows
Install MSYS2
- Download and install MSYS2
- Launch the appropriate shell:
- AMD64: MSYS2 UCRT64
- ARM64: MSYS2 CLANGARM64
Update MSYS2
Set Toolchain Variable
Install Dependencies
Optional: .NET SDK (for WiX installer)
To create a WiX installer, install the .NET SDK.macOS
macOS
FreeBSD
FreeBSD
Install Dependencies
Build Instructions
Basic Build
Once dependencies are installed:Build with Custom Options
CMake options can be specified with-D flags:
CMake Build Options
Sunshine provides numerous build options incmake/prep/options.cmake:
Common Options
Linux-Specific Options
Publisher Options
For custom builds, you can set publisher metadata:
Example:
Creating Packages
Sunshine uses CPack for package creation.Remote Build (GitHub Actions)
You can build Sunshine remotely using GitHub Actions:- Fork the Sunshine repository
- Go to the Actions tab in your fork
- Enable workflows if prompted
- Manually trigger the CI workflow
- Download artifacts from the workflow run summary
- Building on platforms you don’t have access to
- Testing cross-platform compatibility
- Creating release packages
Build Troubleshooting
CMake Version Issues
If your system’s CMake is too old:Submodule Issues
If you forgot to clone with--recurse-submodules:
Build Failures
-
Clean build directory:
-
Check compiler version:
-
Verify all dependencies are installed:
Node.js/npm Issues
If Web UI build fails:Next Steps
Architecture
Learn about Sunshine’s internal architecture
Contributing
Start contributing to the project

