The world’s leading publication for data science, AI, and ML professionals.

The Easiest Headless Raspberry Pi Setup

A quick-start guide to set up a headless Raspberry Pi with your smartphone.

Ah, the Raspberry Pi – a small, affordable Linux computer that is loved by tinkerers and programmers alike. I’ve been playing around with Raspberry Pi’s for a while now, and in this article, I’ll do my best to boil down my experience and get you up and running with you a headless Raspberry Pi in a nifty way that I discovered recently.

Maybe it’s your first time using a Raspberry Pi or maybe you’re a veteran, but regardless, you will likely glean some tips that will make your headless Raspberry Pi setup a better experience.


The coolest thing about this method is that the usual problem of setting up a headless Raspberry Pi is solved in an elegant way: How do you connect to a headless Raspberry Pi to configure the Raspberry Pi’s network access when the Raspberry Pi has no yet been connected to the network?

Usually, we would have to manually add a wpa_supplicant.conf file with our fixed WiFi credentials into the boot drive of our microSD card.

With this method, using some cool open-source Bluetooth technology and a smartphone app, we can dynamically configure our headless Raspberry Pi’s WiFi network. The benefit here is that it’s a nicer interface than manually editing some file, and it lets you switch your headless Raspberry Pi’s WiFi network on-the-fly and without having to pull out your microSD card again, in the case your Raspberry Pi loses connection to your current WiFi network.

You just need to be within Bluetooth range of the Raspberry Pi and you’ll be able to configure the Raspberry Pi’s network using the smartphone app.


First of all, what is a headless setup and why should I do it? In a traditional Raspberry Pi setup, you would need to have a monitor, keyboard, and mouse plugged into your device – it’s a bit clunky and inconvenient.

A headless setup is the Raspberry Pi minus the monitor, keyboard, and mouse. Running a headless setup lets us forego the extra peripherals and directly control the Raspberry Pi wirelessly from any other computer (my laptop for example).

The main advantage I see of the headless setup is convenience, but I have been in many situations where there are no extra peripherals laying around, and the headless setup is the only way to go (did someone say hackathons?)


Let’s get started. I have a Raspberry Pi 3, but any Raspberry Pi will work with this setup.

All we’ll need is the following to get setup.

  • Raspberry Pi
  • 4GB or greater microSD card
  • Windows, Mac, or Linux computer
  • Adapter(s) to plug in your microSD card into your computer
  • iPhone or Android device

Once we’ve gathered our materials, we are halfway done.

Go onto your Windows, Mac, or Linux computer and download the latest BerryLan flavored Raspbian image. This is the standard Raspbian image with a preinstalled program called BerryLan which will help us get our Raspberry Pi connected to WiFi without having to mess around with configuration files.

BerryLan is open-source software which uses an app on our phone to communicate to our Raspberry Pi via Bluetooth and update the network configuration files for us.

Once it’s downloaded, unzip it somewhere for later.

Also on your Windows, Mac, or Linux computer, download Belena Etcher – we’ll use this to flash this image onto the microSD card. Once downloaded, install it and open it.

Plug in your microSD card and adapter setup into your computer.

Click Flash from file and select the image we downloaded.

Next click Select target and find and checkmark your microSD card.

Once you click flash, Balena Etcher will begin to flash the image to your microSD card.


While we are waiting for this to finish, let’s pull out your iPhone or Android device and download the BerryLan app (App Store/Google Play).

By now, your image has hopefully finished flashing so we can pull out the microSD card (Balena Etcher safely ejects it for you) and insert it into the Raspberry Pi. Plug your Raspberry Pi into a power source and let it boot.

At this point, the Raspberry Pi cannot connect to the internet since it doesn’t know our WiFi credentials yet. In this BerryLan flavored Raspbian image, when our Raspberry Pi cannot connect to any WiFi sources, it will automatically begin listening for us to give it some WiFi credentials through our phone over Bluetooth.

Open the BerryLan app and you should see that there is one Bluetooth device to connect to.

Once we click the Bluetooth device, we will see a list of all WiFi sources that our Raspberry Pi can see. Log into your Wifi network.

Tada! Our Raspberry Pi should now be connected to our WiFi network. And BerryLan even gave us a handy private IP address to reference where we can access our Raspberry Pi remotely from any device on our WiFi network. Feel free to screenshot this page – we may need this private IP address.


At this stage, our headless setup is complete! Wasn’t that pretty painless? One last thing is to verify that we can SSH into our headless Raspberry Pi setup to actually control the thing. SSH stands for Secure SHell and lets us remotely control another device.

Depending on what platform your computer is using, open Windows PowerShell or a macOS/Linux command line and type the following:

ssh nymea@nymea

ssh nymea@<PRIVATE_IP_ADDRESS> (if the above command doesn’t work)

You’ll see a warning come up about the authenticity of the host – type in yes.

Then you’ll be prompted for your Raspberry Pi’s password, which in this image, by default is nymea.

You should be greeted with this login screen. You’re in! Go on, get started with that project now!

P.S. Change your default Raspberry Pi password using the passwd command.


Related Articles