<%- header %>

Configuration

The name displayed by Moonlight. If not specified, the PC's hostname is used
The minimum log level printed to standard out
Configure a list of commands to be executed before or after running any application. If any of the specified preparation commands fail, the application launch process will be aborted.
Do Command Undo Command Run as Admin
The file where current apps of Sunshine are stored
Store Username/Password separately from Sunshine's state file.
The file where the current logs of Sunshine are stored.
The private key used for the web UI and Moonlight client pairing. For best compatibility, this should be an RSA-2048 private key.
The certificate used for the web UI and Moonlight client pairing. For best compatibility, this should have an RSA-2048 public key.
The file where current state of Sunshine is stored
Allows guests to control the host system with a gamepad / controller
Choose which type of gamepad to emulate on the host

When forcing DS4 emulation, map Back/Select to Touchpad Click

If disabled, motion sensors will not be taken into account during gamepad type selection.
If disabled, touchpad presence will not be taken into account during gamepad type selection.
If the Back/Select button is held down for the specified number of milliseconds, a Home/Guide button press is emulated.
If set to a value < 0 (default), holding the Back/Select button will not emulate the Home/Guide button.

Allows guests to control the host system with the keyboard
Control how fast keys will repeat themselves
The initial delay in milliseconds before repeating keys
How often keys repeat every second
This configurable option supports decimals
Sending scancodes enhances compatibility with games and apps but may result in incorrect keyboard input from certain clients that aren't using a US English keyboard layout.
Enable if keyboard input is not working at all in certain applications.
Disable if keys on the client are generating the wrong input on the host.
It may be possible that you cannot send the Windows Key from Moonlight directly.
In those cases it may be useful to make Sunshine think the Right Alt key is the Windows key

Allows guests to control the host system with the mouse
When enabled, Sunshine will pass through high resolution scroll events from Moonlight clients.
This can be useful to disable for older applications that scroll too fast with high resolution scroll events.
When enabled, Sunshine will pass through native pen/touch events from Moonlight clients.
This can be useful to disable for older applications without native pen/touch support.
Manually specify a specific audio device to capture. If unset, the device is chosen automatically.
We strongly recommend leaving this field blank to use automatic device selection!
If you have multiple audio devices with identical names, you can get the Device ID using the following command:
tools\audio-info.exe
The name of the audio sink used for Audio Loopback
If you do not specify this variable, pulseaudio will select the default monitor device.

You can find the name of the audio sink using either command:
pacmd list-sinks | grep "name:"
pactl info | grep Source

The name of the audio sink used for Audio Loopback
Sunshine can only access microphones on macOS due to system limitations.
To stream system audio using Soundflower or BlackHole.
Manually specify a virtual audio device to use. If unset, the device is chosen automatically.
We strongly recommend leaving this field blank to use automatic device selection!
If Steam is installed, this will automatically install the Steam Streaming Speakers driver to support 5.1/7.1 surround sound and muting host audio.
Manually specify a GPU to use for capture. If unset, the GPU is chosen automatically.
We strongly recommend leaving this field blank to use automatic GPU selection!
Note: This GPU must have a display connected and powered on.
The appropriate values can be found using the following command:
tools\dxgi-info.exe
Manually specify a GPU to use for capture.
ls /dev/dri/renderD*  # to find all devices capable of VAAPI
              vainfo --display drm --device /dev/dri/renderD129 | \
                grep -E "((VAProfileH264High|VAProfileHEVCMain|VAProfileHEVCMain10).*VAEntrypointEncSlice)|Driver version"
            
Replace ``renderD129`` with the device from above to lists the name and capabilities of the device.
To be supported by Sunshine, it needs to have at the very minimum: VAProfileH264High : VAEntrypointEncSlice
Manually specify a display to use for capture. If unset, the primary display is captured.
Note: If you specified a GPU above, this display must be connected to that GPU.
The appropriate values can be found using the following command:
tools\dxgi-info.exe
During Sunshine startup, you should see the list of detected monitors, e.g.:

            Info: Detecting connected monitors
            Info: Detected monitor 0: DVI-D-0, connected: false
            Info: Detected monitor 1: HDMI-0, connected: true
            Info: Detected monitor 2: DP-0, connected: true
            Info: Detected monitor 3: DP-1, connected: false
            Info: Detected monitor 4: DVI-D-1, connected: false
          
You need to use the value before the colon in the output, e.g. 1.
{{r}} ×
{{f}} ×
The display modes advertised by Sunshine.
Some versions of Moonlight, such as Moonlight-nx (Switch), rely on these lists to ensure that the requested resolutions and fps are supported.
This setting does not change how the screen stream is sent to Moonlight.
Set the address family used by Sunshine
Set the family of ports used by Sunshine
Sunshine cannot use ports below 1024!
Ports above 65535 are not available!
Protocol Port Note
TCP {{+effectivePort - 5}}
TCP {{+effectivePort}}
TCP {{+effectivePort + 1}} Web UI
TCP {{+effectivePort + 21}}
UDP {{+effectivePort + 9}} - {{+effectivePort + 11}}
Exposing the Web UI to the internet is a security risk! Proceed at your own risk!
The origin of the remote endpoint address that is not denied access to Web UI
Automatically configure port forwarding
If no external IP address is given, Sunshine will automatically detect external IP
How long to wait in milliseconds for data from moonlight before shutting down the stream
When multicasting, it could be useful to have different configurations for each connected Client. For example:
  • Clients connected through WAN and LAN have different bitrate constraints.
  • Decoders may require different settings for color
Unlike simply broadcasting to multiple Client, this will generate distinct video streams.
Note, CPU usage increases for each distinct video stream generated
Percentage of error correcting packets per data packet in each video frame.
Higher values can correct for more network packet loss, but at the cost of increasing bandwidth usage.
The default value of 20 is what GeForce Experience uses.
Quantization Parameter
Some devices may not support Constant Bit Rate.
For those devices, QP is used instead.
Higher value means more compression, but less quality
Increasing the value slightly reduces encoding efficiency, but the tradeoff is usually
worth it to gain the use of more CPU cores for encoding. The ideal value is the lowest
value that can reliably encode at your desired streaming settings on your hardware.
Allows the client to request HEVC Main or HEVC Main10 video streams.
HEVC is more CPU-intensive to encode, so enabling this may reduce performance when using software encoding.
Allows the client to request AV1 Main 8-bit or 10-bit video streams.
AV1 is more CPU-intensive to encode, so enabling this may reduce performance when using software encoding.
Force a specific capture method, otherwise Sunshine will use the first one that works. NvFBC requires patched nvidia drivers.
Force a specific encoder, otherwise Sunshine will select the best available option.
Note: If you specify a hardware encoder on Windows, it must match the GPU where the display is connected.
Higher numbers improve compression (quality at given bitrate) at the cost of increased encoding latency.
Recommended to change only when limited by network or decoder, otherwise similar effect can be accomplished by increasing bitrate.
Adds preliminary encoding pass.
This allows to detect more motion vectors, better distribute bitrate across the frame and more strictly adhere to bitrate limits.
Disabling it is not recommended since this can lead to occasional bitrate overshoot and subsequent packet loss.

Currently NVIDIA drivers may freeze in encoder when HAGS is enabled, realtime priority is used and VRAM utilization is close to maximum.
Disabling this option lowers the priority to high, sidestepping the freeze at the cost of reduced capture performance when the GPU is heavily loaded.
Simpler form of entropy coding.
CAVLC needs around 10% more bitrate for same quality.
Only relevant for really old decoding devices.
Optimize the trade-off between encoding speed (encoded frames per second) and compression efficiency (quality per bit in the bitstream). Defaults to superfast.
Tuning options, which are applied after the preset. Defaults to zerolatency.
Success! Click 'Apply' to restart Sunshine and apply changes. This will terminate any running sessions.
Success! Sunshine is restarting to apply changes.