Machu Picchu: Persistent IPFS node on Raspberry Pi3 — Part 1

Position of the IPFS inside Machu Picchu

version of September 7, 2021

The following is an explanation of how I installed a Raspberry Pi 3 Model B+ to serve as a persistent IPFS node in Machu Picchu. My Vision: Machu Picchu, Tech4Good

This document is composed of 3 parts, and a bonus:

  • Part 1 explains the Raspberry Pi and why it interests Machu Picchu. You may want to read it to get acquainted with this Single Board Computer and its very helpful community. It might also give you ideas how to use it for your own project. This is what you are reading.

Although I’m doing my best to explain each step, at some point you might need to do a Google search for more details. Your lifesaver, whenever you are puzzled by an error message in the installation, is to paste in Google the text of the error message followed by “Stackexchange”.

Machu Picchu Tech4Good, IPFS & blockchain

Machu Picchu is why I’m installing this IPFS node. Here is a quick description of concepts used in Machu Picchu if you are new to it. [Nov 2021, Machu Picchu in 40": https://youtu.be/MRz5oKHRg-8]

  • IPFS is an Internet protocol to decentralize storage of data.

Machu Picchu is open source and collaborative.

Raspberry Pi, briefly

Raspberry Pi is a complete computer in the size of a credit card. Its name comes from the tradition of naming computers by fruits, like Apple, Macintosh, Orange, Blackberry, Acorn and Apricot. It was launched by the BBC in February 29th, 2012. The initial purpose was to provide a low-cost, hackable computer to educate children in computers. Nine years later, the target audience expanded from U.K. children to people of all ages in all countries. More than 38 million units have been sold.

Raspberry Pi3 Model B+ slided in the base of its enclosure

https://en.wikipedia.org/wiki/Raspberry_Pi
https://www.tomshardware.com/news/raspberry-pi-9th-birthday

The CPU has a RISC architecture of 32 and 64 bits, with ARM instruction set and is clocked between 0.7 Ghz and 1.5 Ghz, depending on the model. It has from 521 MB and up to 8 GB of memory. It can run Linux, Windows 10 IoT Core and many other OS. The latest version has Wi-Fi, Gigabit Ethernet, Bluetooth, USB, HDMI.

The major difference with the usual consumer computers is that it is very modular, its starting price is very low and its target user is the kind of person who is ready to learn by doing.

For example the price can be as low as 22 EUR VAT and shipping included, for the Raspberry Pi Zero 2W. Despite this low price, this board has quad-core CPU, 512 MB RAM, Wi-Fi, Bluetooth for the mouse and keyboard, 1 mini HDMI connector for the display, 2x micro USB connectors, 1 micro-SD slot (for the memory boot program). The user still has to add a Bluetooth keyboard and mouse, a display screen and a power supply.

As a final note, the IBM 360 series of my youth in 1974 topped at 10 MFlops and the RPi 3 is benchmarked at 192 MFlops, 20 times faster.

Raspberry Pi and Machu Picchu

As a full size computer with programmable outputs, the Raspberry Pi has been used to build many weird and/or ambitious projects. The International Space Station has 2 Raspberry Pi running every year kid programming contests driving scientific experiments. It is normal that Machu Picchu intends to use a Raspberry as its IPFS node.

The requirements for an IPFS node for use by Machu Picchu in a remote village are:

  • Internet access

There are 7 Raspberry Pi models that satisfy these requirements.

Selection from this table:

  • For Machu Picchu, Wi-Fi is enough, we require no Ethernet.

For the above reasons, we selected to start with the Pi3 Model B+, because of its low power consumption and its dual-band Wi-Fi. If more RAM is needed we could upgrade to the Pi4 Model B. On the opposite, if a lower performance is enough, we may try the Pi Zero 2W [Nov 2021] with 512 MB RAM.

Additional reading: https://www.elecrow.com/blog/differences-between-raspberry-pi-b-b-a-2b-3b.html

Official Raspberry Pi typical power requirements: https://www.raspberrypi.org/documentation/computers/raspberry-pi.html#typical-power-requirements

A RPi Zero 2W would run for more than a week on a 12V lead-acid battery: https://www.youtube.com/watch?v=lPyDtuzYE5s

Install the IPFS node

Part 2a and Part 2b contain the step-by-step guide to build the Raspberry Pi3 kit and install the IPFS node. Each step has been checked during the redaction of this article.

Machu Picchu — Data as a Public Service