set up remote game streaming Moonlight

Have you ever wished you could play PC games somewhere other than your desk? Perhaps you want to stream Steam games while relaxing on the couch, or would rather read visual novels on your phone instead of in an uncomfortable office chair. Well, good news: using an open-source app called Moonlight, you can actually play almost any PC game on a wide range of other devices, including Android and iOS tablets, Xbox consoles, and Amazon Fire Stick.

Better still, Moonlight is completely free to use, so you won’t have to buy any adapters or cables (provided you have a reasonably quick wifi connection). People pay hundreds of dollars for portable PCs to address this exact issue, so if game streaming is something you’re interested in, then I’d recommend checking out this post before spending any of your hard-earned cash.

First things first: How does game streaming work?

Video game streaming services (sometimes called cloud gaming) have been around for more than a decade, but their business model remains much the same as it was back then. Users pay a monthly fee for access to a service like GeForce Now or Amazon Luna and can play games remotely, with the company’s hardware running the game instead of your own PC.

There is another approach, however, and it doesn’t require you to subscribe to anything. Instead, we’ll run a program called Sunshine on our PC (to send video and audio) and another program called Moonlight on our second device (to receive this data). Here’s a diagram explaining the basics of how these apps allow you to play games remotely:

Screenshot showing how a remote game streaming system works

This method has several advantages over simply running a very long cable between your devices. Firstly, you can stream your PC to systems that don’t have HDMI ports (such as mobile phones or tablets). You’ll also be able to customize your display, set FPS targets, and control your games at a distance thanks to Moonlight’s built-in controller support.

Which devices are supported?

You can install Sunshine on virtually any PC, so long as it’s running a relatively modern operating system. At the time of writing, Sunshine is confirmed to work on:

  • Windows 11
  • MacOS 14+
  • Debian 13+
  • Ubuntu 22.04+
  • Fedora 41+
  • FreeBSD 14.3+

Moonlight, on the other hand, supports a far wider range of devices, largely because the second system doesn’t have to do much processing at all; it simply mirrors whatever is on your primary device’s screen. Currently, Moonlight supports Windows, MacOS, Linux, Android, iOS, Raspberry Pi, Xbox consoles, Android TV boxes, LG Smart TVs, and Amazon Fire OS.

Related: Best VPNs for gaming

How to start streaming games remotely with Moonlight

A bit of setup is required before we can start streaming games remotely. Don’t worry, though. This should only take a few minutes, and I promise the wait will be worth it. Just follow these steps, and you’ll be gaming before you know it.

Step 1: Installing Sunshine

Firstly, you’ll have to install Sunshine. To do this, simply visit the creator’s GitHub page and download the latest stable release for your system. For instance, if you want to mirror a Windows PC, you’d download the version called “Sunshine-Windows-AMD64-installer”.

Once installed, a browser tab will open – this is where all interaction with Sunshine takes place. You’ll be asked to create an account, so provide an email address and password, then log in. That’s all the setup that’s required in most cases!

Screenshot of Sunshine's main control panel
Sunshine is preconfigured and begins running immediately, so once you’ve logged in, you’re almost ready to start streaming.

Now, every PC and network is different. Sometimes, the default Sunshine settings aren’t going to be right for you. Don’t worry, though: I’ll soon explain how to tweak Sunshine’s settings for more consistent performance. Of course, before that, we’ll need to get Moonlight running on our secondary device.

Step 2: Installing Moonlight on your second device

Moonlight’s website allows you to download and install nearly a dozen different versions of its app, though you can also simply search for “Moonlight Game Streaming” on your preferred app store. Be sure to install this on whichever device you’d like to mirror the main display. For instance, I primarily run Moonlight on an Xbox Series S connected to my living room TV.

Once Moonlight is installed, it’ll ask for your login credentials. Use the account you created earlier, and you’ll be greeted by a grey screen and a loading icon.

Now we have to pair your two devices (don’t worry, you only have to do this part once). Assuming both your main PC and the second device are connected to the same network, you should see your main PC appear after a few seconds. Click on this, and you’ll be given a four-digit PIN number. Go back to your primary device, enter this PIN into Sunshine, then return to your secondary device. Finally, hit Desktop to show your whole PC screen, or hit Steam Big Picture to open Steam in a layout that’s easier to navigate with a controller.

Screenshot showing Moonlight';s source selection screen
On this screen, we’ll choose whether we want to open Steam or just use the PC remotely – use the desktop option to open non-Steam apps like your browser, media player, and so on

