# 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
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 must be 2048 bits
Cert
The certificate must be signed with a 2048 bit 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
DwmFlush
Improves capture latency/smoothness during mouse movement.
Disable if you encounter any VSync-related issues.
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.
Port
Set the family of ports used by Sunshine
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
Minimum Software Encoding Thread Count
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.
HEVC Support
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.
AV1 Support
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
Force a specific capture method, otherwise Sunshine will use the first one that works. NvFBC requires patched nvidia drivers.
Force a Specific Encoder
Force a specific encoder, otherwise Sunshine will use the first encoder that is available
Note: If you specify a hardware encoder on Windows, it must match the GPU where the display is connected.
FEC Percentage
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.
Channels
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
Web Manager Credentials File
Store Username/Password separately from Sunshine's state file.
Origin PIN Allowed
The origin of the remote endpoint address that is not denied for HTTP method /pin
External IP
If no external IP address is given, Sunshine will automatically detect external IP
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.
NVENC Preset
NVENC Tune
NVENC Rate Control
NVENC Coder (H264)
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.