Overview
Sunshine can run as a systemd service on Linux, providing automatic startup, process management, and logging integration. Two service types are available:- sunshine.service - Unprivileged service for XDG Portal or X11 capture
- sunshine-kms.service - Privileged service for KMS (Kernel Mode Setting) capture
Prerequisites
- Linux system with systemd
- Sunshine installed from package manager
- User account with appropriate permissions
Service Types
User Service (Recommended)
Runs as your user account with access to your display session. Best for:- Desktop installations
- X11 or Wayland capture
- Standard gaming setups
System Service
Runs as a system service with elevated privileges. Best for:- Headless servers
- KMS capture
- Multi-user environments
Installation
# User service files
ls -l ~/.config/systemd/user/sunshine*.service
# Or system service files (if installed system-wide)
ls -l /usr/lib/systemd/user/sunshine*.service
Service Configuration
Standard Service (sunshine.service)
Example service file for unprivileged capture:sunshine.service
KMS Service (sunshine-kms.service)
Example service file for KMS capture:sunshine-kms.service

