Headless Setup of Raspberry Pi without Keyboard and Monitor

In this tutorial, we will learn how to headless setup raspberry Pi without using Keyboard, Mouse, Monitor, or even a USB to serial converter. Firstly, we will see how to install raspberry image on Raspberry Pi using a Raspberry Pi imager. After that, we will enable SSH and Wi-Fi without external using Monitor, mouse, or Keyboard with raspberry pi.

Headless Setup of Raspberry Pi without Keyboard and Monitor

Imagine, you have bought a new Pi board and you do not have Monitor, mouse, or Keyboard? How will you make it work? No worries, we will guide you through this tutorial.

I remember when I purchased the Raspberry Pi first time. I was excited to use it as soon as I received it. When I started to set it up, I came to know that I need an external keyboard, monitor, and mouse. Then, I started searching for a solution to set up raspberry pi without any external components. Because if we use external Keyboard, Mouse, Monitor, it will surely cost us some
bucks.

This is a step-by-step guide for an easy headless setup for Raspberry Pi without using a keyboard and monitor.

You will require the following equipment for the headless setup of Raspberry Pi.

Hardware components:

  • Raspberry Pi (Buy here)
  • MicroSDHC Card
  • USB cable

Software components:

  • Raspberry Pi Imager
  • VNC Viewer (RealVNC)

Install Raspberry Pi OS to a microSD card

We will start by installing Raspberry Pi OS to a microSD card using the Raspberry Pi Imager.

The first step is to head over to the official Raspberry Pi OS website and download Raspberry Pi Imager. We will download the Windows version. You can download the version according to your operating system.

Make sure your system has an SD card reader.

Install Raspberry Pi Imager

After you click the download button the .exe file will start downloading. Click that file after the download is complete, and install the Raspberry Pi Imager on your system.

Write the OS to microSD card

After the installation is complete, run the Raspberry Pi installer. The following window will open. Here, head over to the operating system section and click ‘Choose OS.’

Raspberry Pi Imager choose OS

Select ‘Raspberry Pi OS (32-bit)’ as the operating system.

Raspberry Pi Imager choose OS pic 2

Now head over to the storage section and click ‘Choose storage.’

Raspberry Pi Imager choose storage

Make sure you have your microSD card inserted in your system when you reach this step. Select your microSD card as storage.

Raspberry Pi Imager choose storage pic 2

By now you should have selected the operating system and the storage as shown below:

Raspberry Pi Imager pic 2

Let us move forward. Click the settings icon. This will open the Advanced settings menu.

Raspberry Pi Imager Advanced Settings pic 1

Tick the boxes as shown below. Here we are setting the hostname and then enabling SSH. For SSH, we have to provide a username and a password. Moreover, we also configure the Wi-Fi and select the wireless LAN country. Now save your options.

Raspberry Pi Imager Advanced Settings pic 2

Now click the ‘Write’ button.

Raspberry Pi Imager WRITE pic 1

You will be notified that all your data already present on your microSD card will get deleted. Click ‘Yes’ to continue the process.

Raspberry Pi Imager WRITE pic 2

Now the writing process will start. It will take a few minutes for the OS to be written and then verified.

After the process is completed you will receive a ‘Write Successful’ notification. Click ‘Continue’.

Raspberry Pi Imager WRITE pic 5

Now you can remove the microSD card from your system. Insert the microSD card into Raspberry Pi and power it up.

Raspberry Pi insert microSD card

SSH Raspberry Pi with Putty

Now after your Raspberry Pi is connected to your system with the microSD card inserted inside it, let us establish an SSH connection.

We need an application such as putty to establish an SSH connection with Raspberry Pi. We will be using Putty in this tutorial. We will use Putty for Windows. It is a free-to-download SSH client.

Download Putty from this link and install it on your Windows based system. 

DOWNLOAD PUTTY

After downloading and installing Putty. Now type “Putty” in the Windows search bar and run it as an administrator. 

After you have downloaded it successfully, open Putty. Enter raspberrypi.local as the host name and leave the port to 22 (default). Now press Open.

SSH into RPi Putty Configuration picture

If you are using Linux or Mac, you can SSH into Raspberry Pi by using the following command:

ssh pi@raspberrypi.local

Now enter the username and password of Raspberry Pi that we previously set. By default the username is ‘pi’ and the password is ‘raspberry.’ But we have set the password to different in the above steps using raspberry pi imager.

SSH into RPi Putty Configuration pic2

Now our RPi is connected with the command prompt. Let us learn how to enable and connect over VNC next.

Access Raspberry Pi GUI using VNC

We can also access the Desktop or GUI of Raspberry Pi without using a monitor and keyboard. For that purpose, we will use a VNC viewer application.

Enable VNC

To access GUI, first, we need to enable a VNC interface option in Raspberry config settings. To enable it, first SSH into raspberry by following the steps mentioned in the last section.

Type the following command in the terminal:

sudo raspi-config
raspberry pi enable vnc interface

This will open the Raspberry Pi Software Configuration Tool window.

Select ‘Interface Options.’

Raspberry pi software configuration tool interface options

Inside that, select ‘VNC’ to enable it.

Raspberry pi software configuration tool enable VNC

Select ‘Yes’ to enable the VNC Server.

Raspberry pi software configuration tool pic 3

The following notification shows successful enablement of the VNC Server. Click ‘Ok.’

Raspberry pi software configuration tool pic 4

Head over to ‘Finish’ to close the configuration tool window.

Raspberry pi software configuration tool pic 5

Installing and Connecting over VNC

Now download and install the VNC viewer on your system.

Download VNC Viewer

After the installation is complete, open the VNC viewer. Go to File > New connection.

VNC Viewer new connection

The Properties window will open up. Here specify the hostname as ‘raspberrypi.local‘ then click ‘Ok.’

VNC Viewer properties

Now click the connection icon to connect successfully.

VNC Viewer connect

If you get a warning, just click ‘Continue’ to proceed forward.

VNC Viewer warning

Now the authentication window will open up. Enter the username and password. The default username and password are ‘pi’ and ‘raspberry’ respectively. Click ‘Ok.’

VNC Viewer authentication

The Raspberry Pi desktop will now open up.

VNC Viewer desktop

Video demo:

You may also like to read:

Leave a Comment