Prerequisites
Before you begin, ensure you have:- Completed the installation for your platform
- A device with a Moonlight client installed (download Moonlight)
- Both host and client on the same network (for initial setup)
Initial Setup
Platform-Specific Setup
Some platforms require additional configuration after installation.
- Linux
- Windows
- macOS
- FreeBSD
Configure ServicesChoose between unprivileged (XDG Portal/X11) or privileged (KMS) capture:Start once:Enable on boot (unprivileged):Enable on boot (KMS - privileged):Virtual Input DevicesIf inputs aren’t working, add your user to the Log out and log back in for changes to take effect.
Two service unit files are available:
sunshine for unprivileged XDG Portal or X11 capture, and sunshine-kms for privileged KMS capture.input group:Start Sunshine
If Sunshine is not running as a service, start it manually:Optional: Specify a custom config file location:SSH on Linux (X11):
A service is a process that runs in the background. When installed from the Windows installer or using systemd on Linux, Sunshine runs as a service automatically.
Access the Web UI
Open your web browser and navigate to:Replace
localhost with your server’s IP address if accessing from another device.On first access, you’ll be prompted to create:- A username
- A password
Configure Sunshine
Configure Sunshine through the web UI:Set Your ThemeChoose your preferred theme from the dropdown menu in the navbar.Add ApplicationsNavigate to the “Applications” tab and add games or applications you want to stream:Adjust SettingsExplore the “Configuration” tab to:
- Click “Add New”
- Enter the application name (e.g., “Steam”, “Desktop”)
- Set the command to launch the application
- Configure the working directory if needed
- Optionally add an image (e.g.,
steam.png,desktop.png) - Save the application
The “Desktop” app works differently - it has no commands and simply starts a stream of your desktop. If you removed it, create a new application named “Desktop” with “desktop.png” as the image.
- Set video encoding preferences
- Configure audio settings
- Adjust network settings
- Enable HDR if supported
Pair Moonlight Client
On your client device running Moonlight:
-
Add PC Manually (if not auto-discovered)
- Click the ”+” or “Add PC” button
- Enter your host computer’s IP address
-
Initiate Pairing
- Moonlight will display a 4-digit PIN code
-
Enter PIN in Sunshine
- In the Sunshine web UI, navigate to the “PIN” tab in the navbar
- Enter the 4-digit PIN shown in Moonlight
- Provide a name for the client device
- Press Enter or click Submit
You should see a success message in the web UI. The client is now authorized to connect.
Keyboard Shortcuts
While streaming, these shortcuts are available (all start withCtrl+Alt+Shift):
| Shortcut | Action |
|---|---|
Ctrl+Alt+Shift+N | Hide/Unhide cursor (useful for Remote Desktop Mode) |
Ctrl+Alt+Shift+F1 to F12 | Switch to different monitor |
Troubleshooting
If you encounter issues:Check Logs
- Navigate to the “Troubleshooting” tab in the web UI
- Review warning and error messages
- Click on individual messages for detailed information
Common Issues
Inputs (mouse, keyboard, gamepad) not working
Inputs (mouse, keyboard, gamepad) not working
Linux/FreeBSD: Add your user to the Log out and log back in.
input group:Virtual gamepads not working (Windows)
Virtual gamepads not working (Windows)
Install ViGEmBus from the Troubleshooting tab in the web UI, then restart your computer.
Stream immediately fails when starting an application
Stream immediately fails when starting an application
The application may be starting as a detached process. Try:
- Use “detached” mode in the application configuration
- For Steam, this is expected behavior when launched directly
- Check if the application command is correct
Can't connect from Moonlight
Can't connect from Moonlight
Verify:
- Sunshine is running
- Host and client are on the same network
- Firewall allows connections on ports 47984-47990 (TCP) and 47998-48000 (UDP)
- Try adding the PC manually by IP address in Moonlight
Poor stream quality or high latency
Poor stream quality or high latency
Try:
- Use a wired connection instead of WiFi
- Lower the resolution or bitrate in Moonlight settings
- Enable hardware encoding in Sunshine configuration
- Close bandwidth-intensive applications
Get Help
For additional support:- Check the documentation
- Review video tutorials
- Visit the LizardByte support channels
Advanced Topics
Once you have basic streaming working, explore these advanced features:HDR Streaming
Learn how to configure HDR streaming for supported platforms (Windows officially, Linux experimentally).
Application Configuration
Advanced application setup including environment variables, prep/post commands, and working directories.
Network Configuration
Configure port forwarding, UPnP, and remote access for streaming over the internet.
Performance Tuning
Optimize encoding settings, capture methods, and system configuration for best performance.
Next Steps
Now that you’re up and running, explore the rest of the documentation to learn more about:- Detailed configuration options
- Platform-specific optimizations
- Advanced networking and remote access
- Command-line arguments and scripting

