Port Configuration
Base port for the Sunshine service. Other ports are automatically offset from this value.Port Range: 1029-65514Default Ports:
- 47989 - Base port
- 47990 - HTTPS Web UI
- 48010 - Video/Audio streaming
Network Interface Binding
Set the address family that Sunshine will use.Options:
ipv4- IPv4 onlyboth- IPv4 and IPv6
Bind Sunshine to a specific IP address. Leave empty to bind to all interfaces.Useful for systems with multiple network interfaces when you want to restrict Sunshine to one.
- IPv4
- IPv6
- Loopback
The address must be valid for the system and match the configured address family.
UPnP and External Access
Automatically open ports for streaming over the internet using UPnP.
Manually specify external IP address. Leave empty for automatic detection.
Web UI Access Control
Control which devices can access the HTTPS Web UI.Options:
pc- Only localhost can accesslan- Only LAN devices can accesswan- Anyone can access (not recommended)
Encryption Settings
Encryption mode for streaming over local network.Options:
0- No encryption (best performance)1- Encryption if client supports it2- Encryption mandatory (reject unencrypted)
Encryption mode for streaming over the internet.Options:
0- No encryption (not recommended)1- Encryption if client supports it (recommended)2- Encryption mandatory
Connection Timeouts
How long to wait (in milliseconds) for data from Moonlight before shutting down the stream.
Example Configurations
Local Network Only (Default)
Internet Streaming with UPnP
IPv6 Dual Stack
Restricted to Specific Interface
Maximum Security
Firewall Configuration
If you’re having connection issues, ensure these ports are open in your firewall:- Default Ports
- Windows Firewall
- Linux (UFW)
- Linux (firewalld)
- TCP 47984-47990 - HTTP/HTTPS and control
- UDP 47998-48000 - Video stream
- UDP 48010 - Audio stream
- UDP 48100-48110 - Control and input
Router Port Forwarding
For internet streaming without UPnP, manually forward these ports in your router:- Log into your router’s admin interface
- Find the Port Forwarding section
- Forward these ranges to your host PC’s local IP:
- TCP: 47984-47990
- UDP: 47998-48010
- UDP: 48100-48110
Troubleshooting
Cannot connect from LAN
Cannot connect from LAN
- Check firewall allows Sunshine ports
- Verify
origin_web_ui_allowedis not set topc - Ensure client and host are on same network
- Try disabling encryption temporarily:
lan_encryption_mode = 0
Cannot connect from internet
Cannot connect from internet
- Enable UPnP:
upnp = enabled - OR manually forward ports in router
- Check external IP is correct:
external_ip - Verify ISP doesn’t block ports
- Enable encryption:
wan_encryption_mode = 1or2
Connection drops frequently
Connection drops frequently
- Increase ping timeout:
ping_timeout = 15000 - Check network stability
- Reduce bitrate in audio/video settings
- Enable FEC (forward error correction)
Web UI not accessible
Web UI not accessible
- Check
origin_web_ui_allowedsetting - Verify port 47990 (or base port + 1) is not blocked
- Try accessing via
https://localhost:47990 - Check SSL certificate is valid
UPnP not working
UPnP not working
- Verify router supports UPnP and it’s enabled
- Check router logs for UPnP requests
- Manually forward ports as fallback
- Some ISPs block UPnP
Network Performance Tips
Local Network
- Use wired Ethernet for best performance
- Disable encryption for lower latency
- Use 5GHz WiFi if wireless is required
- Ensure router supports QoS
Internet Streaming
- Enable UPnP for easier setup
- Use encryption to protect data
- Reduce bitrate for slower connections
- Consider VPN as alternative to port forwarding
Next Steps
Applications
Configure games and apps to stream
Audio/Video Settings
Optimize streaming quality

