Hacker News
July 20, 20264 min read
Moonshine lets you stream games from your PC to any device running Moonlight . Your keyboard, mouse, and controller inputs are sent back to the host so you can play games remotely as if you were sitting in front of it.
Isolated streaming sessions : Each stream runs in its own compositor, completely separate from your desktop environment. Your host PC can still be used for other things while you stream. No monitor required : Works on headless servers — no HDMI dummy plug needed. Hardware video encoding : H.264, H.265, and AV1 encoding using the GPU. HDR support : True 10-bit HDR streaming for supported games. Full input support : Mouse, keyboard, and gamepad (including motion, touchpad, and haptics). Audio streaming : Stereo and surround sound (5.1/7.1) with low-latency Opus encoding. Requirements Linux only . Tested on Arch Linux, but it's been reported to work on other Linux distributions too. systemd . Required for launching and managing application processes. Almost all modern Linux distributions include it by default. A GPU with Vulkan video encoding . NVIDIA RTX, AMD RDNA2+, or Intel Arc. Moonlight v6.0.0 or higher . Compatibility with older versions or unofficial ports is not guaranteed. Installation Arch The simplest method is to install through the AUR using:
yay -S moonshine To run Moonshine for your user:
sudo loginctl enable-linger $USER This allows Moonshine to run applications in the user's session even when the user is not logged in.
If your user is always logged in when you want to stream, you can skip this step.
Enable the service to start on boot and run immediately :
sudo systemctl enable --now moonshine@ $USER Source The following dependencies are required to build:
sudo pacman -S \ clang \ cmake \ gcc-libs \ glibc \ libc++ \ libevdev \ libpulse \ libxkbcommon \ make \ mesa \ opus \ pkg-config \ rust \ shaderc \ vulkan-headers \ wayland Then compile and run:
cargo run --release -- /path/to/config.toml Configuration A configuration file is created automatically if the path you provide doesn't exist. When using the AUR package, it defaults to $XDG_CONFIG_HOME/moonshine/config.toml .
When you connect with Moonlight for the first time, it will show a PIN. A notification will appear on the host that you can click to open the pairing page, or you can visit it manually at http://localhost:47989/pin .
You can also pair from the command line:
curl -X POST " http://localhost:47989/submit-pin " -d " uniqueid=0123456789ABCDEF&pin=<PIN> " Adding applications Each application runs in its own isolated streaming session. Add them to config.toml like this:
[[ application ]] title = " Steam " boxart = " /path/to/steam.png " # optional command = [ " /usr/bin/steam " , " steam://open/bigpicture " ] title : The name shown in Moonlight. boxart (optional): Path to a cover image. command : The command to run. First entry is the executable, the rest are arguments. pre_command (optional): Commands to run before launching the application. Each entry is a separate command, executed in order. Runs synchronously — the session waits for all to finish. post_command (optional): Commands to run after the streaming session ends. Each entry is a separate command, executed in order. Runs synchronously — the server waits for all to finish. Example:
[[ application ]] title = " Steam " command = [ " /usr/bin/steam " , " steam://open/bigpicture " ] pre_command = [ [ " /usr/bin/systemctl " , " stop " , " conflicting.service " ], [ " /usr/bin/nvidia-smi " , " pstate " , " 50 " ], ] post_command = [ [ " /usr/bin/nvidia-smi " , " pstate " , " performance " ], ] Application scanners Scanners automatically detect installed applications so you don't have to add them manually.
Steam scanner — finds all installed Steam games:
[[ application_scanner ]] type = " steam " library = " $HOME/.local/share/Steam " command = [ " /usr/bin/steam " , " -bigpicture " , " steam://rungameid/{game_id} " ] Desktop scanner — finds applications from .desktop files:
[[ application_scanner ]] type = " desktop " directories = [ " $HOME/.local/share/applications " , " /usr/share/applications " , ] include_terminal = false resolve_icons = true FAQ How does this compare to Sunshine ?
Can I use Moonshine to stream to two clients simultaneously?
This is currently not a supported feature and not a focus of Moonshine. If you are interested in adding support for this, feel free to open an issue or discuss on Discord .
Moonshine is not designed for use on public networks . The underlying GameStream protocol has limitations that mean traffic is not fully encrypted at the application level.
If you need to stream over the internet, use a VPN such as Tailscale , WireGuard , or ZeroTier .
Do not expose Moonshine ports directly to the internet.
This wouldn't have been possible without the incredible work by the people behind the following projects:
Read what's here, then head to the original whenever you're ready - never required.
Continue Reading on Hacker NewsMTG reveals 35 new Hobbit cards featuring Thorin, Gandalf, Gollum, and more
Polygon July 18, 2026