Skip to content

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

    Create Your Repository

    Create a new GitHub repository with a Dockerfile for Sunshine:

    FROM lizardbyte/sunshine:latest
    ENV PUID=1000
    ENV PGID=1000
    EXPOSE 47984
    EXPOSE 47989
    EXPOSE 47990
    EXPOSE 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:

    • Select HTTP as the traffic type
    • Set the internal port to 47990 (web UI)

    Set Environment Variables

    Configure the following environment variables:

    VariableValue
    PUID1000
    PGID1000

    Attach Persistent Volumes

    Add the following volumes:

    Mount PathRecommended SizePurpose
    /config1 GBConfiguration 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:

  1. Navigate to Applications in the web UI
  2. Click Add Application
  3. Enter the application name and path
  4. Configure any additional launch parameters

Moonlight Client Setup

  1. Install Moonlight on your client device
  2. Add your Sunshine server by hostname or IP
  3. Enter the PIN displayed in the Moonlight app into Sunshine’s web UI
  4. Start streaming

Additional Resources

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.