How to Setup RetroPie With Moonlight Steam Streaming on Raspberry Pi

About: I'm a YouTube Maker and Creator who loves to find ways outside of the box to create and use things. My primary mission is to teach what I have learnt in the simplest way possible to all human kind. Follow me...

In this article, you are going to learn how to setup your blog in your Raspberry Pi.

If you really enjoy this article, consider checking out my TechWizTime YouTube Channel.

And for an awesome source of Raspberry Pi Accessories, check out my Raspberry Pi Amazon List.

Let’s get started!


Step 1: What You'll Need

  1. Raspberry Pi 1, 2 or 3
  2. 8GB MicroSD Card
  3. Wired Controller
  4. Keyboard
  5. WiFi or Ethernet Connection
  6. PC with Nvidia Shield (GeForce GTX 650 or greater)

Step 2: Download and Install Moonlight

Press "F4" In your RetroPie installation.

Type "sudo nano /etc/apt/souces.list"

Press "Enter"

Type in "deb jessie main"

Pres "Enter"

Press "Ctrl X" "Y" and "Enter" to save the file.

Type in "sudo apt-get update"

Press "Enter"

Type in "sudo apt-get install moonlight-embedded"

Press "Enter"

Press "Y" when it asks for confirmation.

Step 3: Configure Moonlight

Type in "cd /opt/retropie/configs"

Press "Enter"

Type "mkdir moonlight"

Press "Enter"

Type "cd moonlight"

Press "Enter"

Type in "moonlight map"

Press the corresponding keys when you're asked to.

Once you finish, type in "moonlight pair YOURPCIPADDRESS"

You'll be given a pair number, head over to your PC and insert that number when you're asked to and press "Connect"

Step 4: Type Some Code

Type in "sudo nano /etc/emulationstation/es_systems.cfg"

Scroll down to the very bottom, but stay above "/systemList"

Type in "





<extension>.sh .SH</extension>





Press "Ctrl X", "Y" and "Enter"

Type in "mkdir ~/Retropie/roms/moonlight"

Press "Enter"

Type in "cd ~/Retropie/roms/moonlight"

Press "Enter"

Type "sudo nano"

Press "Enter"

Type in "#!/bin/bash"

Press "Enter"

Type in "moonlight stream -30fps -mapping /otp/retropie/configs/moonlight/ YOURPCIPADDRESS"

Press "Ctrl X", "Y" and "Enter"

Type "sudo cp"

Press "Enter"

Type in "sudo nano"

Press "Enter"

Change the "-30fps" to "-60fps"

Press "Ctrl X", "Y" and "Enter"

Step 5: Create the Shortcuts

Type in "sudo chmod +x"

Press "Enter"

Type in "sudo chmod +x"

Press "Enter"

Type "exit"

Press "Enter"

Wait for Emulation Station to load up.

Once it loads, you can see the steam shortcuts there, scroll and click on them to stream your favorite games.

Congratulations, you’ve just configurated your Raspberry Pi to stream your Steam games via Moonlight and that’s it for this Instructable.

If you enjoy this Instructable, consider checking out my TechWizTime YouTube Channel.

And for a good source of Raspberry Pi products, check out my Raspberry Pi Amazon List.



    • Colors of the Rainbow Contest

      Colors of the Rainbow Contest
    • IoT Challenge

      IoT Challenge
    • Fandom Contest

      Fandom Contest

    4 Discussions


    7 months ago

    I may be too late but I used the ffg on the pi3.

    moonlight map -input /dev/input/event2

    /dev/input/event2 may not correspond to the controller you are setting up

    you can check other inputs if the controller is not responding using:

    ls -l /dev/input/


    1 year ago

    arghhh same here, anyone got it fixed? useless to have steam without controller mapping


    1 year ago

    Unfortunately, when I get to the part in step 3 where I type

    "moonlight map" I get an error stating

    "You need to specify one input device using -input."

    I tried to follow the rest of the guide hoping that the device configuration could be fixed at a later point but the option for Steam does not appear in the list.

    1 reply

    Reply 1 year ago

    Same thing for me. Can't really proceed until this part is figured out.