Share
How to Set up WiFi on Your Raspberry Pi Without a Monitor (Headless)

August 8, 2023
9 minutes
Share
What you’ll need
Interests
Series
Howchoo is reader-supported. As an Amazon Associate, we may earn a small affiliate commission at no cost to you when you buy through our links.
Posted in these interests:



1 – Put the Raspberry Pi OS SD card into your computer
If you don’t have Raspberry Pi OS installed, go ahead and install it. Make sure the SD card with Raspberry Pi OS is in your computer using an SD card slot or SD card USB adapter.
How to Install Raspberry Pi OS on Your Raspberry Pi
Get the new official Raspberry Pi OS on your Pi.
If you're using Raspbian (an older version of Raspberry Pi OS) for some reason, thats okay too!
2 – Navigate to the boot directory
The SD card will mount as a drive/directory on your computer called boot. Open the drive using Finder (Mac) or Explorer (Windows). In Finder on Mac, you can also select Go > Go to Folder from the menu bar and enter/Volumes/boot
.
3 – Add your wpa_supplicant.conf file
Open a plaintext editor such as Notepad (Windows) or TextEdit (Mac) and create a new file. Add the following to the file for Raspberry Pi OS, Raspbian Stretch, or Raspbian Buster:country=US # Your 2-digit country code
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
network={
ssid="YOUR_NETWORK_NAME"
psk="YOUR_PASSWORD"
key_mgmt=WPA-PSK
}
If you’re using Raspbian Jessie or older, use this instead:
network={
ssid="YOUR_NETWORK_NAME"
psk="YOUR_PASSWORD"
key_mgmt=WPA-PSK
}
Finally, save the file. If you’re using TextEdit on Mac, you’ll need to go to Format > Make Plain Text in the menu bar before saving. Make sure the filename is exactly wpa_supplicant.conf (remove .txt
if it gets added).
Connecting to unsecured networks
To connect to wireless networks with no password on your Raspberry Pi, use the following:country=US # Your 2-digit country code
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev # Include this line for Stretch
network={
ssid="YOUR_NETWORK_NAME"
key_mgmt=NONE
}
With this file in place, Raspberry Pi OS will automatically move it in /etc/wpa_supplicant/ when the Raspberry Pi is booted.
The next step is to boot the Pi and test, but while the SD card is still in your computer I’ll mention this now. If you’re going to try to connect via SSH, you may need to enable it first. The process is similar to this one.
4 – Put your SD card in the Raspberry Pi, boot, and connect
Next, put the micro SD card into the Pi, boot it, and your Wi-Fi should be connected! The wpa_supplicant.conf file should disappear from the SD card’s boot directory automatically—so if you don’t see it next time, that’s normal.5 – Troubleshooting
If your Pi hasn’t connected to Wi-Fi, try these wpa_supplicant troubleshooting tips:- Double-check that the file was written in plaintext, without any special characters.
- Double-check that the file has disappeared from your boot directory.
- Connect the Pi to a TV or monitor via HDMI to ensure it is booting normally.
- If you’re using a Raspberry Pi Zero W, make sure you’re attempting to connect to a 2.4GHz network (the Zero doesn’t support 5G).
- If you’re using a Raspberry Pi Zero, make sure it’s a Raspberry Pi Zero W, not a regular Zero (only the W supports Wi-Fi and Bluetooth).
How to Run a Minecraft Server on the Raspberry Pi

December 7, 2023
There are several ways to go about running a Minecraft server on the Raspberry Pi. In this guide, I’ll cover how to install Nukkit—a cross-platform Minecraft server that’s super easy to set up on the Raspberry Pi. This server should work with PCs, consoles, and tablets running Minecraft 1.14. I’ll be using a Raspberry Pi
Continue Reading