FREE GUIDES FOR CRYPTOCURRENCY NODE BUILDERS
  • Nodes
    • ALT-Coin Nodes >
      • Ethereum
      • Monero
      • Dogecoin >
        • Dogecoin
        • Dogecoin with display
        • Dogecoin Tor Network
      • Gamecredits >
        • GameCredits
        • Gamecredits with display
        • GameCredits Tor Network
    • Node Add-ons >
      • Wallet Functionality
      • Vanity Address Generators >
        • Bitcoin Vanity Address
        • Litecoin Vanity Address
        • Dogecoin Vanity Address
      • Node stats "Slideshow"
    • Bitcoin Desktop PC Node Software
  • Staking Nodes
    • Dash >
      • Dash - Standard
      • Dash - With LCD display
    • BlackCoin >
      • BlackCoin - Lore
      • BlackCoin - Lore - With LCD display
      • BlackCoin - Lore - Tor enabled
      • BlackCoin - Original
      • BlackCoin - Original - With LCD display
      • BlackCoin - Original - Tor enabled
    • PIVX
    • PinkCoin
    • GoByte >
      • GoByte - Standard
      • GoByte - With LCD display
  • Mining/Data Farming
    • Mining Add-On
    • BurstCoin Mining >
      • Burst Mining Single HDD
      • Burst Mining Multiple HDDs
    • Storj Host (Raspberry Pi)
    • Sia Host (Raspberry Pi)
  • Archive
    • Bitcoin Nodes >
      • With Display >
        • Bitcoin Core With Display
        • Bitcoin Core with display Tor network
        • Bitcoin Cash with display
        • Bitcoin Cash with display Tor network
        • Bitcoin Unlimited with display
        • Bitcoin Unlimited with display Tor network
      • Without Display >
        • Bitcoin Core
        • Bitcoin Core Tor Network
        • Bitcoin Cash
        • Bitcoin Cash Tor Network
        • Bitcoin Unlimited
        • Bitcoin Unlimited Tor Network
      • Update your Node >
        • Latest Core version
    • Litecoin >
      • Litecoin
      • Litecoin with display
      • Litecoin Tor Network
    • Monero >
      • Monero Node for Pi 3 or ARMv7 devices (With LCD display)
      • Monero Node for Pi 3 or ARMv7 devices (no LCD display)
      • Monero Node for all other devices
      • Monero Tor Network add-on
      • Monero Mining Add-On
  • Hardware
  • Hardened Cold Storage
  • SUPPORT
    • Getting Started
    • Credits and Thanks
This guide is to build a Full Monero Node (Raspberry Pi) to run 24/7 and help secure the network.

It also includes configuration steps to link your desktop PC GUI wallet.
This guide's purpose is to install the Monero Node Client onto a single-board computer. The method used in this guide is to compile Monero node from source, and does not rely on the dev's pre-compiled ARMv7/8 download.

This guide has been successfully tested on a Raspberry Pi Model 2B, and in theory will work on most other single-board computers.
See the HARDWARE tab for parts list and assembly/build information
Latest Update 8th June 2018

Step (1) Preparing the device
​
Because all the preparation steps are the same for all nodes here, I have made a beginner friendly guide with images, step-by-step. "Getting started" Link opens a new window

                                                                                                                     Getting Started


Then continue below...

​Step (2) Enabling WiFi
Picture
Wifi is available once the device is rebooted. Either reboot now using
sudo reboot
and remove the ethernet cable. Or continue, and reboot later as it is required after the next step.
With the device turned on, booted and you logged in with SSH we can start the setup.

First WiFi network connections are stored:
​
                         sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

Go to the bottom of the file and add the following text:
    
                             network={
                                 ssid="YOUR WIFI ROUTER NAME"
                                 psk="YOUR WIFI ROUTER PASSWORD"
                             }

**Note: Enter details between the quotes, leave the  "" in
save and exit using

                             ctrl+O
Then 'enter'
                            ctrl+X

Step (3) Expand the file system, (making full use of the SD card) and changing the Password.
Picture
enter:​
                             sudo raspi-config

The default password for obvious security reasons should be changed. That is done in this menu.

select "1 change user password", and follow the on-screen instructions. This will be the new password when using PUTTY to SSH into the device.

