[Unit] Description=Self-hosted game stream host for Moonlight StartLimitIntervalSec=500 StartLimitBurst=5 PartOf=graphical-session.target After=graphical-session.target [Service] Type=simple # Ensure the Hyprland headless output exists before Sunshine probes encoders. # Non-fatal if Hyprland isn't reachable (e.g., service starts before login). ExecStartPre=-/usr/bin/hyprctl output create headless ExecStart=/usr/bin/sunshine Restart=on-failure RestartSec=5s [Install] WantedBy=graphical-session.target