How To: Run an EtherGem Node on a Raspberry Pi 3
EtherGem, “EGEM,” is a pure community-based coin with no pre mine. True to its roots as a cryptocurrency, the Proof of Work mining community will always be a part of the EGEM future and is the foundation of the EGEM launch. There is no ICO on EGEM and EGEM is its own primary blockchain, not just a token or concept on another chain. Technically EGEM is an Ethereum chain as described in the yellow paper, with EIP150, EIP155, EIP158 applied from block 0
In this article I will run you through the steps to set up an EtherGem Node on a Raspberry Pi 3. Running your own full node will give you direct access to the EtherGem blockchain.
Step 1: Update and Upgrade your System
This part is simple enough. Just enter:
apt-get update && apt-get upgrade -y
Step 2: Install build-essential tools
apt-get install -y build-essential
This is required for building Debian packages
Step 3: Install Screen
apt install screen
This will let you manage multiple programs from the command line in one terminal.
Step 4: Install Git
apt install git -y
This installs git, which we will need to clone go-egem and egem-network-intelligence.
Step 5: Download and Install the Go Tools
5.1) wget https://storage.googleapis.com/golang/go1.10.linux-armv61.tar.gz
This will get the required version for the Pi3
5.2) tar -C /usr/local -xzf go1.10.linux-armv61.tar.gz
This unpacks the tools
5.3)
mkdir -p ~/go: echo “export GOPATH=$HOME/go” >> ~/.bashrc
then
echo “export PATH=$PATH:$HOME/go/bin:/usr/local/go/bin” >> ~/.bashrc && source ~/.bashrc
This will set up Go Tools and set the environment variable to point to the directory in which it was installed
Step 6: Clone Go-Egem and Build
6.1) git clone https://github.com/TeamEGEM/go-egem.git
This clones go-egem into your current directory
6.2) cd go-egem && make egem
This will move into the go-egem directory and build go-egem.
Step 7: Start & Sync Go-Egem
/root/go-egem/build/bin/egem — datadir ~/livenet/ — rpc console
This will start go-egem and set up the data directory. You will then see go-egem syncing
You will know when it is finished by typing eth.syncing into the terminal. If syncing is completed, it will return false. If not you will get a response with the current block
Step 8: Restart Node with Screen
exit go-egem with Ctrl+C (or Ctrl+d if that does not work). Then start a new screen with the following:
screen -S go-egem
This will start a screen with the name go-egem. Then just start your node up again:
/root/go-egem/build/bin/egem — datadir ~/livenet/ — rpc console
Now you can press the following to detach the screen
Ctrl+A
THEN
Ctrl+D
This will keep go-egem running. You can type the following to see all screen instances
screen -ls
Then type the following to attach to the screen
screen -r go-egem OR screen -r 10598 (make sure its the Name/# on your terminal)
Repeat the same steps above to detach the screen.
Your EtherGem node is now up and running, but there are a few more steps you need to take to show up on network.egem.io
Step 1: Clone Egem Net Intelligence
You may want to first move to your users home directory
cd ~/
then clone Egem Net Intelligence from github with the following:
git clone https://github.com/TeamEGEM/egem-net-intelligence-api
Step 2: Edit app.json With Your Information
First you will want to move into the net-intelligence directory you just cloned
cd egem-net-intelligence-api
Then you will use nano to edit app.json
nano app.json
Here you can change the instance name, contact details, and other options. When finished save the file and exit nano
Step 3: Set Up PM2 and Install Dependencies
All that is left now is to install npm (if you don’t already have it) and pm2. You may also need to update node depending on what version you are using.
apt-get install npm -y && sudo npm install -g pm2 && npm install && ln -s /usr/bin/nodejs /usr/bin/node
This should install everything you need to run pm2 and net-intelligence. Now just do the following:
pm2 start app.json
You should now see node-app running, and can view with:
pm2 show <id|name>
You should now be able to see your node on https://network.egem.io/
That’s all there is to it. The only process that is really different on the Pi 3 is the version of go you will be downloading. A big thanks go out to the devs for helping me set this up. In the next article I will show how to go from here to hosting your own mining pool with open-egem-pool.
If you have any questions feel free to ask here, or join the EtherGem Discord.