
Setting up a RetroPie console on a Raspberry Pi can be daunting. I struggled with my first RetroPie setup, and I want you to have an easier time. I’ll walk you through everything you need to setup Wi-Fi with RetroPie.
The Basics
Before you connect your RetroPie gaming console to the internet, you’ll need to do a few things. First, make sure you’ve flashed the RetroPie image to an SD card and you’ve booted it up at least once. Obviously, you’ll also need a functional Wi-Fi router and an internet connection. You’ll also need a keyboard or controller to setup and navigate the menus in RetroPie.
If you need a full tutorial on setting up RetroPie, check out my full tutorial here.
There are two simple methods to connect RetroPie to Wi-Fi. A brief description of each method is listed below:
- Method 1. Using a USB keyboard. The first one requires you to connect a keyboard to a USB port on your Raspberry Pi. This is super convenient if you have an old keyboard laying around. As a bonus, I’ll show you how to change the keyboard settings from the Great Britain default to the US. Leaving the keyboard layout on the Great Britain layout causes problems with Wi-Fi passwords as the special characters on the European keyboard don’t match US keyboards.
- Method 2. Drag and Drop a .txt file. Many settings on a Raspberry Pi are stored in .txt files. The second method allows you to drag and drop a file containing your router’s login information onto your Raspberry Pi’s microSD card and then use a controller to enable Wi-Fi.
You can skip to the second method that uses the controller here.
Method 1 – USB Keyboard
Headache Avoidance
Let’s start with a key fact that may help you avoid some serious headaches: RetroPie comes from the UK, and there are differences between US and UK keyboards. If you’re in the US, you’ll need to adjust your keyboard region setting.
If you’re in the UK, or you’ve already localized your keyboard, jump ahead to Step 8.
1. – RetroPie USB Keyboard

To localize your keyboard to the US, you’ll need to get into the command terminal. You can do this by pressing F4 on your keyboard after RetroPie loads.
2. – Command Prompt
Enter the following command prompt exactly as you see it:

sudo nano /etc/default/keyboard
Next, press Enter.
3. – Change the Keyboard Layout

You’ll see that the XKBLAYOUT is set to GB. As mentioned earlier, the default is for Great Britain. Change GB to US (or whatever is the appropriate code for your country).

4. – CTL + X
Press Ctrl + x at the same time.
5. – Press Y for Yes

Press y for Yes.
6. – Press Enter

You’ll then be asked if you want to write the file to the same location. You want that. Press Enter.
7. – Reboot

This brings you back to the terminal. Type in the following text:
reboot
Press Enter.
You just used a Linux computer to change a setting. Congratulations! Not only will this prevent a major headache in the process of setting up a Wi-Fi connection, but it will enable you to install scripts and edit settings with ease in the future.
8. – RetroPie Configuration

Enter RetroPie Configuration. From the main screen after bootup, scroll left or right until the RetroPie image is selected. Select this option. If you’re using a controller, make sure you don’t use the start button. Pressing the start button at this point will bring you to the EmulationStation Main Menu. You want to choose RetroPie Configuration. If the screen looks like the one below, you did it correctly.
9. – Wi-Fi

Scroll down and select Wi-Fi. The options are listed alphabetically. As such, Wi-Fi is at the bottom. After you do this, you’ll enter a screen that may look a little intimidating if you’ve never done this before. Don’t worry; I’ll walk you through it.
10. – Select Your Country

The first screen will tell you that you haven’t set the Wi-Fi country yet. Use the directional arrows to highlight and select Yes. This will launch raspi-config.
11. – System Options

The default option is to choose System Options. Pressing Right will leave System Options selected and highlights the Select option at the bottom of the screen. Choose this option.
12. – Wireless LAN

Same thing as before. Press Right to leave Wireless LAN selected. This will also enable you to choose Select at the bottom of the screen.
13. – Choose Your Country

You have two options here:
- Scroll down using the D-pad to your country and select it.
- Use a keyboard to press the first letter of your country. This will skip ahead significantly in the list of countries. I pressed U for United States.
When your country is highlighted, press Right to bring the curser to the Ok button. Select your country.
14. – Choose Ok

