Plugins automate setup that would otherwise be done with preparation commands. A plugin bundles the scripts that run when a stream starts and stops, a step that downloads whatever the scripts depend on, and a set of options you can change from the web UI.
Note
Plugins currently run PowerShell scripts and are only supported on Windows.
Open the Plugins page in the web UI. Each plugin can be:
- Installed — Install & Activate runs the plugin's install script, which downloads its dependencies, and activates the plugin once the script succeeds. The output is shown under View log.
- Activated — an active plugin runs for every application. Use the Active switch to turn it off or back on without uninstalling. To skip a plugin for one application, uncheck it under Plugins when editing that application, or select Apps & plugins to see every application against every active plugin. In that grid, the checkbox next to an application or under a plugin changes the whole row or column.
- Configured — change the plugin's options and select Save options. The new values apply to the next stream. Some options take effect right away by running a script as administrator. If that script fails, the card shows the failure, nothing is saved, and you can select Save options again once the problem is fixed.
- Tested — some plugins add buttons to their card, such as Start test, and a live view below them. A button runs one of the plugin's scripts right away, as administrator; its output is shown under View log.
- Reinstalled — Reinstall runs an installed plugin's install script again, keeping its options and whether it's active. A plugin needs this when its version changes: its page shows Reinstall needed, and it doesn't run for streams or add client commands until it's reinstalled. Bundled plugins change only when Sunshine is updated, so Sunshine reinstalls them itself when it starts, once someone is signed in. If that fails, the plugin's page shows the failure and its log, and you can select Reinstall to try again. A custom plugin imported again with a new version waits for you to select Reinstall.
- Uninstalled — deactivates the plugin, runs its uninstall script, and deletes the files it downloaded.
Active plugins run before the global and application preparation commands, in plugin order. Their undo scripts run after the preparation commands are undone, in reverse order. If a plugin's do script fails, the application is not started, just as with a failing preparation command.
A plugin can also have connect and disconnect scripts, which run like preparation commands with the connect
type: the connect script runs when a client resumes the running application, and the disconnect script runs when
the last client leaves it running. They see the frame rate and other SUNSHINE_CLIENT_* values of the client that
is resuming.
A plugin's options can differ for an application or a client:
- For an application — when editing the application, select Settings next to the plugin under Plugins.
- For a client — on the Clients + PIN page, select Edit next to the device, then Settings next to the plugin. Uncheck a plugin there to turn it off for the device's streams.
Turn on Override next to an option to give it a value of its own. The plugin's own value applies unless the
application overrides it, and the client's value wins over both. The Plugins page marks the options that are overridden
somewhere with * and says how many applications and clients override them. Some options can't be overridden, such as
those that change a driver or only make sense for the whole host.
The do and undo scripts use the settings of the client that started the application, even when another client resumes it later. The connect and disconnect scripts use the settings of the client resuming it. Unpairing a client removes its settings.
| Plugin | What it does |
|---|---|
| Virtual Display | Creates a virtual display matching the client's resolution and frame rate using sunshine-vdisplay, and removes it when the stream ends. The refresh rate can be a multiple of the client frame rate. Each client gets its own virtual monitor unless Shared virtual monitor for all clients is on. Start the stream on a new desktop creates a temporary Windows desktop first using the VirtualDesktop PowerShell module, and removes it when the stream ends. If you installed this plugin before that option existed, select Reinstall on its page to add the module. 10-bit SDR sets the driver's sdrBits registry value and turns on Windows' Auto Color Management for the virtual monitor at the start of each stream, since Windows otherwise keeps composing the desktop in 8 bits. Saving a change reloads the driver, so end any stream first. Turning the option off leaves Auto Color Management as it is on monitors that already have it. |
| Display Manager | Sets a physical display to the client's resolution while it streams, and makes it the primary display. If the display doesn't support the client's resolution, its resolution and refresh rate are left as they are. Otherwise it gets the client's refresh rate, or the lowest higher rate the display has, or failing that the highest lower one. Primary display picks the display, turning it on if it's off; Don't change uses the current primary display. Turn off other displays and Start the stream on a new desktop work as in Virtual Display. The previous layout, resolutions and refresh rates come back when the application quits. |
| RTSS Frame Limit | Sets the RivaTuner Statistics Server frame rate limit to the client frame rate and restores the previous limit afterwards. RTSS 7.3.7 or newer must already be installed. If RTSS isn't running, it is started for the stream and closed afterwards. The limit is set again when a client resumes, using that client's frame rate, unless Re-apply the limit when a client resumes is off. |
| Nyrna | Adds a Suspend command to the client commands in Moonlight's in-stream menu. It suspends the game or application in the foreground with Nyrna. While it's suspended, a notification on this PC shows a picture of it with a Resume button, and the command becomes Resume (name), which you can change with the Resume command label option. If Nyrna is already running here (installed, with its tray icon), the command presses its hotkey, set in the plugin's options. Nyrna runs through scheduled tasks in the Sunshine folder of Task Scheduler, as the signed-in user with full rights, so it can also resume games that run as administrator. Games with anti-cheat usually can't be suspended. |
| Stadia Controller | Runs the Stadiacast receiver while a stream is running, so a Stadia Controller in Wi-Fi mode becomes a virtual Xbox Series controller (with the Virtual Controllers plugin) or Xbox 360 controller (with ViGEmBus). Wake the controller once the stream has started. Start test runs the receiver without a stream, and the card shows the controller connecting and every button, stick and trigger live. Headset audio plays this PC's sound on a headset plugged into the controller; it needs ffmpeg with libopus, for example from winget install Gyan.FFmpeg. The controller must first be set up for Wi-Fi with stadiacast-provision, as the original Stadiacast project explains, and must use this PC as its DNS server; see the Stadiacast setup guide. |
| Virtual Controllers | Installs the Sunshine Gamepad Driver (xgpad), which presents the client's controllers as Xbox Series X|S or DualSense controllers. Controller type picks which, per application and client: Automatic makes PlayStation controllers, and controllers with motion sensors or a touchpad, DualSense controllers. Clients switch their controllers between Xbox and DualSense from the plugin's page of the client commands, until the stream ends; switching reconnects the controllers. Windows only. |
| Latency Test | Adds a Latency Test command to the client commands in Moonlight's in-stream menu. It runs a test pattern that the Latency Cam phone app films to measure the stream's latency and pacing: scan the QR code it shows with the phone. Results are saved in Documents\Latency Cam. Installing it downloads the latency-analyzer tools and adds a firewall rule that lets a phone on the local network reach port 48100, which uninstalling removes. A Close Latency Test command appears while the test is in the foreground. Launch Latency Test on the plugin's page opens the test on this PC without a client command. |
| V-Sync Toggle | Changes the graphics driver's global V-Sync setting and restores the previous setting afterwards. On NVIDIA GPUs it uses vsync-toggle. On AMD GPUs it sets the driver's Wait for Vertical Refresh setting, which applies to games started after the change. |
Using Virtual Display with a refresh rate multiplier together with RTSS Frame Limit runs the display faster than the stream while keeping games capped at the client frame rate.
While Virtual Display or Display Manager runs for an application, Sunshine skips its Device configuration setting (Audio/Video) for that stream, so the plugin alone sets up the displays. Only one plugin that sets up the displays runs for a stream: when both are active for an application, the first in plugin order runs and the other is skipped, unless the client turned the first one off. Exclude the one you don't want from the application, or turn it off for a client. Applications that exclude the plugin use Device configuration as usual.
Import plugin on the Plugins page adds a plugin that doesn't come with Sunshine. Enter the full path of a folder
on this PC that holds the plugin's plugin.json, or the https:// address of the plugin's GitHub repository or update
feed. Sunshine downloads the plugin's latest release, checks it against the checksum in the feed, and copies it into
its plugins folder. The plugin's page shows where it was imported from.
To update plugins imported from a URL, select Check for updates on the Plugins page. A plugin with a newer release shows Update available and a blue dot in the sidebar; select Update to on its page to download it. If the plugin is installed, select Reinstall afterwards to run its new install script. A plugin imported from a folder is updated by importing the folder again. Bundled plugins update with Sunshine.
The plugin guide explains how to build your own, step by step and for coding agents, and describes everything a plugin can do. Sunshine ships with it, under Plugin guide on the Plugins page.
| Previous | Next |
|---|---|
| App Examples | Awesome-Sunshine |