Overview
Sunshine can be deployed as a Docker container using Docker Compose. This method provides isolation and easy management of the streaming service.Prerequisites
- Docker Engine 20.10 or later
- Docker Compose v2 or later
- GPU drivers installed on the host system
/dev/dridevice access (for hardware encoding)
Available Images
Sunshine images are available on Docker Hub and GitHub Container Registry.Image Tags
Combine version and OS to determine the tag:<VERSION>-<OS>
Versions:
latest- Latest stable releasemaster- Latest development buildvX.X.X- Specific version<commit-hash>- Specific commit
debian-bookwormubuntu-22.04ubuntu-24.04
lizardbyte/sunshine:latest-ubuntu-24.04
Supported Architectures
Docker Compose Configuration
Volume Mappings
Configuration Directory
The/config directory stores all Sunshine configuration files:
Optional Volumes
Port Configuration
Required Ports
Custom Port Configuration
To change the default port (47989), adjust all related ports:Network Modes
Bridge Mode (Default)
Uses Docker’s bridge network with explicit port mappings. Recommended for most deployments.Host Mode
Uses the host’s network directly. Better performance but less isolation.Hardware Access
GPU Access (Required)
For hardware encoding, the container needs access to GPU devices:NVIDIA GPU (Additional Setup)
For NVIDIA GPUs, install NVIDIA Container Toolkit:Using Podman
Sunshine works with Podman as a Docker alternative:Management Commands
Start/Stop Container
View Logs
Update Container
Access Container Shell
Building Custom Images
You can extend the Sunshine image for custom needs:Dockerfile
docker-compose.yml:
Troubleshooting
Container Won’t Start
Permission Issues
Network Issues
Performance Issues
- Ensure
/dev/dridevice is accessible - Verify GPU drivers are installed on host
- Use host network mode for better performance
- Increase resource limits if needed
Related Resources
- Docker Documentation
- Docker Compose Specification
- NVIDIA Container Toolkit
- Games on Whales - Advanced Docker setup

