Deploying Sunshine
Introduction
Sunshine is a self-hosted game streaming server that implements NVIDIA GameStream protocol, making it compatible with Moonlight clients. Unlike NVIDIA’s official GameStream which requires an NVIDIA GPU, Sunshine works with any GPU including AMD and Intel integrated graphics.
Key highlights of Sunshine:
- GPU Agnostic: Works with NVIDIA, AMD, and Intel GPUs
- Moonlight Compatible: Use any Moonlight client on Android, iOS, PC, or TV
- Hardware Encoding: Utilizes GPU hardware encoders for low-latency streaming
- 4K HDR Support: Stream in up to 4K resolution with HDR
- Multi-Platform: Run on Windows, Linux, or macOS
- Low Latency: Optimized for responsive game streaming
- Controller Support: Full gamepad passthrough including rumble
- Web UI: Configure everything through a browser interface
This guide walks through deploying Sunshine on Klutch.sh using Docker.
Why Deploy Sunshine on Klutch.sh
Deploying Sunshine on Klutch.sh provides several advantages:
Simplified Deployment: Klutch.sh automatically detects your Dockerfile and builds Sunshine without complex configuration.
HTTPS by Default: Secure access to the web configuration interface.
GitHub Integration: Connect your configuration repository for automatic redeployments.
Note: Game streaming typically requires GPU passthrough and low-latency networking. Klutch.sh is ideal for hosting the Sunshine configuration interface and management, but actual game streaming may require additional infrastructure considerations.
Prerequisites
Before deploying Sunshine on Klutch.sh, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository for your Sunshine configuration
- Basic familiarity with Docker and containerization concepts
- A Moonlight client installed on your receiving device
Deploying Sunshine on Klutch.sh
- Select HTTP as the traffic type
- Set the internal port to 47990 (web UI)
Create Your Repository
Create a new GitHub repository with a Dockerfile for Sunshine:
FROM lizardbyte/sunshine:latest
ENV PUID=1000ENV PGID=1000
EXPOSE 47984EXPOSE 47989EXPOSE 47990EXPOSE 48010
VOLUME ["/config"]Push to GitHub
Initialize and push your repository to GitHub with your Dockerfile.
Create a New Project on Klutch.sh
Navigate to the Klutch.sh dashboard and create a new project.
Create a New App
Within your project, create a new app and connect your GitHub repository containing the Sunshine Dockerfile.
Configure HTTP Traffic
In the deployment settings:
Set Environment Variables
Configure the following environment variables:
| Variable | Value |
|---|---|
PUID | 1000 |
PGID | 1000 |
Attach Persistent Volumes
Add the following volumes:
| Mount Path | Recommended Size | Purpose |
|---|---|---|
/config | 1 GB | Configuration and certificates |
Deploy Your Application
Click Deploy to start the build process.
Access Sunshine
Once deployment completes, access the Sunshine web UI at your app URL. The default credentials are sunshine / sunshine.
Configuration
Initial Setup
On first access, change the default password immediately through the web interface.
Adding Applications
Add games and applications through the web UI that you want to be able to stream:
- Navigate to Applications in the web UI
- Click Add Application
- Enter the application name and path
- Configure any additional launch parameters
Moonlight Client Setup
- Install Moonlight on your client device
- Add your Sunshine server by hostname or IP
- Enter the PIN displayed in the Moonlight app into Sunshine’s web UI
- Start streaming
Additional Resources
- Sunshine Documentation
- Sunshine GitHub Repository
- Moonlight Streaming
- Klutch.sh Persistent Volumes
- Klutch.sh Deployments
Conclusion
Deploying Sunshine on Klutch.sh gives you a flexible game streaming server that works with any GPU. Combined with Moonlight clients, you can stream games to virtually any device with low latency and high quality.