There’s not much to do here except acknowledge that you selected your country.
15. – Enter SSID

Use your keyboard to enter the name of your Wi-Fi router. This must be entered exactly as it appears when you try to log in using a device. Incorrectly entered SSIDs will not work.
16. – Enter Your Password

Again, use your keyboard to enter your Wi-Fi password. Leave this blank if your router doesn’t have a password. Select Ok.
This step is the reason why people in the US need to change their keyboard settings. Go back to the beginning of this article if you’re in the US and you skipped those steps. You cannot see the password you enter. The keyboard default is for Great Britain, and there are differences between US and British keyboards.
17. – Update and Exit

That’s pretty much it. You’re all setup. It may take a minute for your Raspberry Pi to connect to your Wi-Fi router. After that, feel free to choose the Update option to test everything out.
Next, go to Finish. Then select Exit. Congratulations!
Method 2 – Drag and Drop a .txt file
1. – Download and open wifikeyfile.txt
Your Raspberry Pi saves a lot of configurations and settings in various .txt files. Wi-Fi is no exception. Download wifikeyfile.txt by clicking the button below.
2. – Enter your Router Info

This is pretty simple. In a .txt editor such as Notepad++, delete the dummy text inside the quotation marks on the top line and enter your router’s name exactly as it is named. Leave the quotation marks.
Next, delete the dummy text inside the quotation marks on the second line and enter your router’s password. Leave the quotation marks. If your router doesn’t have a password, leave the quotation marks and just delete the dummy text.
Save your changes.
3. – The microSD card
First, shut down your Raspberry Pi, remove your micro SD card, and place it into your computer.
4. – Open the microSD card

Navigate to the microSD card on your computer. Next, open the boot folder. The boot folder is probably the default. It should look like the photo above.
5. – Drag and Drop wifikeyfile.txt

You saved the changes to wifikeyfile.txt, right? Good. Drag and drop the file into the boot folder of the RetroPie micro SD card.
6. – Start RetroPie

Put the microSD card back in the Raspberry Pi and start it up again.
Go to RetroPie Configuration.
7. – Raspi-Config

Choose Raspi-Config.
8. – System Options




Select System Options > Wireless LAN > Your Country (For example: I chose United States) > Ok.
9. – Go Back



Cancel > Finish > Yes (to reboot).
10. – RetroPie Setup


From the main screen, go to RetroPie Configuration > RetroPie Setup.
11. – Configuration / tools

Acknowledge all of the errors and messages. Next, choose Configuration / tools.
12. – Wi-Fi – Configure Wi-Fi

Choose Wi-Fi – Configure Wi-Fi.
13. – Import Wi-Fi credentials from /boot/wifikeyfile.txt

Next, select Import WiFi credentials from /boot/wifikeyfile.txt. You have to wait a minute for your Raspberry Pi to connect to the internet. When it’s done, the router name will appear on the screen.
14. – Update

After the Wi-Fi connects, go to Exit > Back. This will bring you back to the screen shown above. I recommend you Update RetroPie. Let the Raspberry Pi work and update everything for you.
Congratulations!
What Features Does Wi-Fi enable?
A Wi-Fi connection expands the capabilities of RetroPie in several ways. They’re listed below:
- Updates. Computers update constantly, and the Raspberry Pi loaded with RetroPie is no exception. Emulators are constantly improved, expanded, and updated. Updating your RetroPie system with the latest revisions will improve performance and capabilities.
- Expansion. RetroPie only comes with a few emulators. However, there are many compatible emulators not included in the initial download. You can expand the list of systems available for emulation by installing new emulators.
- Adding roms. The SSH feature of RetroPie enables users to drag and drop roms from their home computers and laptops onto the SD card of their Raspberry Pi via Wi-Fi.
- Beautification. The default theme is pretty bland. Luckily, there are many themes available for RetroPie. Downloading and switching themes is a breeze. New themes not only add visual flair, they can also video previews of different games.
Final thoughts
I hope you enjoyed my tutorial on setting up Wi-Fi with RetroPie. Happy gaming!