Although I do enjoy sitting at my desktop and playing games, sometimes I miss the days when could sit on the couch and play Call of Duty or GTA. Combining both and streaming games to my living room television seemed perfect.
This Instructable demonstrates the full process of installing Moonlight on a Raspberry Pi 2/3. Moonlight is a program that allows the Raspberry Pi to communicate with your computer. In order to complete this project, you should possess a general understanding of the command line and of Linux based operating systems. With this knowledge anyone with basic technical comprehension should be able to follow the steps below.
Step 1: Parts, Materials, and Tools
Step 2: Installing RetroPie
Etcher is a program that mounts and flashes the operating system we downloaded onto our SD card. Insert the SD card into the available SD port in your computer using the card reader. Download the correct version of Etcher for your computer.
Once the download is complete:
- Open the installer and click I agree
- Wait for the installation to finish and Etcher will open with a window that looks similar to Picture 1.
- Download RetroPie for Raspberry Pi 2/3.
- Wait for the download to finish
- Return to the Etcher window.
- Click Select image.
- Navigate to where you downloaded the zipped RetroPieimage and select the file.
- The SD card should automatically pop up as the drive. If it does not appear, click Select drive and find the card under Devices and Drives.
- Finally, click Flash! and wait for Etcher to format and install RetroPie onto your SD card.
Once the program says Flash Complete! like in Picture 2, you now have a fully functional RetroPie.
Step 3: Setting Up GameStream
Download GameStream on your host PC from the NVIDIA website. GameStream allows your PC to stream games to other devices, allowing the computer and Retropie to communicate. Once the file downloads, follow the instructions to install, leave settings as their defaults and do the following:
- Open the GeForce Experience application once it has successfully installed.
- Click the Preferences tab at the top of window and select the SHIELD category.
- Ensure the Allow this PC to stream games to SHIELD devices box is checked like in the Picture 3.
Step 4: Setting Up Network on RetroPie
Next, we need to launch RetroPie for the first time and begin the initial setup. Connect an HDMIcable from the Raspberry Pi to the TV/monitor. Power up the Raspberry Pi using the 5V power supply. You will see four raspberriesat the top left-hand corner of the screen and the setup running. Wait for this setup to finish.
If everything is working properly you will see a loading screen with Emulation Station in the center of the screen. Once the loading has completed, you will be asked to setup a gamepad as you see in Picture 4.
- Connect your controller along with the mouse and keyboard into the USB ports on the Raspberry Pi.
- Follow the on-screen instructions to configure your gamepad.
In order to configure your WiFi, you will need to:
- Select the RetroPie logo to go to the page shown in Picture 5.
- Scroll down and click on the WIFI option from the list.
- Click on Connect to WiFi Network, find your network and enter in the password.
Click Exitand return to the page in Picture 5 and do the following to allow the computer to use the Retropie's terminal in the next step (you may need your mouse and keyboard for this part):
- Select the RASPI-CONFIG option.
- Choose 5. Interfacing Options Configure connections to peripherals
- Click P2 SSH Enable/Disable remote command line access to your Pi using SSH.
- Select to enable the SSH server.
- Finally, click and to return to the menu shown in Picture 5.
Step 5: Connecting Computer to RetroPie
We will use an application called Putty to control the RetroPie terminal from our computer. DownloadthePutty.exe file that fits your PC (either 32-bit or 64-bit). Once the file downloads, follow the instructions to install, leave settings as defaults.
Now that we have Putty installed, we need to determine the IP address of the RetroPie. If you do not know how to open your Router's setup, you can follow these instructions.
- Open your router's setup from a new web page with the address specific to your router.
- Login to your router and look at the connected devices.
- Find your RetroPie from the list (it should appear as "retropie") and write down the IP Address.
We can officially connect the PC to the RetroPie using the newly acquired IP Address:
- Launch the Putty application and enter the IP address of the RetroPie in the Host Name(or IP address) box as seen in Picture 6.
- Click Open and this will open a command window for the RetroPie.
- Enter in the username and password, for RetroPie this is username: pi and password: raspberry.
Your terminal window should look similar to Picture 7. You are now able to install the Moonlight software on your RetroPie from your PC.
Step 6: Find PC's IP Address
There are multiple ways to determine the IP Address of our PC. The first process is described in Step 5. Another way uses the terminal to obtain the address:
- In the search bar of your PC type in cmd and press Enter.
- Type in the command ipconfig and you will see the IP Address of your PC, which should be identical to the RetroPie's address minus the final 1-2 digit number as displayed in Picture 8.
You may also find the IP Address the same way you discovered the RetroPie's or by launching Control Panel:
- In the search bar type in Control Panel.
- Click View network status and tasks under Network and Internet
- SelectChange adapter settings on the far left side.
- Double-click on your wireless connection and clickDetails...
The final page can be seen in Picture 9. Record the IP Address for later use.
Step 7: Install Moonlight
In the next step, we will retrieve the shell script file for Moonlight from the Internet using "wget". This file will allow us to run and install the program through the terminal. Type the follow commands in the command line in the order they appear (you do not need to type the bolded "pi@retropie ~ $"):
pi@retropie ~ $ wget
Next we will be installing Moonlight on to the RetroPie. First, we need to make the moonlight.sh file we just obtained into an executable file. Be careful when using sudo, because the wrong command can severely damage the system.
- pi@retropie ~ $ sudo nano /etc/apt/sources.list
Now that the file is an executable we can run it:
- pi@retropie ~ $sudo ./moonlight.sh
Follow the on screen instructions to finish the Moonlight setup:
- Press 1 and Enter(this will complete four phases necessary to install Moonlight).
- When asked for the STEAM PC's IP Address, enter the IP Address we obtained in Step 6 and click Connect.
- On your PC, enter in the code you receive from the terminal in the window that appears, similar to Picture 10.
- Wait while the code finishes the next phases until it asks you to Reboot Now (y/n) ? and type y and Enter to reboot your RetroPie.
Now that we have Moonlight installed and paired the PC to the RetroPie we can officially launch our Moonlight program.
Step 8: Launching Moonlight
After your RetroPie has fully restarted, you should see a STEAM menu item on your RetroPie's screen like in Picture 11:
- Open the STEAM menu.
Choose which fps and resolution you would like to use.
You now have a full STEAM stream as shown in Picture 12, where you can choose the game you would like to play and begin streaming. Enjoy your new STEAM streaming machine!