Raspberry Pi

How to Stream games on Raspberry Pi using Moonlight

For the gamers community, Moonlight is a platform through which they can play PC games on any device like the Raspberry Pi. The Moonlight uses the NVIDIA GameStream protocol and allows the users to stream games remotely. The most important feature of the Moonlight is that it allows streaming of the games up to 4K. It is an open-source platform and the more special feature is that it is managed by the community, not a company, so there are no advertisements that have to be seen.

The Moonlight application can be run on different devices like Raspberry Pi, Android, iOS, and PCs, but in this write-up, we will explore the methods of installing Moonlight on the Raspberry Pi.


To stream games on Raspberry Pi you need to have:

  • A Raspberry Pi, with latest Raspberry Pi OS (Minimum Buster)
  • A host PC with NVIDIA GTX 600 or higher GPU and a companion app GeForce Experience

How to install the Moonlight on the Raspberry Pi

To install the Moonlight on the Raspberry Pi, first we will run the below mentioned command:

$ curl -1sLf 'https://dl.cloudsmith.io/public/moonlight-game-streaming/moonlight-qt/setup.deb.sh' | distro=raspbian codename=buster sudo -E bash

When the package of Moonlight is successfully downloaded, we will use the apt package manager to install the application on the Raspberry Pi using the command:

$ sudo apt install moonlight-qt -y

After the installation of the Moonlight package, we will update and upgrade all the packages, so the Moonlight can be upgraded to its latest version if it is available:

$ sudo apt update && sudo apt upgrade -y

With the help of the nano text editor, we will open the config file of the /boot/config.txt using the command:

$ sudo nano /boot/config.txt

Now we will find the “dtoverlay=vc4-kms-v3d” line in the file:

And replace the line with “dtoverlay=vc4-fkms-v3d”:

Once the changes made are done, close the file after saving it and run the reboot command:

$ reboot

Go to the applications menu, click on the “Games” and in the next menu click on the “Moonlight”:

The Moonlight application will launch and now search for the computer which has the NVIDIA GameStream enabled:

Click on the PC, a pin number will appear on the Raspberry Pi screen, and a prompt will also appear on the PC:

After the connection is set up, the lock sign on the PC icon will disappear:

Now click on the PC to find and start playing games on Raspberry Pi.


Moonlight is a game streaming application that is used by PCs that have the NVIDIA GPU and GameStream enabled. Games can also be streamed on a Raspberry Pi device by installing the Moonlight client on It. In this article, the installation method of Moonlight on the Raspberry Pi OS has been explored, and by downloading the package of Moonlight using a curl command.

About the author

Hammad Zahid

I'm an Engineering graduate and my passion for IT has brought me to Linux. Now here I'm learning and sharing my knowledge with the world.