The following tutorial applies to a Raspberry Pi 4 running Ubuntu server, check this page to read more about Ubuntu server on RPi. We are going to build the ela and ela-cli binaries to run them on the RPi, for more information you can check the official GitHub repository of the Elastos node. Let’s start by building the binaries. Run the following commands on your RPi once connected to it (via SSH or direct access).
1 – Install go
sudo apt-get install golang-go
2 – Configure the different paths as follow
mkdir $HOME/dev export GOPATH=$HOME/dev export GOBIN=$GOPATH/bin export PATH=$GOBIN:$PATH
3 – Clone the GitHub repository and checkout the latest tag (currently v0.5.1)
git clone https://github.com/elastos/Elastos.ELA.git cd Elastos.ELA git checkout tags/v0.5.1
4 – Build the binaries with the make command
The make command will build the ela and ela-cli binaries. To check that everything is in order, just run:
./ela --version ./ela-cli --version
Now that we built the ela and ela-cli binaries we are going to run an Elastos full node on the RPi, to do so:
5 – Create a new wallet
./ela-cli wallet create -p $PASSWORD
Replace $PASSWORD by your own password. This command will generate a new wallet and store your secure information to the keystore.dat file
6 – Start the node
echo $PASSWORD | nohup ./ela > /dev/null 2>output &
Again, don’t forget to replace $PASSWORD by your own password you used above. And that’s it!
Congrats, you just started running an Elastos full node on your Raspberry Pi 😉 You can now use the REST API or JSON RPC to get more information about your node👍
Stay tuned for more Elastos on RPi related content. If you are interested in the topic, I am also building the Elabox, a plug-and-play hardware to run several Elastos services without any effort.