Because we installed a 2GB image onto the card, the Pi may think that the card is only 2GB in size. So we tell it to expand the file-system (returns it to it's full size allowed):

select "7 advanced options"

select "A1 expand filesystem"

select 'finish' system will reboot, (remove the ethernet cable if you didn't at the previous step). And log back in with SSH and PUTTY once reboot is complete.

Step (4) Updates

The image we downloaded may have an update or two since they released it:

                             sudo apt-get update
                             sudo apt-get upgrade
                             

select 'y' to accept the storage requirement.

Step (5) Moving everything to the USB drive

People have been making projects (not just nodes) on the raspberry pi for some time. A common failure point seems to be the SD cards. The constant read/write process 24/7 drastically shorten their life. We can reduce this by moving the entire file-system to the USB drive, and where possible using traditional platter HDDs. Check out the 'HARDWARE' section for cheap solutions available to the Raspberry Pi.

For moving the file-system we need the "git" repository

                              sudo apt-get install git

Insert the USB drive if you havn't already, then check it is mounted to the Pi. 

                              sudo lsblk

99% of the time it will be mounted as /dev/sda with a partition called sda1

We need to delete this partition to stop raspbian from automatically using the drive on boot, at this point. The helper in the next step will automatically create a new partition to do it's job of moving the files.

                              sudo fdisk /dev/sda

                              d

(deletes old partition)

                              w

(writes and commits the changes)

Now it's  compatible with the helper script.

The folks at Adafruit have made a very useful helper to reduce the amount of commands you need. These next three lines create a new partition and move the entire file system onto the USB drive. It does warn you that any data currently written to /sda will be overwritten. If you are an advanced user and have called the partition something other than /sda, this is where it should be changed.

                              git clone https://github.com/adafruit/Adafruit-Pi-ExternalRoot-Helper.git
                              cd Adafruit-Pi-ExternalRoot-Helper
                              sudo ./adafruit-pi-externalroot-helper -d /dev/sda


It will ask you to check that you are writing to the correct partition, select y when you are sure. When I do this step it takes a little under 10mins. Please be patient.
Picture
This is our drives labels and addresses. We need to check that the PARTUUID long number (that's the USB), is entered into

                             sudo nano /boot/cmdline.txt
​


​So everything has been copied over and the drive configured. We just need to change the boot file so it starts from the USB drive from now on. The helper untility should have done this automatically. But recently this has not been the case. Do this just to check, it's simple and is just a copy/paste action.

                             sudo blkid -o export /dev/sda1

The numbers will be different but it brings up something like the image on the left. 

Picture
Enter:
                                           sudo nano /boot/cmdline.txt​
And ensure that the helper has changed
root=PARTUUID=
​to match the one that was listed to you above. Yours will be different to mine. Then Save and exit using ctrl+o then ctrl+x.

Do another reboot with           sudo reboot          and when the Pi starts this time your USB activity light will blink like crazy, showing it's now getting it's data from there.

Step (6) Installing "Screen"

We are now very close to completion. Very soon we will be telling the node to start. However the node will be running in the PUTTY window on our screen and if you close that screen, it closes the connection too, stopping the node. An easy solution is to use a nifty program called "screen". It runs the current session on the Pi and detaches you from it. This leaves you free to leave and re-join to check the node's progress as you wish, without disturbing it! 


                               ​  sudo apt-get install screen

Then, to use it, type…

                                ​ screen bash

It will open another terminal instance that is running on the Pi. You can now start a process you want to be able to leave running and reconnect to later. In this case, this will be the node.


"Screens" can be rejoined (I'll show how to detach and re-attach to them later)

Step (7) Installing Monero
Picture
To help the Pi because it doesn't have much RAM we can artificially create more using a swap-file. This will help it process the blockchain.

                             sudo nano /etc/dphys-swapfile

And change the default size of 100(MB), to 1000 as shown to the left.

save, exit, ctrl+o ctrl+x

Then, to build the new swap file...

                             sudo dphys-swapfile setup
                             sudo dphys-swapfile swapon

This has artificially given the Pi an extra 1GB RAM. Nearly there.
​Download the dependencies Monero needs:

                             sudo apt-get install build-essential cmake pkg-config libboost-all-dev libssl-dev libzmq3-dev libunbound-dev libsodium-dev libminiupnpc-dev libunwind8-dev liblzma-dev libreadline6-dev libldns-dev libexpat1-dev libgtest-dev doxygen graphviz -y

That's the bulk of them, doesn't take too long, just a couple of minutes, and one last one below that needs to be run separately...

                          sudo apt-get install libgtest-dev && cd /usr/src/gtest && sudo cmake . && sudo make && sudo mv libg* /usr/lib/


​Then we're ready to "make", compiling/installing Monero:
The last command spits you out at a random folder so...

                          cd

 to get to home directory, then download Monero
                          git clone https://github.com/monero-project/monero.git
                          cd monero
                          git checkout tags/v0.14.0.0
                          make release

The last part "make release" the Developers estimate approx 4-6 hours for a Raspberry Pi 2. Be patient.

But that's it!

Once compiled we're good to run.
For your info the patch to the Monero client is "
/home/pi/monero/build/release/bin/monerod"

So to start the node yourself use:

                            /home/pi/monero/build/release/bin/monerod --rpc-bind-ip 192.168.xx.xx --rpc-bind-port=18081 --confirm-external-bind --block-sync-size 5                                         
Where xx.xx is the IP you are using to login via PuTTY/SSH.
You may customize the port if required.

Once running you may use these details to connect to this node and a "remote node" in the Monero GUI on another Pc on your network.


Picture
There is a handy command "--detach" that runs the node in the background, we will add it later. By leaving out the --detach flag on first start it is easier to check for any errors, if any, and at what stage they appear.
We'll add that flag to the auto-boot once we're happy with our settings. 
​
The node does take time to initialize. Please be patient. I was also surprised by a lack of USB activity during this phase. It has most likely not frozen, it just takes a approximately 10mins to get going, (yes 10mins I've timed it, it's a long time). Mostly it takes it's time on the loading blockchain phase, even when empty on first boot.






Picture





​And this is what it'll look like running.


A constant stream of lines like this going upwards.

Picture
Now we're happy that the node is running on the Pi we can check our desktop Pc wallet can connect to it.

Open the wallet and enter your password as normal.
After a few seconds It will count down saying "starting daemon in 5...4...3"
Click the "use custom settings" box to prevent this.
If you miss it, don't worry, just tell it to "stop daemon" in the "settings" tab

If you haven't already navigate to the "settings" tab on the left.

This is where we enter our Pi node IP and Port we setup earlier.

Once entered click "connect"

Thats it!
On the left you should see the status change from "disconnected" to "Synchronizing" showing the progress of your Pi node.

Back to the device...
***Important, to leave the node running in the background. Press "ctrl+a" release just the "a" key and press "d"

​That sends a command to "screen" to detach ("d") it so you can come back and check on it later. Use:

screen -r

To return to the screen and check it's progress, or:

               
monero/build/release/bin/monerod --rpc-bind-ip=192.168.XX.XX --rpc-bind-port=18081 status        
and it will read back a summary of it's progress with a percentage of how far it's got through synchronizing, block height, and some other useful info. These commands can even be done from another computer in the same network at home!

To stop the node use

monero/build/release/bin/monerod --rpc-bind-ip=192.168.XX.XX --rpc-bind-port=18081 exit
Picture
So at this point we should be happy that it's working. To prepare for the eventuality that power is lost unexpectedly (off and on). The Node can be made to auto-boot when power is restored.

Simply edit 
                                    sudo nano /etc/rc.local

and add

                            /usr/bin/python /home/pi/moneroautostart.py

To the bottom, but ABOVE 'exit 0'.
On boot that tells the device to run a Python script.

Next we make the script file with the command.
Picture
                           cd
                           nano moneroautostart.py

and add to this empty file:

​               
import os
                os.system("/home/pi/monero/build/release/bin/monerod --rpc-bind-ip 192.168.xx.xx --rpc-bind-port=18081 --confirm-external-bind --block-sync-size 5 --detach &")

Replacing xx.xx with the device's IP used for PuTTY/SSH.
Save and quit again (CTRL+o, CTRL+x)
And that's it. On the next power cycle the device will auto-boot the node and carry on where it left off.

Picture






​If you ever get rid of your node, or want to go back to using the Pc's daemon these settings will revert it back to default.

(It should be either port 18081 or 18080)
Powered by Create your own unique website with customizable templates.
  • Nodes
    • ALT-Coin Nodes >
      • Ethereum
      • Monero
      • Dogecoin >
        • Dogecoin
        • Dogecoin with display
        • Dogecoin Tor Network
      • Gamecredits >
        • GameCredits
        • Gamecredits with display
        • GameCredits Tor Network
    • Node Add-ons >
      • Wallet Functionality
      • Vanity Address Generators >
        • Bitcoin Vanity Address
        • Litecoin Vanity Address
        • Dogecoin Vanity Address
      • Node stats "Slideshow"
    • Bitcoin Desktop PC Node Software
  • Staking Nodes
    • Dash >
      • Dash - Standard
      • Dash - With LCD display
    • BlackCoin >
      • BlackCoin - Lore
      • BlackCoin - Lore - With LCD display
      • BlackCoin - Lore - Tor enabled
      • BlackCoin - Original
      • BlackCoin - Original - With LCD display
      • BlackCoin - Original - Tor enabled
    • PIVX
    • PinkCoin
    • GoByte >
      • GoByte - Standard
      • GoByte - With LCD display
  • Mining/Data Farming
    • Mining Add-On
    • BurstCoin Mining >
      • Burst Mining Single HDD
      • Burst Mining Multiple HDDs
    • Storj Host (Raspberry Pi)
    • Sia Host (Raspberry Pi)
  • Archive
    • Bitcoin Nodes >
      • With Display >
        • Bitcoin Core With Display
        • Bitcoin Core with display Tor network
        • Bitcoin Cash with display
        • Bitcoin Cash with display Tor network
        • Bitcoin Unlimited with display
        • Bitcoin Unlimited with display Tor network
      • Without Display >
        • Bitcoin Core
        • Bitcoin Core Tor Network
        • Bitcoin Cash
        • Bitcoin Cash Tor Network
        • Bitcoin Unlimited
        • Bitcoin Unlimited Tor Network
      • Update your Node >
        • Latest Core version
    • Litecoin >
      • Litecoin
      • Litecoin with display
      • Litecoin Tor Network
    • Monero >
      • Monero Node for Pi 3 or ARMv7 devices (With LCD display)
      • Monero Node for Pi 3 or ARMv7 devices (no LCD display)
      • Monero Node for all other devices
      • Monero Tor Network add-on
      • Monero Mining Add-On
  • Hardware
  • Hardened Cold Storage
  • SUPPORT
    • Getting Started
    • Credits and Thanks