<%- header %>

# Configuration

Sunshine Name
The name displayed by Moonlight. If not specified, the PC's hostname is used
Log Level
The minimum log level printed to standard out
Logfile Path
The file where the current logs of Sunshine are stored.
Origin Web UI Allowed
The origin of the remote endpoint address that is not denied access to Web UI
UPnP
Automatically configure port forwarding
Gamepads
Choose which type of gamepad to emulate on the host

##

Map Back/Select to Touchpad Click
When forcing DS4 emulation, map Back/Select to Touchpad Click
Ping Timeout
How long to wait in milliseconds for data from moonlight before shutting down the stream
Advertised Resolutions and FPS
Resolutions
{{r}} ×
FPS
{{f}} ×
The display modes advertised by Sunshine
Some versions of Moonlight, such as Moonlight-nx (Switch), rely on this list to ensure that the requested resolutions and fps are supported.
This setting does not change how the screen stream is sent to Moonlight
Map Right Alt key to Windows key
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
Command Preparations
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 |
--- | --- | --- | ---
|  | Elevated |

Private Key
The private key used for the web UI and Moonlight client pairing. For best compatibility, this should be an RSA-2048 private key.
Certificate
The certificate used for the web UI and Moonlight client pairing. For best compatibility, this should have an RSA-2048 public key.
State File
The file where current state of Sunshine is stored
Apps File
The file where current apps of Sunshine are stored
Home/Guide Button Emulation Timeout
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.
Enable Mouse Input
Allows guests to control the host system with the mouse
Enable Keyboard Input
Allows guests to control the host system with the keyboard
Enable Gamepad Input
Allows guests to control the host system with a gamepad / controller
Key Repeat Delay
Control how fast keys will repeat themselves
The initial delay in milliseconds before repeating keys
Key Repeat Frequency
How often keys repeat every second
This configurable option supports decimals
Always Send Scancodes
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.
Audio Sink
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

Audio Sink
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

Audio Sink
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 .
Virtual Sink
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!
Install Steam Audio Drivers
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.
Adapter Name
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

Output Name
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
Monitor number
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.
Address Family
Set the address family used by Sunshine
Port
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}} | Use this port to connect with Moonlight.
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!
Quantization Parameter
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
SW Presets
Optimize the trade-off between encoding speed (encoded frames per second) and compression efficiency (quality per bit in the bitstream). Defaults to superfast.
SW Tune
Tuning options, which are applied after the preset. Defaults to zerolatency.
Performance preset
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.
Two-pass mode
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.

##

Use realtime priority in hardware accelerated gpu scheduling
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.
Prefer CAVLC over CABAC in H.264
Simpler form of entropy coding.
CAVLC needs around 10% more bitrate for same quality.
Only relevant for really old decoding devices.
QuickSync Preset
QuickSync Coder (H264)
AMF Quality
AMF Rate Control
AMF Usage
AMF Preanalysis
AMF Variance Based Adaptive Quantization (VBAQ)
AMF Coder (H264)
VideoToolbox Coder
VideoToolbox Software Encoding
VideoToolbox Realtime Encoding
Success! Click 'Apply' to restart Sunshine and apply changes. This will terminate any running sessions.
Success! Sunshine is restarting to apply changes.