Headless Raspberry Pi Setup – The easy 4 step approach

A headless Raspberry Pi is a Raspberry Pi connected to the LAN without the use of peripherals such as keyboard, mouse or a monitor. This is the only way I have ever used a Raspberry Pi with the exception of my retropie console.

I have one headless Raspberry Pi in the freezing dark out in my tool shed right now serving this web site and another one running “node red” serving as a security camera. Needless to say the benefits of having a stand-alone computer are many. This will be a KISS (keep it simple, stupid) approach to hooking it up to a local area network (LAN) using 4 simple steps. Overall installation time should be less than 10 minutes if everything goes smoothly.

headless raspberry pi

Headless Raspberry Pi connected to the LAN (image by author)


  • A LAN network on which credentials are obtained
  • Any Raspberry Pi  model with Wi-Fi capabilities
  • A power adapter 5V 2.5A
  • Micro SD card with whatever OS you want to have in you Raspberry Pi
  • A tool for investigating the devices connected to your router – such as “nmap” or the app “IP scanner” if a smartphone is preferred. Even more simple is of course to log in to the routers admin-page (usually something like and look for the connected clients.



It is assumed that the micro SD card is already etched with some sort of OS for the Raspberry Pi and therefore those steps are omitted here.


Step 1 – Access the “Boot” directory on the SD card

Once the micro SD card has an installed OS image and inserted into your computer – the “boot” directory can be accessed.


Step 2 – Create the “wpa_supplicant.conf” file

In the “boot” directory create a file “wpa_supplicant.conf” file.

  • In a Linux environment this can be done by e.g. typing “nano wpa_supplicant.conf”.
  • On a Windows computer this step is best performed by copying some other existing file in the “boot” directory and removing its content and renaming the copied file to “wpa_supplicant.conf”.
  • The content in the wpa_supplicant.conf file should be the following (replace red text with credentials):
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
country=<Insert 2 letter ISO 3166-1 country code here>

 ssid="<Name of your wireless LAN>"
 psk="<Password for your wireless LAN>"

Here is a list of ISO 3166-1 country codes, look at the “Alpha-2” column


Step 3 – Create the “ssh” file

In the “boot” directory, in the same manner as the wpa_supplicant.conf on the previous step create a file named “ssh”. This file is to be empty. In the Linux environment this is easiest done in the terminal by typing “touch ssh”.


Step 4 – Wrap it up

That’s it, insert the SD card in the Raspberry Pi, plug it in within the extent of your LAN-range and wait a few (like 5) minutes before you check the IP-devices in your LAN, hopefully there should have emerged a headless Raspberry Pi to the list! From here it is possible to connect through SSH (in Linux you could just open a terminal and enter something like ‘ssh pi@ (or whatever the address to the pi might be) in order to connect. Alternatively use the PuTTY software which is free to download.

Unless it is a retropie the login user is “pi” and the password is “raspberry“.

When connected to your Raspberry Pi continue with “sudo raspi-config” in order to activate VNC, expand the file system etc. Don’t forget to run ‘sudo apt-get update’ and ‘sudo apt-get upgrade’ when everything is done.


Possible Issues setting up a Headless Raspberry Pi

Some pitfalls I have encountered when setting up a headless Raspberry Pi:

  • Exclusively on Windows computers after creating the “wpa_supplicant.conf” and the “ssh” files, the Pi simply would not connect to Wi-Fi. This can be remedied by forcing to use the format “Linux/Unix style line breaks”. In Notepad++ (a more versatile editor than “Notepad”) this can be managed by navigating the tabs Edit – EOL Conversion – UNIX/OSX Format. If all went as planned  “UNIX” should be shown in the status bar and the files should be interpreted correctly. Another way to do this is to copy one of the files in the “boot” directory as mentioned above.
  • Disconnect VPN services when trying to establish SSH connections.

headless raspberry pi headless raspberry pi