BerryLan simplifies headless Raspberry Pi install

No-Head Start

© Lead Image © donatas1205,

© Lead Image © donatas1205,

Article from Issue 235/2020

BerryLan installs a system on a Raspberry Pi that can be integrated into the wireless network with a smartphone app over Bluetooth.

The Raspbian operating system can get the Raspberry Pi up and running – with or without a desktop environment. Starting with the standard installation, the system can be adapted to your own needs with very little effort. However, this requires a connected keyboard, mouse, and monitor. Even SSH access is a little more complicated because Raspbian has not started the SSH server automatically for some time now [1].

Building a headless Raspberry Pi (i.e., a computer without peripherals or even a network cable) requires more effort and a certain amount of know-how. Before the Raspbian system starts for the first time, the /etc/wpa_supplicant configuration file has to be edited and the network access credentials entered.

The BerryLan project seeks to handle this work for you wirelessly over Bluetooth with a smartphone app. With the customized Raspbian image and a smartphone, the Raspberry Pi system will be running and on the network within a few minutes.

Jump Start

For BerryLan [2], developers resorted to the proven Raspbian distribution but have limited themselves to the Lite version (see the "Raspbian Lite" box). In addition to the basic system configuration, only the Nymea network manager [3] is added, which lets you set up the network for the Raspberry Pi on a smartphone over a Bluetooth LE connection without manual interaction. The open source project offers the apps in the respective app stores.

Raspbian Lite

The Raspberry Pi Foundation maintains a branch of its operating system that installs a lightweight system without a graphical user interface, thus conserving the limited resources of the Raspberry Pi. The Lite version is therefore recommended for users who want to run the Raspberry Pi in headless mode (i.e., without input and output devices). If necessary, however, the system can be upgraded to the familiar user interface by importing some application packages with the package manager:

$ sudo apt install raspberrypi-ui-mods rpi-chromium-mods lightdm

To load the graphical desktop environment, call sudo raspi-config and select the 3 Boot Options | B1 Desktop/CLI | B4 Desktop Autologin option.

Installing BerryLan is similar to installing a normal Raspbian system: You download the current version of BerryLan from the project homepage, extract the ZIP archive (, and write the resulting image file to the desired memory card. As usual, you can do this with the familiar command-line tools or with cross-operating system graphical tools such as Etcher [4].

If you own a Raspberry Pi that already runs Raspbian, you don't necessarily have to set up the system again with BerryLan and adapt the system to your requirements. In the project FAQ [5] you will find instructions on how to extend an existing Raspbian system with BerryLan.


After writing the SD memory card, slot it into the Raspberry Pi and boot the system. For configuration, install the BerryLan app suitable for your smartphone. The developers maintain variants for Android [6] and iOS [7]; for this article, I used the Android version of the app.

The app immediately tries to detect the Raspberry Pi over Bluetooth, so Bluetooth must be enabled on the mobile phone. On the other side, you have to allow BerryLan on Android to retrieve the device location. Don't let this confuse you: This is not about GPS tracking, but about Bluetooth routines that can also be used for locating purposes [5].

The Raspberry Pi you booted with BerryLan shows up in the app as BT WLAN setup (Figure 1). However, other pairing-capable Bluetooth devices also appear in the list. When you tap on the Raspberry Pi in the dialog, BerryLan transfers all wireless networks in the immediate vicinity detected by the Raspberry Pi to the app (Figure 2). In the next step, select the desired network and enter the appropriate access credentials with the smartphone's keyboard. Once the connection has been established, the app displays the IP address of the freshly installed Raspbian system (Figure 3).

Figure 1: The Raspberry Pi booted with BerryLan shows up in the BerryLan app as BT WLAN setup.
Figure 2: The Raspberry Pi scans the environment for available wireless networks and transfers the list to the BerryLan app on the phone.
Figure 3: After establishing the connection, the app displays the Raspberry Pi's IP address on the smartphone.

Now that you have the IP address, you can log on to the system under Linux by typing

ssh pi@<RaspPi-IP>

(Figure 4). The password is the usual raspberry. Alternatively, use an SSH client for Android such as JuiceSSH [8] or the Termux [9] Linux environment adapted for Android.

Figure 4: In contrast to Raspbian, the SSH server is enabled out of the box on BerryLan. For security reasons, you will want to change the password immediately.

Now you will want to change the password without delay. To do this, either call sudo raspi-config and select the 1 Change User Password option or run the passwd command on the Raspbian system's terminal and follow the prompts.


BerryLan proves to be a useful helper after the install. If you want to use the Raspberry Pi on another wireless network, you simply boot the Pi in the usual way and launch the BerryLan app again. As in the initial installation, the smartphone should then detect the BerryLan Raspberry Pi over Bluetooth, and you can configure the wireless network in the app.

The BerryLan developers have hardly changed the Raspian system itself; they have simply added their own package source, from which the Bluetooth-enabled add-on for the network manager is installed. The operating system can be updated in the usual way, because all the updates and post-install packages come from the official Raspian package sources. BerryLan is therefore ideally suited as a basis for users who want to use a Raspberry Pi on different wireless networks in a number of scenarios.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus