Sunshine: Difference between revisions
Correct information about GameStream protocol (Moonlight is an open-source implementation)
(import from old wiki) |
(Correct information about GameStream protocol (Moonlight is an open-source implementation)) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
This page is intended to explain how to use Sunshine, an open-source implementation of | This page is intended to explain how to use Sunshine, an open-source implementation of NVIDIA’s GameStream protocol. | ||
== Install == | == Install == | ||
To install Sunshine | To install Sunshine, you will need to open up firewall ports, install udev rules and provide a setuid wrapper, | ||
so that sunshine can capture the display: | |||
{{file|/etc/nixos/configuration.nix|nix|<nowiki> | |||
{ pkgs, ... }: { | |||
environment.systemPackages = [ | |||
pkgs.sunshine | |||
pkgs.moonlight-qt #for testing purposes. | |||
]; | ]; | ||
}; | services.udev.packages = [ pkgs.sunshine ]; # allow access to create virtual input interfaces. | ||
networking.firewall = { | |||
enable = true; | |||
allowedTCPPorts = [ 47984 47989 47990 48010 ]; | |||
allowedUDPPortRanges = [ | |||
{ from = 47998; to = 48000; } | |||
{ from = 8000; to = 8010; } | |||
]; | |||
}; | |||
# Prevents this error: | |||
# Fatal: You must run [sudo setcap cap_sys_admin+p $(readlink -f sunshine)] for KMS display capture to work! | |||
security.wrappers.sunshine = { | |||
owner = "root"; | |||
group = "root"; | |||
capabilities = "cap_sys_admin+p"; | |||
source = "${pkgs.sunshine}/bin/sunshine"; | |||
}; | |||
# Needed for network discovery | |||
services.avahi.enable = true; | |||
services.avahi.publish.enable = true; | |||
services.avahi.publish.userServices = true; | |||
} | |||
</nowiki>}} | </nowiki>}} | ||
== Connecting to the host == | == Connecting to the host == | ||
Sunshine needs to be started with the <pre>sunshine</pre> command. | |||
You may have to manually add the host running Sunshine to your Moonlight client. This, thankfully, is not hard to do. | You may have to manually add the host running Sunshine to your Moonlight client. This, thankfully, is not hard to do. | ||
Line 22: | Line 45: | ||
<code><Host IP>:47989</code> | <code><Host IP>:47989</code> | ||
If this doesn’t work you should double check the port in the Sunshine’s WebGUI. You can access this from the Host PC in a web browser <code>localhost:47990</code> | If this doesn’t work you should double check the port in the Sunshine’s WebGUI. You can access this from the Host PC in a web browser <code>https://localhost:47990</code> | ||
== Attribution == | |||
A substantial amount of the above came from [https://www.reddit.com/r/NixOS/comments/1bq2bx4/beginners_guide_to_sunshine_gamedesktop_streaming/ this fairly wonderful guide] posted to Reddit. | |||
== | |||
[[Category:Applications]] | |||
[[Category:Gaming]] | |||