Headless Pi Setup From Scratch
No monitor, no keyboard, no HDMI cable hunting. Here's the zero-peripheral setup I use for every new Pi, from imaging to first SSH login in under ten minutes.
1. Image the card properly
Use Raspberry Pi Imager and press Ctrl+Shift+X for the hidden advanced menu:
set the hostname, enable SSH, drop in your public key, and configure Wi-Fi — all before first boot.
2. First boot
ssh pi@raspberrypi.local # or find it the honest way: nmap -sn 192.168.1.0/24 | grep -B2 Raspberry
3. The three things to do immediately
sudo apt update && sudo apt full-upgrade— yes, before anything else.- Disable password SSH auth in
/etc/ssh/sshd_config. Keys only. - Set up unattended-upgrades. A Pi you forget about is a Pi that gets owned.
That's it. Everything else — Docker, monitoring, the works — belongs in a follow-up post, and unlike most blogs I'll actually write it.