You should now be connected to your PC, though you’ll be in “mouse mode” by default. This is fine, for instance, if you’re reading visual novels and only need to click every now and then. However, there’s also a shortcut to open up an onscreen keyboard, and Moonlight has built-in controller support too. Here’s how to navigate the Moonlight app on different devices:

  • Desktop (Windows, Linux, MacOS): Use mouse, keyboard, or controller as normal
  • Mobile (Android, FireOS, iOS): Tap the cog icon on the source selection screen. Enable Show on-screen controls or connect your own gamepad. Now connect to your primary device and hit the cog in the top-left. If you’re on a touchscreen device, you can resize and move controller elements to create the perfect setup for each game.
  • Xbox consoles: Hold the back and start buttons, then select Enable mouse mode to control the cursor with your analogue sticks. Hitting the Y button opens a keyboard.
Screenshot showing Baldur's Gate 3 running on Moonlight (Android)
Moonlight even has a virtual controller, allowing you to play virtually any game on your mobile phone or tablet.

Step 3: Enjoy!

You should now be able to stream your favorite games without any issues. I’ve tested a variety of different titles, including Baldur’s Gate 3, The Seance of Blake Manor, and This Bed We Made, all of which worked flawlessly.

You should note, however, that titles that require ultra-quick reflexes, like Overwatch 2felt a little sluggish due to the increased latency streaming introduces. Additionally, I struggled to play Shadows of Doubt remotely because it requires a lot of switching between keyboard and controller; it’s still doable, but it doesn’t feel as natural as playing while sitting at a PC.

How to troubleshoot and fix Moonlight streaming problems

Moonlight can be an easy way to extend the capabilities and lifespan of an older device, but it’s not perfect. I’ve been using this app for several months now, during which time I’ve come across sporadic connectivity issues, stuttering, and choppy performance. Luckily, I was able to resolve these problems, and you can too. Here are some of the most common problems you might face when streaming games with Moonlight, and how to solve them.

Moonlight freezes or loses connection

In my experience, Moonlight worked perfectly until the secondary device lost internet connection, at which point it would freeze. This shouldn’t be a problem for most people, but if you live in a place with thick walls or a poor Wi-Fi signal, you may want to consider a wired internet connection for maximum stability.

Moonlight says my PC isn’t online

This one is simple. First, make sure the device running Moonlight is actually connected to the internet. Then, do the same for your other device. Finally, make sure they’re on the same network, or they won’t be able to communicate. If you’re still having problems, try restarting Sunshine by right-clicking its taskbar icon and hitting Restart. Alternatively, in Sunshine’s admin panel, just hit the button marked Restart Sunshine.

Screenshot showing Sunshine's restart button
Thankfully, resolving most Sunshine issues is as easy as hitting the restart button

Moonlight stutters so much that games are unplayable

Moonlight’s default settings should work fine for most people. There are, however,  some users who’ll have to do a little extra work. If your games are stuttering, there are a few tricks we can use to reduce your PC’s workload and hopefully improve performance. Begin by opening Sunshine and selecting the Audio/Video tab. Look at the Adapter Name field – if this has your current graphics card listed, you can move on. If not, though, simply open up Device Manager, find your GPU, and paste the name into Sunshine.

Screenshot showing Sunshine's Adapter name matching the GPU name in Windows' Device Manager
It’s important that your Device Manager’s primary Display adapter and Sunshine Adapter Name are identical – nobody wants to play games using onboard graphics after all!

Just below this, you’ll find a dropdown menu labeled Device configuration. If you have multiple monitors, choose Deactivate other displays and activate only the specified display. This will turn off all other monitors, reducing your PC’s workload.

Next, move to the Network tab and scroll all the way down. Set the Ping Timeout to 100000 so your stream is less likely to lose connection due to unstable Wi-Fi.

Finally, when you get your game up and running, go into the options and drop the quality down as far as needed for a smooth, responsive experience. You may also want to consider reducing the game’s resolution. 4K graphics might look better, but they require your computer to work four times harder than if you were playing at 1080p.

My problem isn’t mentioned here

Looking for help with a more complicated issue? Moonlight’s troubleshooting page explains how to fix a huge range of potential pitfalls, plus there’s an active Discord community in case you discover a problem nobody has encountered before.

Can I use Moonlight for something other than gaming?

You certainly can! I’ve personally used Moonlight to stream movies directly from my PC to the big living room TV, where previously I’d have needed a huge HDMI cable, USB stick, or home media server software like Kodi or Plex. That’s just a taste of what’s possibl,e though. Here’s a list of use cases for Moonlight that you might not have thought of:

  • Wirelessly casting slideshows or presentations to a larger screen
  • Checking how your website or app looks at different resolutions
  • Monitoring security cameras or 3D print progress from another room
  • Using your PC while in bed
  • Navigating using touch controls rather than a mouse and keyboard (for instance, if you have limited mobility)
  • Accessing apps that aren’t normally available on your secondary device
  • Drawing on a touchscreen while still having the file saved on your primary PC