Monerobox has been using Rock64 since the beginning of the project back in November 2018 because it has a USB 3 port which can utilize the faster IO read/write of a SSD. Pi 4 was not yet released and Pi 3 does not have any USB 3 port. I have been thinking to support Pi 4 since its release and finally I have time to make this happen.
We will walk through how to setup a Monerobox running on Pi 4B headless, the Pi will boot from the SSD connected to a USB 3 port, both Raspberry OS and Monero blockchain data will be stored on the SSD.
- Raspberry Pi 4B (at least 2GB RAM recommended) and power supply.
- A SSD larger than 120 GB, Monero blockchain occupies about 90 GB on disk, 120 GB SSD will run out soon. This SSD is for OS system partition and Monero data.
- A SSD enclosure to host the SSD and to connect to Pi 4B. Example: https://www.amazon.de/-/en/dp/B071W35YBS/?coliid=IWA9HJ4VCR5W8&colid=2RBGNL0YS58NW&psc=1&ref_=lv_ov_lig_dp_it
- A MicroSD card, this is only for flashing bootloader of Pi 4B to support USB boot.
- Optional: Pi 4 SSD storage expansion board X862. This can replace the SSD enclosure if you prefer.
Warning: Make sure the interface and size match when buying SSD and SSD enclosure. If you buy an enclosure that supports SATA M2 2280 then you should buy a SATA M2 2280 SSD. SSD interface are sometimes confusing as there are SATA, NVME and even mSATA…
- Make your Pi 4B able to boot from USB mass storage device: following the tutorial. You will need a microSD card for this step.
- Write Raspbian OS image to SSD using Raspberry Pi Imager: You can connect the SSD enclosure(with SSD hosted) or X862 expansion board to your laptop and follow this tutorial to install Raspberry Pi OS (32-bit) on your SSD.
- Set up your Raspberry Pi headless: We are going to setup the Pi without a monitor. First, we need to enable SSH by creating an empty file in the “boot” partition of the SSD(It is mounted in the path “/media/jason/boot” in my case, it will be different on your laptop). You can use the following command:
Second, we will enable WiFI by creating a file “wpa_supplicant.conf” in the directory “/media/jason/boot/”. Here is a example of the content of the config file:
country=<Insert 2 letter ISO 3166-1 country code here>
ssid="<Name of your wireless LAN>"
psk="<Password for your wireless LAN>"
Explanation of the config file can be found at https://www.raspberrypi.org/documentation/configuration/wireless/headless.md
4. Booting Pi 4B: Unmount the SSD from your laptop and connect to your Pi 4B and start it. Wait for about 5 minutes for Pi initialization. The Pi will boot from SSD and SSH will be enabled by default and it will connect to the WIFI specified in the “wpa_supplicant.conf” file.
5. Connect to Pi 4B: If you are using Ubuntu you can connect to the Pi with command:
If this does not work, you have to login to your router and find out the IP address of the Pi(default hostname of Pi is raspberry). The default username is “pi” and password is “raspberry”.
6. Install Monerobox software: You can clone the monerobox repository and run the installation script:
git clone https://github.com/monero-ecosystem/monerobox.git
cd monerobox && git checkout pi4
The Pi will reboot after installation complete.
7. Start Monerbox: SSH to your Pi after reboot and then you can start the Monerobox with the following command:
cd monerobox && ./start_manager.sh
It will initialize the Docker setting for Monerobox and download and running Monerobox docker images.
8. Status check: Wait for about 5 minutes, you should be able to access Monerobox on Pi 4 using the web browser on your laptop by URL: http://http://monerobox.local or using the IP address that you find in step 5.
Assembling the box
If you are using a SSD enclosure, all you need to do is install the SSD in to the enclosure according to you instruction provided by the enclosure and then you can connect it to Pi or your laptop.
If you use an expansion board Geekworm X862, install the Pi and the board according to the instruction provided by X862.
I also designed a 3D-printing box to house the Pi and expansion board.