Raspberry Pi Headless Setup

  1. The first thing to do is to write the Raspberry Pi operating system to an SD card.

  2. Please go to the following link https://www.raspberrypi.org/downloads/ and download the Raspberry Pi imager for whatever OS you are using on your laptop (Windows/ Mac/ Ubuntu)

  3. I have a windows OS running so I downloaded the executable file for that. Click on the executable and install the Raspberry Imager. Once successfully installed it will launch automatically.

     

  4. Insert the SD card into your laptop. Once done select the “Choose SD Card” and select the SD Card

  5. Select “Choose OS”. While it is recommended to use NOOBS for beginners, NOOBS uses a graphic interface which cannot be displayed in headless mode. Thus, I will go for Raspbian, which is a version of debian running on Raspberry Pi.

    1. Select Raspberry (Other)

    2. Then select Raspberry Lite. This will the OS that you will be installing

  6. Once you select the OS, the “Write” button will be enabled. Please click on “Write” to install the OS on the SD Card. It will verify the installation and then prompt you that the installation is complete.

  7. Once this is done, still leave your SD Card plugged in your laptop

  8. Go to the SD card, there you should see ONLY ONE folder boot. This is the root directory.

  9. You will have to create a file named ssh under the root directory. By default, the current version of Raspbian has SSH disabled. We're going to enable it here. Within the boot directory, Right-Click > New > Text Document and rename the document ssh. Make sure that the file has no file extension, i.e. remove the .txt if you created the file by selecting New > Text File.

  10. Then open Notepad or any other text editor and paste the given lines in it. Insert your SSID and WiFi password. Rename the document to wpa_supplicant.conf.

    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 country=CA network={ ssid="wifi ssid" psk="wifi password" }
  11. Once done, save this file as wpa_supplicant.conf.

     

  12. Your boot folder should contain these two files. Eject your SD card from the laptop

  13. Insert it into Raspberry Pi board. Connect power onto mini USB port of Raspberry Pi board.

    Once it is powered, a red light will show up on side of Raspberry Pi board. The green light indicates the reading of the SD card.

  14. Install an IP Scanner or access your Router to get the IP of the Raspberry Pi. I have used Advanced IP scanner. Easy to use and implement.

  15. Once it detects the IP, launch putty and under the Host Name enter the IP for the Raspberry Pi. Then click on Open

     

  16. It will start with a warning, click “YES” and enter the user name and password. This is by default

    username: pi password: raspberry
  17. Once signed you will see a screen like this

     

  18. Once logged in follow these commands

    passwd #you should change your password from the default one sudo apt-get update sudo apt-get dist-upgrade #this will update the software

11. Once you have done, you have completed the first step in this configuration. You have successfully configured a headless Raspberry Pi 3B+ and connected to it via your WiFI and SSH.

 

Continue to Part 2 (Apache Server Setup)

The Rumie Initiative