Tested on:RPi3; RPi0; RPi0w; Raspbian Stretch
Prerequisites:Raspberry Pi with Raspbian Jessie and internet connection (see steps 1-7 in the Introduction)
2-4 RPi 0
Power source with 5V/2.5A

Raspberry Pi Zero cluster with the ClusterHAT

The impressive ClusterHAT by Chris Burton makes one controller Raspberry Pi manage four Raspberry Pi Zero as an ethernet cluster. Amazingly, one version of the software running the ClusterHAT even manages to do so without sd cards for the RPi0s!
This tutorial shows how to install the ClusterHAT first and then a trivial demo application.

Download the ClusterHAT image from the manufacturer or look on his support website for newer versions.
Unzip, then burn the image onto an sd card with at least 8GB. Plug it into the controller after burning.

Now, plug the ClusterHAT, the Raspberry Pi 3 and the four RPi0s together. The RPi0s needs to be connected to the ClusterHAT with their USB and not power connectors!
The USB port powering the ClusterHAT needs to be connected to the top usb port next to the ethernet port like in the image. Next, connect the controller with screen, keyboard and, at last, the power source. After a while, the controller is booted. The login name is pi and the password clusterhat.

ClusterHAT assembly


Starting ClusterHAT
Enter in the terminal

This makes the RPi0s boot one after another. After 5 minutes, the script can be stopped by pressing CTRL+c. The RPi0s can be accessed over ethernet now.

Exchanging SSH keys
In the terminal of the controller, enter

Now, all RPi0s can be accessed without entering a password.

Cluster Test
For testing the ClusterHAT, one of the RPi0s, p1.local, runs a RAM-intensive script. Then, the controller measures the RAM status on all four RPi0 over SSH. Enter in the terminal of the controller

This installed and started the script ram_eater.py on p1.local. Now, enter

Instead of free, a different programm could have been run on all RPi0s simoultaneously over SSH.



After a few seconds, p1.local needs ten times more RAM than the other RPi0s.

Full script
Click on Full Script to show all of the code.

Stopping ClusterHAT
Before shutting down the controller Raspberry Pi, it’s necessary to turn off the ClusterHAT:

Further readings

ClusterHAT image: http://dist.8086.net/clusterhat/ClusterHAT-2017-11-29-lite-2-usbboot.zip
ClusterHAT Homepage: https://clusterhat.com
ClusterHAT FAQ: ClusterHAT without sd cards: https://8086.support/content/23/85/en/how-do-i-setup-usbboot-no-sd-cards-in-the-pi-zeros-for-the-cluster-hat.html
Support website ClusterHAT: https://8086.support/content/23/88/en/guide-to-using-the-rpiboot-test-image-on-the-cluster-hat_zero-stem-or-just-a-usb-cable.html
Tutorial: Burning a disk image to an sd card: http://www.knight-of-pi.org/installation/

Knight of Pi

Johannes Bergs aka Knight of Pi. Diploma in Bioinformatics, some Webdesign and Python coding then. Living in the beautiful city of Vienna.


Time limit is exhausted. Please reload CAPTCHA.