How to Setup your Raspberry Pi Zero without Keyboard and Monitor?

projects ideas for raspberry pi zero

I suppose you just bought a Raspberry Pi Zero, but you didn’t take a complete kit
You are now stuck to install it because there are only mini ports on it (mini USB and mini HDMI)
Or maybe you don’t have any screen or keyboard available
Anyway, I’ll help you to install it with nothing: no keyboard, no monitor or even no ethernet cable

How to set up your Raspberry Pi Zero without Keyboard, Monitor and Ethernet?
It’s possible to install your Raspberry Pi to get access to it directly after the boot
To do this, you need to flash your SD card and after that edit configuration files directly from your computer
The goal is to get an SSH access as soon as the Raspberry Pi is online

In this tutorial, I’ll show you how to do this if you have nothing: no keyboard, no monitor or even no ethernet cable for the Raspberry Pi Zero W (wireless)

Download Raspbian

Raspbian is the Linux distribution dedicated to Raspberry Pi
Built by the Raspberry Pi Foundation specifically for this product, it’s the best system to start on Raspberry Pi

Raspbian exists in several versions:

  • Lite: without graphic interface, you have only a terminal where you can enter commands
  • Desktop: with GNOME as the default interface and a lot of other softwares like Chromium, LibreOffice, …
  • Full: with all the recommended softwares to start on Raspberry Pi, everything is already here

For this tutorial I’ll do the test for you on Raspbian Lite, but it’s working on any version
And probably you’ll do the same choice, as a graphical version without screen is useless 🙂

Download the image from the official website and move to the next partdownload raspbian
If you can, I recommend using Torrent for a faster download

Flash the SD Card

Then you need a micro SD card to copy the image on it
I can help you without keyboard or monitor, but you really need an SD card 🙂
If you don’t have one yet, check my recommended products page

To copy the image on the SD card, we’ll use a tool that does everything for you
Follow this procedure to create the SD card:

  • Download Etcher from this page
  • Install it on your computer
    It’s available for any operating system
  • Start Etcher
    It looks like that:
    etcher menu
  • Insert the SD card in your computer
  • Click on “Select image” and browse to find the image file on your computer
  • Etcher will auto-select the drive when you insert the SD card
  • So just click on “Flash” to copy the files on the SD card

After a few minutes, the SD card is ready
But as we are not able to configure the Raspberry Pi Zero with a screen and a monitor, there are some extra steps to do

Allow SSH access

The main goal of this tutorial is to get access to the Raspberry Pi via SSH as soon as it starts
By default, SSH is not enabled on Raspbian (for security reasons)
So you need to follow this procedure to force SSH to start on boot:

  • Insert your SD card into your computer again (eject and re-insert if always inside)
  • Your system should display the “boot” partition in your file explorer
    If not, go to your file explorer and find the boot drive in the left menu (probably D: or E: on Windows)
  • You should see the content, it looks like this:
    boot partition raspbian
  • You need to create a new file in this folder
    Do a right-click, then choose “New” => “Text document” and name it “ssh”
    Without extension and nothing inside
  • Be careful on Windows, extensions aren’t displayed and it will probably keep ssh.txt
    You need to go in View > Options > View to uncheck “Hide extensions for known file types”
    Then remove the .txt at the end of the file name

That’s all
With only this empty file, Raspbian will enable SSH on boot and you can connect to it directly

If you don’t have ethernet you also need to configure the WiFi connection (next paragraph)
Otherwise, you can skip the next paragraph

Configure WiFi settings

If you also need to use a wireless connection with your Raspberry Pi Zero, you need to do the same thing for the WiFi configuration

  • Access the boot partition from the SD card on your computer
  • Create a new file named “wpa_supplicant.conf”
    Right-click in the folder, select “New” in the context menu, and “Text document”
    Then rename the new document to “wpa_supplicant.conf”
  • But this time we need to put something inside: the WiFi SSID and password
  • Open the wpa_supplicant.conf file with your favorite editor
  • Paste these lines inside:
    country=US
    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
    update_config=1
    
    network={
     ssid="SSID"
     scan_ssid=1
     psk="PASSWORD"
     key_mgmt=WPA-PSK
    }

    Adjust these settings to fit your network environment (country, ssid, password and security type)

    This file is not at the usual place, but it’s a common file on Raspberry Pi and Linux
    You’ll find all the help you need on the Internet if you have specific settings to configure
    For example, here is the Debian wiki about this

  • Save the file and exit

That’s it, the WiFi configuration is also on the SD card
So everything should work at the first try 🙂

First boot

Insert the SD card

Eject the SD card from your computer (preferably by using the safely remove tool)
Insert it on your Raspberry Pi and start it

The Raspberry Pi Zero starts as soon as you plug it to a power source, there is no start button

Download Putty

While the Raspberry Pi is starting, you can download a tool to use SSH
SSH is a secure way to access devices on a network
You’ll get exactly the same thing as if you had a screen and a keyboard

You can download Putty from the official website here
Download the version corresponding to your operating system
For windows, there are a portable and an installer version, both are fine

Connect to the Raspberry Pi

It’s now time to connect to your Raspberry Pi
But before, you need to know its IP address

As I already wrote an article on this topic, I won’t repeat here
Check my tutorial on how to find the Raspberry Pi IP address and come back here later
If you have a web interface on your DHCP server (internet box probably), it can be the easiest way

Now that you have the IP address, use this procedure to access the Raspberry Pi:

  • Start Putty
    Either in the start menu or in the Downloads folder depending on the chosen version
  • The Putty interface looks like that
    puTTy configuration
  • Enter the IP address in the “Host name” field
  • Then click on “Open” to connect
  • A black screen will open, asking for a login and password
    Use the default Raspberry Pi account:
    • Login: pi
    • Password: raspberry

Congrats, you now have access to your Raspberry Pi and can work on it as if you had a screen and keyboard
From here, you can follow a classic “How to guide” to finish the Raspbian installation and configuration
I recommend at least to update your system and change the default password

If needed you can check my Raspbian installation guide to know exactly how to do this
Go directly to the Raspbian Lite part and skip the first paragraphs as you already done most of the work

Related Questions

Is it possible to copy an SD card from another Raspberry Pi? Yes, that’s what I did when I bought my first Raspberry Pi Zero. I didn’t know we could do like I taught you today, so I made all the installation on the Raspberry Pi 3B+ and then put the SD card into the Raspberry Pi Zero. You can also use Win32 Disk Imager to create an image from an existing SD card and flash it to another

Conclusion

That’s it, you now know how to install a Raspberry Pi Zero with only a power cable
You need no screen, keyboard or ethernet cable to do this
And obviously, it’s also working on any other Raspberry Pi

Now, what’s next?
If you need some ideas to play with your new Raspberry Pi Zero, check my article about 16 cool projects ideas to do with the Raspberry Pi Zero
All these projects ideas are taking advantage of its small size to build awesome things

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *