How to Set Up a Raspberry Pi Headless with SSH and WiFi
How to Set Up a Raspberry Pi Headless with SSH and WiFi Headless setup lets you run a Pi with no monitor, keyboard, or mouse — just power and network. This is the standard way to set up a Pi for any server or automation project. What You Need Raspberry Pi (any model) MicroSD card (8GB minimum, 16GB+ recommended) MicroSD card reader Raspberry Pi Imager (free — download from raspberrypi.com/software) Your WiFi network name and password Step 1 — Flash the SD Card 1. Download and open Raspberry Pi Imager 2. Click Choose Device and select your Pi model 3. Click Choose OS → Raspberry Pi OS (Legacy, 64-bit) or Raspberry Pi OS Lite (no desktop, smaller) 4. Click Choose Storage and select your SD card 5. Click the gear icon (or press Ctrl+Shift+X) to open Advanced Options Step 2 — Configure in the Imager (Critical Step) In Advanced Options: ✓ Enable Set hostname — name it something like pihole or mypi ✓ Enable SSH → Use password authentication ✓ Enable Configure wireless LAN → Enter your WiFi SSID and password → Set your country code (US) ✓ Enable Set username and password — change from default pi/raspberry ✓ Enable Set locale — set your timezone Click Save, then click Write. Step 3 — Boot and Connect 1. Insert SD card into Pi, connect power 2. Wait 60-90 seconds for first boot 3. From your computer, open a terminal and SSH in: bash ssh [email protected] or if .local doesn't resolve: ssh [email protected] Find the IP by checking your router's DHCP client list if .local doesn't work. Step 4 — First Boot Setup bash Update everything first sudo apt update && sudo apt upgrade -y Run the config tool for any remaining settings sudo raspi-config Reboot after updates sudo reboot Troubleshooting Can't connect via SSH — Double-check that SSH was enabled in the imager. On older Pi OS versions you needed to create an empty file named ssh on the boot partition. WiFi not connecting — Verify SSID and password. The Pi can't connect to 5GHz-only networks on older models (Pi 3 and earlier are 2.4GHz only). .local hostname not resolving — Install Bonjour on Windows, or find the IP in your router admin page. SD card not showing in Imager — Try a different USB port, or use a different card reader. Tips Set a static IP in your router's DHCP reservation table using the Pi's MAC address — prevents the IP from changing Add your SSH public key to ~/.ssh/authorizedkeys on the Pi to log in without a password Enable ufw firewall after setup: sudo ufw allow ssh && sudo ufw enable
Related Guides
- Raspberry Pi: Complete Headless Setup Guide (No Monitor Needed)
- Raspberry Pi: Headless OS Setup
- Setting Up OctoPrint on a Raspberry Pi as a Headless Print Server
- Arduino vs ESP32: Which Should You Use? A Practical Comparison
- Getting Started with Flipper Zero: The Complete Beginner Guide
- Getting Started with ESP32: GPIO, WiFi, and Your First Project
- Raspberry Pi GPIO: Complete Beginner Guide with Python Examples
- LightBurn Setup Guide: First Laser Job from Start to Finish