Headless Raspberry Pi Setup With SSH and Wi-Fi

· 3 min read raspberry-pisshlinuxsetupheadless

A headless Raspberry Pi runs without a monitor, keyboard, or mouse. You control it entirely over your network from another computer via SSH. This works well for servers, media boxes, and embedded projects where a desk setup would be wasted space.

What you need

  • Raspberry Pi (3B or newer recommended for built-in Wi-Fi)
  • MicroSD card, 16 GB or larger
  • A computer with Raspberry Pi Imager installed
  • 5V USB-C (Pi 4/5) or micro-USB (Pi 3) power supply, 3A minimum
  • Your Wi-Fi network name and password

Step by step

  1. Open Raspberry Pi Imager and pick the latest Raspberry Pi OS Lite (64-bit) as the operating system. Lite has no desktop, which saves memory on a headless box.
  2. Insert the microSD card into your computer and select it as the storage target in the imager.
  3. Click the gear icon (or "Edit Settings" on newer versions) to open OS customization before writing. This is where all the headless magic happens.
  4. Enable SSH under the Services tab and choose password authentication. Set a username and password you will remember; the old default pi/raspberry account is no longer created automatically.
  5. Under Wireless LAN, enter your Wi-Fi SSID and password, plus your country code so the radio uses legal channels.
  6. Optionally set a hostname like pi-server and configure locale and timezone so logs and timestamps make sense.
  7. Write the image to the card. The imager applies your customization settings during the flash, so nothing needs editing afterward.
  8. Eject the card, insert it into the Pi, connect power, and wait about two minutes for first boot.
  9. From your computer, run ssh youruser@pi-server.local. If .local resolution fails, check your router's DHCP lease list for the Pi's IP address and use that instead.

Once logged in, run sudo apt update && sudo apt full-upgrade to bring everything current, then reboot.

Common mistakes

  • Skipping OS customization and expecting to edit config files on the card afterward; modern imagers handle this cleanly, manual edits are error-prone.
  • Using an underpowered phone charger that causes undervoltage throttling and random crashes.
  • Typing the Wi-Fi password wrong; the Pi boots fine but never joins the network.
  • Trying to log in as pi when your custom username was different.

Related guides

After your Pi boots headless, put it to work: block ads network-wide with [[pi-hole-network-ad-blocking]], or turn it into a file server with [[raspberry-pi-network-storage]]. If you plan to attach hardware later, [[gpio-led-blink-python]] shows how to access the pins over SSH too.