Skip to main content

Headless setup for a Raspberry Pi

A headless Raspberry Pi is one that does not need a monitor, keyboard or mouse. It can be used remotely over the network, by connecting to it using SSH or VNC.

There are many instructions on the Web about how to configure the Wi-Fi and enable the SSH server, by creating a wpa_supplicant.conf and ssh file in the boot partition of the microSD card. The Raspberry Pi Imager v1.6, released in March 2021, also has a hidden advanced mode for this and to perform some additional configurations. But both have limitations, such as they do not set up the VNC server.

I’ve written a shell script to set up a microSD card for headless operation.

It can configure the following:

With it, setting up a headless Raspberry Pi is easy:

  1. Image the Raspberry Pi OS onto a microSD card.
  2. Run the script.
  3. Put the microSD card in the Raspberry Pi and turn it on.

Download it from the raspi-headless-setup GitHub repository.

See also

External links

Download the Raspberry Pi Imager
Official site for the Raspberry Pi Imager and Raspberry Pi OS.
Raspberry Pi Imager v1.6 update notes
Describes the hidden advanced mode feature.