Moonlight on the Steam Link

I've had issues with Steam in-home streaming on my home network, even when everything is wired over gigabit ethernet or on 802.11ac wifi. It works poorly (fine for a minute sometimes before stutter, lag, disconnection) when streaming between PCs and from PC to Link, so I'm not sure what the hell is going on exactly but I do know that it's very annoying.

However, Moonlight has been working like a champ for me for months. I play Destiny 2 remotely from a Linux desktop most nights, for hours, using Moonlight; no random disconnections, stutter is minimal to nonexistent, and the latency feels impossibly good.

I wondered if I could get some more use out of my Steam Link by running Moonlight on it. Long story short, it took some help from cgutman, the Moonlight dev, but Moonlight on the Steam Link now runs and streams really well on Gigabit, and kind of sort of okay on 802.11ac wifi? It seems like it varies in quality for me on wifi. Sometimes it works as well as gigabit, and sometimes it stutters more.

Anyway. The short version:

  • grab moonlight.tgz and put it on a FAT32-formatted USB flash drive, under folders /steamlink/apps/
  • optional: if you haven't yet, you can touch steamlink/config/system/enable_ssh.txt to enable sshd on your Steam Link, which makes it much easier to update Moonlight and any other Steam Link apps in the future.
  • eject and remove the flash drive from your computer
  • pull the power cable from your Steam Link
  • plug the flash drive into your Steam Link
  • power the Link back on
  • wait for it to install Moonlight and reboot

You should be able to navigate around most of the UI, launch streams, etc, with a controller, but it's not perfect yet so you may want to plug in a mouse. Also, there's a checkbox in the settings to quit the Moonlight app after a stream ends - you may want to turn that on, as otherwise I'm not sure how to get back to the Steam Link home screen without sshing to the Link and running pkill moonlight.

The long version, which you should probably do if you have a Linux machine available and you're the kind of person who's (rightfully, justifiably) paranoid about putting a random tarball from reddit on your Steam Link:

  • git clone git://github.com/ValveSoftware/steamlink-sdk
  • cd steamlink-sdk
  • source setenv.sh
  • rm rootfs/usr/lib/pkgconfig/libpulse*pc (Valve includes the libpulse headers, but not the library, so linking will fail and you'll have a bad time if you don't do this)
  • cd ..
  • git clone git://github.com/moonlight-streaming/moonlight-qt
  • cd moonlight-qt
  • qmake
  • make release
  • mkdir -p steamlink/moonlight/bin
  • cp app/moonlight steamlink/moonlight/bin
  • cp something/icon.png steamlink/moonlight/icon.png
  • cd steamlink
cat > moonlight/toc.txt << EOF
name=Moonlight
icon=icon.png
run=moonlight.sh
EOF
cat > moonlight/moonlight.sh << EOF
#!/bin/sh
exec ./bin/moonlight
EOF
  • chmod a+x moonlight/moonlight.sh
  • tar czf moonlight.tgz moonlight

Now you can use your own moonlight.tgz and follow the rest of the instructions above.