This tutorial will help you setup and install a Myriadcoin full node on a Raspberry Pi from start to finish.
Start off by getting the required components
- A Raspberry Pi with at least 512MB of RAM (2GB is recommended though)
- 16GB or larger SD card that fits your choice of Raspberry Pi (My current PI uses around 10GB so a 16GB SD card works for now, but it might be too small in the future as the blockchain grows)
- Power adapter for the Pi
- A cool case for it, check out the 3d printable ones below (optional)
- A Sense HAT for a sweet light display (optional)
When writing this tutorial I tested it on a Raspberry Pi 4 with 4GB of RAM with a 16GB micro SD card, that complete setup cost me about $50. I have now tested it on more and cheaper models with great success. See the table below for all the devices that has currently been tested.
Device | RAM | CPU | Estimated cost | Note |
---|---|---|---|---|
Raspberry Pi 4 Model B | 4GB | 4x1.5GHz | $50 | No issues, works like a charm. Recommended! |
Raspberry Pi Zero W | 512MB | 700MHz | $15 | Follow ARM v6 instructions below. Takes a couple of days to compile and sync |
Device | RAM | CPU | Estimated cost | Note |
---|---|---|---|---|
Raspberry Pi 3 Model B | 1GB | 4x1.2GHz | N/A | Needs to use some Swap but works great |
Raspberry Pi 1 Model B | 512MB | 700MHz | N/A | Follow ARM v6 instructions below. Takes a couple of days to compile and sync |
Before we boot up the Pi we need to prepare the SD card.
-
Download Raspberry Pi Imager from https://www.raspberrypi.org/software/
-
Mount the SD card to your computer
-
Start Raspberry Pi Imager and install Raspberry Pi OS Lite on your SD card
-
Open up the SD card in your computers explorer (you might need to remount the SD card to make it show up)
-
If you plan to connect to the Pi remotely you need to create an empty file called
ssh
on the SD card -
If you want the Pi to connect to your wifi you should create a file called
wpa_supplicant.conf
on the SD card. Then paste the following into it (replacingNETWORK-NAME
andNETWORK-PASSWORD
with your wifi network name and password):country=US ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ ssid="NETWORK-NAME" psk="NETWORK-PASSWORD" }
Remember that certain flavors of the Pi, like the Pi 1 and the Pi Zero W, only supports 2.4Ghz wifi networks
-
Save the file and unmount the SD card
-
Insert the SD card into the Raspberry Pi and boot it up
-
After the Pi has booted you should be able to ping it using
ping raspberrypi
Congratulations you now have your Raspberry Pi up and running and connected to the internet.
This step is optional and is only required if you do not want to connect the Pi to a keyboard and monitor. These instructions are also made specifically if you have an ssh client available in your terminal. You can use other SSH clients and adapt the intructions to them.
- Make sure you followed the instructions of how to enable ssh in the previous step when setting up the SD card
- Open up a terminal
- Connect to the Pi using
ssh pi@raspberrypi
(pi is the username hence the pi@) - Use password
raspberry
once you are prompted - You should now see this or similar:
pi@raspberrypi:~ $
You have now successfully connected to the Raspberry Pi from another computer and are ready to install Myriadcoin. Great job!
- Run
wget -qO- https://github.com/rikardwissing/raspberry-pi-xmy-full-node/archive/refs/heads/main.tar.gz | tar xzfv -
- Then run
sudo raspberry-pi-xmy-full-node-main/auto-install
(see special instructions if using an ARM v6 device) - You can monitor the log by running
tail -f myriadcoind.log
- To monitor processes and network usage you can use bashtop by running
bashtop-master/bashtop
If you have an ARM v6 device (like the Pi Zero or Pi 1) you need to run sudo raspberry-pi-xmy-full-node-main/run-detached auto-install-arm6
(it will compile myriadcoin from source). It will run in a detached screen, so to see progress you need to run sudo screen -r
(detach from screen with Ctrl+A d)
Bashtop is a bit to CPU intensive for these devices so the script installs htop instead. Simply run htop
to monitor processes.
(Manual install does not work on Raspberry Pi Zero or 1, see automatic installation for those devices)
-
Download and extract Myriadcoin Core:
mkdir -p myriadcoin && wget -qO- https://github.com/myriadteam/myriadcoin/releases/download/v0.18.1.0/myriadcoin-0.18.1.0-arm-linux-gnueabihf.tar.gz | tar xzfv - -C myriadcoin --strip-components=1
-
Create a data directory for the Myriadcoin blockchain:
mkdir myriadcoin-data
-
Open a text editor to create a service
nano myriadcoin.service
and copy the following into it[Unit] Description=Myriadcoin After=network.target [Service] ExecStart=/home/pi/myriadcoin/bin/myriadcoind -datadir=/home/pi/myriadcoin-data -debuglogfile=/home/pi/myriadcoind.log -rpcpassword=rpc -port=10888 -disablewallet -listen -discover -upnp StandardOutput=inherit StandardError=inherit Restart=always User=pi [Install] WantedBy=multi-user.target
If you run on a device with a low amount of RAM you might want to test to increase the swap file or experiment with the following params
-blocksonly -maxmempool=100 -dbcache=20 -maxorphantx=10 -maxsigcachesize=4 -rpcthreads=1
-
Save the file using Ctrl+O (make sure the file is saved as
myriadcoin.service
) -
Exit the text editor by using Ctrl+X
-
Create a symlink of the service:
sudo ln -s /home/pi/myriadcoin.service /etc/systemd/system/myriadcoin.service
-
Start the service:
sudo systemctl start myriadcoin
-
Make sure it runs using
htop
-
Exit htop using Ctrl+C
-
Activate the service so it starts everytime the Pi boots
sudo systemctl enable myriadcoin
-
If you want you can monitor the log by running
tail -f myriadcoind.log
If your router supports UPnP Myriadcoin Core should open the correct ports and make your node public. If you find that after it has fully synced that it's still not public, you might need to configure your router manually to forward TCP port 10888 to the Pi.
In the extra/3d_prints
folder you'll find some sweet Myriadcoin branded Raspberry Pi cases.
They are modified versions of Malalo's and Make's designs.
Device | Image | Note |
---|---|---|
Raspberry Pi 3 | The sweet light display is provided by the Sense HAT script. See more on that below. | |
Raspberry Pi Zero | Isn't this just the cutest thing ever? |
If you have a Sense HAT I have prepared a script that displays the Myriadcoin logo and flashes in different colors when a new block has been found. Check it out in action here
- Get a Sense HAT (https://www.raspberrypi.org/products/sense-hat/)
- Run
sudo raspberry-pi-xmy-full-node-main/install-sense-hat