Set Up a Headless Raspberry Pi Before It Boots
Raspberry Pi Imager bakes hostname, user, Wi-Fi and SSH into the card, so your Pi joins the network without a monitor.
The Raspberry Pi is on the desk, the microSD card sits in the card reader, and there isn't a spare monitor or keyboard anywhere in the flat. Good news: you don't need either. The plan is a headless Pi, one that joins your Wi-Fi on its very first boot and waits for you to log in over the network.
The trick lives in Raspberry Pi Imager, the official flashing tool for Windows, macOS and Linux. Version 2.0 rebuilt it as a step-by-step wizard, and the current release is 2.0.12. Its Customisation pages bake hostname, user account, Wi-Fi and SSH right into the image, so the Pi boots ready to go.
Step 1: Install Imager and pick your hardware
On Windows and macOS, download the installer from the official Raspberry Pi website and run it. On Linux, there's an AppImage, and on a Pi running Raspberry Pi OS you can type sudo apt install rpi-imager.
Then plug in the microSD card and work through the first three tabs:
- In the Device tab, select your Raspberry Pi model and click Next.
- In the OS tab, choose the operating system. For a headless Pi, Raspberry Pi OS Lite is the recommended pick, because a desktop you never see only wastes space and memory. Click Next.
- In the Storage tab, select your microSD card and click Next.
Take the storage step slowly. If several drives are connected, the size is usually the best clue, and when in doubt, unplug the others. Keep Exclude system drives enabled: it prevents you from accidentally wiping your own PC's disk.
Step 2: Name your Pi
Since Raspberry Pi OS supports customisation, the Customisation tab opens next. You could click Skip customisation, but then the Pi asks for all of this on first boot, which is useless without a screen. So fill it in.
In the Hostname page, enter a name using only letters, numbers and hyphens, such as garden-pi, and click Next.
The hostname becomes your Pi's address on the local network.
That name matters more than it looks. Your Pi announces it on the network using mDNS, so other devices can later reach it as garden-pi.local instead of a hard-to-remember IP address.
Step 3: Region and user account
- In Localisation, choose your capital city. Imager fills in the time zone and keyboard layout automatically, and you can adjust both separately. The city also sets the Wi-Fi regulatory domain, so pick the country you're actually in.
- In User, enter a username and password, then click Next. Usernames must be lowercase and may contain only letters, numbers, hyphens and the
_character.
For a headless Pi, these are the credentials you'll use to log in over SSH. The same password is also required for sudo commands, so make it a proper one.
Step 4: Wi-Fi details
In the Wi-Fi page, select Secure network for a password-protected network. Imager usually pre-fills the network name and password of the Wi-Fi your computer is connected to. Check the SSID, enter the password in both fields if needed, and tick Hidden SSID only if your router doesn't broadcast the name.
Double-check the network name: a typo here means the Pi never shows up.
This is the single most important page for a headless setup. Without working Wi-Fi details, the Pi has no way to get online after it boots. Also keep in mind that some Raspberry Pi models and wireless adapters don't support 5 GHz networks. If your router has separate 2.4 and 5 GHz names, the 2.4 GHz one is the safer bet. No Wi-Fi at all? An Ethernet cable to the router works too.
Step 5: Switch on SSH
In Remote access, turn on Enable SSH, then choose how you'll log in:
- Use password authentication lets you sign in with the username and password from Step 3. Easiest for beginners.
- Use public key authentication uses an SSH key instead. If your computer already has a public key in the standard place, Imager fills it in; otherwise paste yours or click Browse.
SSH stays off unless you turn it on here.
The Raspberry Pi Connect page that follows is optional. It links the Pi to your Raspberry Pi ID account for browser-based remote access, using an auth key that you create on the Connect website. Personal auth keys expire six hours after creation, so only set it up if the Pi will boot and get online soon after.
Step 6: Write and verify
Before writing, click App Options at the bottom left if you want Imager to play a sound or eject the card automatically when it's finished. Then:
- Review the Summary in the Writing tab.
- Click Write.
- Confirm the warning with I understand, erase and write, and approve the admin prompt if your system shows one.
- Wait for writing and verification to finish. You can skip verification, but don't: it catches bad cards before they waste your evening.
- Click Finish on the Done page.
Step 7: Boot and find your Pi
Insert the card into the Pi and connect power. Give it a few minutes, because the first boot does some setup work. Then, on your computer, open a terminal (on Windows 10 and 11, the built-in Terminal or Command Prompt has an SSH client) and try:
ping garden-pi.local
If you get replies, log in with ssh [email protected]. The first time, SSH shows a security warning about an unknown host; type yes and enter your password. You're in.
If the .local name doesn't resolve, find the IP address another way:
- Open your router's web interface and look at the list of connected devices for your hostname.
- Scan the network with Nmap, for example
nmap -sn 192.168.1.0/24(adjust to your own subnet). - Use a network scanner app such as Fing on a phone in the same network.
Then connect with ssh yourname@<IP address>. Prefer a graphical client? PuTTY does the same job.
When the Pi doesn't show up
Nine times out of ten, it's the Wi-Fi: a typo in the SSID or password, the wrong capital city in Localisation, or a 5 GHz-only network. Re-flash the card with the corrected details; Imager may already have your previous customisation values filled in, so this goes quickly. If the Pi has an Ethernet port, plugging it into the router is the fastest way to rule Wi-Fi out.
Our verdict
For anyone setting up a Pi as a home server, ad blocker, sensor station or tinkering box, Imager's customisation pages turn a fiddly first boot into a two-minute form. Do this today: flash a card with hostname, user, Wi-Fi and SSH filled in, and enjoy logging into your Pi without ever plugging in a monitor.


