2024 update: this tutorial is not up to date with bookworm. It only works with bullseye


If you have a Raspberry Pi and don’t want to hook it to a monitor, don’t worry! You can still minimally set it up without connecting it to a monitor or connecting a keyboard. You can do everything by writing a few files inside its boot partition.

I’m writing this article because, in my experience, this information is hard to find. I’ve found scattered information in many different websites, and now I’m gathering all the info I know inside this article.

Setting up SSH access

For SSH access, it’s really simple: just create an empty file “ssh” at the root of the boot partition and it’s done.

$ cd /path/to/boot
$ touch ssh

The SSH server will start automatically on boot with this.

Setting up username and password

It’s almost as simple as setting up SSH. First you need a SHA-256/SHA-512 hash of your password, you can generate it with this command: openssl passwd -6 (it’ll prompt for your password)

Then write an entry like /etc/shadow from linux in a file called userconf in the root of the boot partition. Suppose you name your username is “alice” and your password is “kirisame”, the contents of userconf will be:

alice:$6$yqEuLGSsDBTJS8n0$6zwfPH0XVFoMrAR7YNvoAro9eXBzNywJYuQnjEpiBOc3tWUY4wmU7fyNX3fqZ5mwx3LW5iyaKgt/9ZGHStYEi/

Setting up WiFi

WiFi setup is as simple as writing wpa_supplicant.conf configuration file to the root of boot partition:

country=<your country code eg US>
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
  scan_ssid=1
  ssid="<your wifi ssid>"
  psk="<your wifi password>"
}