Sunshine binaries are built using CMake and requires cmake > 3.25.
It is recommended to use one of the following compilers:
| Compiler | Version |
|---|---|
| GCC | 14+ |
| Clang | 17+ |
| Apple Clang | 15+ |
Boost 1.89.0 or newer can be supplied as a system package. When a compatible system package is unavailable, CMake downloads the project-locked Boost release through CPM. Static Boost libraries are preferred on every platform by default; pass -DBOOST_USE_STATIC=OFF to use shared system libraries instead.
Sunshine's build and packaging automation uses packaged static Boost libraries on Arch Linux, Fedora 44 or newer, Ubuntu 26.04 or newer, macOS with Homebrew, Windows with MSYS2, and FreeBSD. Older supported distributions continue to use the CPM fallback because their repositories do not meet the minimum Boost version.
When the prebuilt FFmpeg package supplies libva, Sunshine uses its bundled headers, core library, and DRM backend together. These components share a private display-context ABI and must come from the same libva build. The system still provides libdrm and the GPU's VA-API driver. FFmpeg packages without bundled libva use the system libva libraries.
Sunshine releases publish the platform-independent Web UI as the @lizardbyte/sunshine package to npm and GitHub Packages. The package contains the production assets under build/assets/web, so downstream packagers can install the Web UI without running Node.js or Vite during the native Sunshine build.
Use LLVM 19 when configuring a local FreeBSD build:
Dependencies vary depending on the distribution. You can reference our linux_build.sh script for a list of dependencies we use in Debian-based, Fedora-based and Arch-based distributions. Please submit a PR if you would like to extend the script to support other distributions.
If you are using KMS, patching the Sunshine binary with setcap is required. Some post-install scripts handle this. If building from source and using the binary directly, this will also work:
When building Sunshine for a system with an NVIDIA GPU, install the CUDA Toolkit before configuring or compiling Sunshine. CUDA support is selected at compile time and is used for NVFBC capture and direct GPU-memory NVENC encoding. This applies to every source build, including builds made through the AUR or for third-party repositories such as Omarchy. Installing the CUDA Toolkit after Sunshine was compiled does not enable CUDA support; Sunshine must be rebuilt.
There are two caveats to CUDA:
You can either use Homebrew or MacPorts to install dependencies.
If there are issues with an SSL header that is not found:
Apple Silicon
First, you need to install MSYS2.
For AMD64 startup "MSYS2 UCRT64" (or for ARM64 startup "MSYS2 CLANGARM64") then execute the following commands.
For UCRT64:
For CLANGARM64:
Static Qt is enabled by default on Windows. Sunshine automatically adds the MSYS2 static Qt prefix at ${MINGW_PREFIX}/qt6-static when that package is installed. If an IDE does not inherit MINGW_PREFIX, Sunshine derives the same prefix from the selected compiler. If static Qt is installed in a custom location, specify it with -DCMAKE_PREFIX_PATH=/path/to/qt6-static.
To use dynamic Qt instead, configure with -DSUNSHINE_USE_STATIC_QT=OFF and ensure the dynamic Qt package is available through the normal toolchain prefix.
To create a WiX installer, you also need to install .NET.
To build the frontend, install native Node.js for the target architecture. The MSYS2 Node.js package is not supported because its shared runtime cannot load the native binding required by Rolldown.
Ensure git is installed on your system, then clone the repository using the following command:
pkg
rpm
DragNDrop
Windows
Portable
It may be beneficial to build remotely in some cases. This will enable easier building on different operating systems.