Commands & Steps to Ministry of Nodes Bitcoin Full Node Box 2022 Series: A reference guide
view this post on our onion site
15 min read

Commands & Steps to Ministry of Nodes Bitcoin Full Node Box 2022 Series: A reference guide

Commands & Steps to Ministry of Nodes Bitcoin Full Node Box 2022 Series: A reference guide

This is a step by step outline of the Bitcoin Full Node Box 2022 Video Series by Ministry of Nodes.

Ministry of Nodes Node Box Guide 2022 - Invidious

This is intended strictly as an aid to supplement to the videos, not replace it. Please verify the following instructions by watching the video series. I hope this reference material will help others clarify the commands given in the videos. I found the build to be quite simple for novices and an amazing learning process. My sincere thanks to Ministry of Nodes for this video series. Please let me know of errors so they can be corrected.

Open Source Software:

Ubuntu lts
Bitcoin Core
Fulcrum
Sparrow Wallet
Samourai Wallet android app
Memepool.space
Whirlpool

Hardware requirements:

Dell Optiplex 9020 or any pc with the equivalent specs of
i5
8g
1T or 2T SSD (like a Samsung 870 EVO)
Monitor
Keyboard
Power cord
Ethernet cable
USB stick
Separate bitcoin only lap top to ssh into node

Create USB Boot Disc on laptop:

go to ubuntu.com
download section
ubuntu server
get ubuntu server
get manual download
download 22.04 lts

On laptop:
insert usb stick
open Balena Etcher
flash from file
select ubuntu server 22.04 lts
select usb
flash usb
enter password
boot disk is now created

On Dell computer/Node:
plug in keyboard
plug in monitor
plug in usb drive
plug in ethernet cable
plug in power cord

On first boot:
Go into bios of machine by tapping on f2 as it boots
Change boot sequence to boot first from USB followed by SSD
Go to AC recover section change to “power on”

Machine should reboot up again and read the USB stick

OS Screen should appear:
Select language
Select Keyboard layout
Select Install Ubuntu Server
Hit enter

*Record the ip address that is being assigned to your node box *
This is how you will access the node from your own laptop remotely
Write down the ip address
Hit enter
Hit enter

Screen should now show your disk
use entire disk but remove lvm with the space bar and navigate to the bottom to hit done.
Hit enter
Hit enter
Choose name of user and write it down:
Choose name of node and write id down:
Choose a strong password and write it down:

*Hit yes and install ssh with the space bar, then hit enter *
Don’t add any snaps, hit tab then enter

The operating system should then install
Reboot screen should appear
Reboot the computer
It will ask you to then remove usb stick
hit enter
log in screen appears
hit enter

Login with the user name and password just created
You should now see the same ip address and disk space used

Now you can remotely SSH into computer using terminal or putty on your laptop

In terminal:
ssh username@ipaddress
Do you want to continue?
Yes
enter password

Remove keyboard and monitor from node box
Initial set up is now complete

SSH into the node box on local network from laptop:
ssh username@ipaddress
are you sure to continue?
Yes
enter password

The following is some basic command line information:
Use tab button to auto complete file names in terminal
By pressing up or down the previous commands will be available to use.

To see the disk space with command
df -h

username@nodename:~$ (represents home in the file system)

This shows a typical linux file system:
username@nodename:~$          cd /  (change directory)
username@nodename:/$
username@nodename:/$           ls      (list short shows files in directory)

To go to the home directory:
username@nodename:/$           cd home/
username@nodename:/home
username@nodename:/home     ls
username@nodename:/home$  cd username/
username@nodename:~$

From ~$ you can make directories

To make a directory:
From ~$
Type the command:
mkdir downloads
ls
cd downloads/
~/downloads/

To go back a directory:
cd ..

To remove the directory:
rm -rf downloads/

To see if updates are available:
sudo apt update
enter password

To upgrade to the updates:
sudo apt upgrade

nano is a text editor to open, edit and save

To make a downloads directory:
mkdir downloads
cd downloads/
ls
nano test file 123.txt

this should take you to a text file:
ctrl x to leave
y to save
hit enter to go back to terminal

To remove directory:
rm testfile123.txt

This directory allows us to have programs start on boot:
cd /etc/systemd/system/

To edit existing file:
sudo nano "filename"

To paste into terminal:
control shift v

To get to home directory:
cd~

To exit out of terminal and reboot node:
sudo reboot

Bitcoin Core:

in terminal:
ssh into node as above

in browser:
go to bitcoincore.org
go to downloads
select linux tgz
right click copy the link

in terminal, make a downloads directory and then enter that downloads directory:
mkdir downloads
cd downloads/
ls

wget (paste in link)
hit enter

ls
should show you bitcoin core file name ending in tar.gz

on bitcoincore.org:
go to linux verification instructions
copy link under instruction number 2: Download the list of cryptographic checksums: SHA256SUMS

in terminal:
wget (paste in link)
enter

on bitcoincore.org:
copy link under instruction number 3: Download the signatures attesting to validity of the checksums: SHA256SUMS.asc

in terminal:
wget (past in link)
enter

on bitcoincore.org:
copy command under instruction number 5: Verify that the checksum of the release file is listed in the checksums file using the following command

sha256sum --ignore-missing --check SHA256SUMS

in terminal:
paste command
enter

output should read “ok” after file name:
bitcoin-23.0-x86_64-linux-gnu.tar.gz: OK

Import key from maintainer of bitcoin core to verify

on bitcoincore.org:
copy unique public key under instruction number 6

in terminal:
past in public key to import
enter

on bitcoincore.org:
copy gpg under instruction number 8

in terminal:
paste in gpg from bitcoincore.org
look to see gpg “good signature”

in browser:
go to bitcoin.org/en/full-node
go to linux instructions
copy command to unzip

in terminal paste command:
tar xzf (your bitcoin file name)

in browser copy the command:
sudo install -m 0755 -o root -g root -t /usr/local/bin bitcoin-22.0/bin/*
enter password

To actually run bitcoin core

in terminal:
bitcoind -daemon

Should say Bitcoin Core starting

To show bitcoin data directory

in terminal:
cd ..
ll

in terminal:
cd .bitcoin/
ls

To check to see if bitcoin is running, open another terminal and ssh into node

in second terminal:
tail -f .bitcoin/debug.log

This will show the status of downloading the blockchain

in first terminal:
bitcoin-cli getblockchain info

bitcoin-cli getconnectioncount

in first terminal from ~/.bitcoin$ create a bitcoin.conf file:
nano bitcoin.conf

past in:
server=1
txindex=1
daemon=1
pcport=8332
rpcbind=0.0.0.0
rpcallowip=127.0.0.1
rpcallowip=10.0.0.0/8
rpcallowip=172.0.0.0/8
rpcallowip=192.0.0.0/8
zmqpubrawblock=tcp://0.0.0.0:28332
zmqpubrawtx=tcp://0.0.0.0:28333
zmqpubhashblock=tcp://0.0.0.0:28334
whitelist=127.0.0.1

in browser:
go to github.com/bitcoin/bitcoin
go to file search box
type rpcauth.py into file search box
select the file
view raw
copy link

in second terminal:
ctrl c to stop logs

cd downloads/

wget ( paste in link from github )
chmod +x rpcauth.py

make rpc username same as username above and rpc password same as above as this will be needed later in fulcrum and will make it easier to enter correct usernames and passwords in later steps

./rpcauth.py (create rpc user name by typing it)  (create rpc password by typing it)
enter

copy the "string to be appended to" line starting with "rpcauth="

in first terminal:
now paste in that full line starting with "rpcauth=" into the last line of the bitcoin.conf filename

ctrl x to exit
y to save
enter to return to terminal

That is how you authenticate into the bitcoin node

in first terminal:
bitcoin-cli stop
bitcoin

Now wait for the initial blockchain to finish downloading

in terminal:
cd .bitcoin/
bitcoin-cli getblockchaininfo

this will show you that the “initial block download” shows false which is good
and that the headers match the block height
that means the initial blockchain has completed

To make bitcoin start on boot of machine
in browser:
go to github.com/bitcoin/bitcoin
go to file
search .service
view raw
copy link

in terminal:
cd /etc/systemd/system/
sudo wget (paste in link from github)
enter password
sudo nano bitcoind.service

in file:
remove “wait” from service daemon
change service line to:
ExecStart=/usr/local/bin/bitcoind -daemon
pid can be left alone
conf file needs to be changed to:
-conf=/home/username/.bitcoin/bitcoin.conf
datadir needs to be changed to:
-datadir=/home/username/.bitcoin

place # in front of execstart

change user to rcp username
change group to rcp username

place # in front of protecthome

ctrl x to exit
y to save
enter to return back to terminal

bitcoin-cli stop
sudo systemctl enable bitcoind
sudo systemctl start bitcoind
sudo systemctl status bitcoind

you should see a green active running

Enable Tor

cd ~
sudo apt install tor
y
enter
sudo systemctl status tor
should see green active running

sudo nano etc/tor/torrc
scroll to the bottom of the file
paste in file:
ControlPort 9051
CookieAuthentication 1
CookieAuthFileGroupReadable 1

ctrl x to exit
y to save
enter to return to terminal

in terminal:
sudo systemctl restart t
sudo usermod -a -G debian-tor username
nano .bitcoin/bitcoin.conf

in file add:
proxy=127.0.0.1:9050
listen=1
bind=127.0.0.1
onlynet=onion

ctrl x to exit
y to save
enter to return to terminal

in terminal reboot the machine to make bitcoin start on boot and over tor:
sudo reboot

wait a few minutes to reboot

ssh back into node

in second terminal:
tail -f .bitcoin/debug.log

in first terminal:
bitcoin-cli getconnectioncount

if there are no connections manually add a node to your bitcoin.conf filename

in browser:
go to bitnodes.io
click on nodes
go to networks
select tor networks
copy onion addresses

in first terminal:
nano .bitcoin/bitoin.conf

add to file:
addnode= (paste in onion link)

ctrl x
y
enter

in first terminal:
sudo systemctl restart bitcoind

in second terminal:
check logs

in first terminal:
bitcoin-cli getconnectioncount

once the node has five or more connections remove the add node line from bitcoin.conf filename
in first terminal:
nano .bitcoin/bitcoin.conf
remove last line with node information

ctrl x
y
enter

in first terminal:
sudo systemctl restart bitcoind

To ensure you get connections
in first terminal:
bitcoin-cli getconnectioncount

To ensure node is running over tor
in first terminal:
bitcoin-cli getnetworkinfo

ipv4 false
ipv6 false
onion reachable true
onion address is presented as well

Other commands:
bitcoin-cli getpeerinfo shows peer info
bitcoin-cli gettxoutsetinfo shows the supply of bitcoin

This concludes bitcoin core, now on to fulcrum.

Fulcrum

in browser:
go to https://github.com/cculianu/Fulcrum
go to releases section
download 1.6
copy linux x86 file https://github.com/cculianu/Fulcrum/releases/download/v1.6.0/Fulcrum-1.6.0-x86_64-linux.tar.gz.asc

in terminal:
cd downloads/
wget ( paste link from github )
enter

cd..
mkdir fulcrum
mkdir fulcrum_db
ls
cd downloads/
ls
tar xvf fulcrum-1.6.0-x86_64-linux.tar.gz
enter

mv  fulcrum-1.6.0-x86_64-linux/* /home/username/fulcrum
enter

cd ..
cd fulcrum
ls

(now generate keys for ssl to query fulcrum from network in encryted way):

openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout key.pem -out cert.pem

ls

mv fulcrum-example.conf fulcrum.conf
ls

nano fulcrum.conf

in file the data directory needs to be changed:
datadir = /home/username/fulcrum_db

rpcuser = (rpc username chosen earlier)
rpcpassword = (rpc password chosen earlier)

use ssl
remove # before ssl
ssl = 0.0.0.0:50002

remove hash before cert
cert = /home/username/fulcrum/cert.pem

remove hash before key
key = /home/username/fulcrum/key.pem

remove hash before peering
peering = false

remove hash before fast sync
fast-sync = 5000

ctrl x to exit
y to save
enter to return to terminal

To make fulcrum start on boot

in terminal:
cd fulcrum
sudo nano /etc/systemd/system/fulcrum.service
enter password

in file paste in:

[Unit]
Description=Fulcrum
After=network.target

[Service]
ExecStart=/home/username/fulcrum/Fulcrum /home/username/fulcrum/fulcrum.conf
User=username
LimitNOFILE=8192
TimeoutStopSec=30min

[Install]
WantedBy=multi-user.target

ctrl x
y
enter

in terminal:
ls
cd ..
ls
sudo systemctl enable fulcrum.service
sudo systemctl start fulcrum.service
sudo systemctl status fulcrum.service

should see a green active running text

To see Fulcrum index logs
in second terminal:
cd ~
journalctl -fu fulcrum.service

allow around 12 hours for database to be completed

To see if Fulcrum is finished syncing, look at Fulcrum logs in second terminal
Should see logs show:
beyond 99%
Starting listening service
SsLSrv 0.0.0.0:50002
Listening for connections

in second terminal:
cd fulcrum
df -h
du -h

To Shutdown fulcrum and pc gracefully
in terminal:
fulcrum-cli stop

That is all for fulcrum, now on to Sparrow Wallet.

Sparrow Wallet

in browser:
www.sparrowwallet.com
Go to downloads
download wallet file

Verify release of sparrow wallet
import public keys
in terminal:
curl https://keybase.io/craigraw/pgp_keys.asc | gpg --import
cd Downloads

in browser:
go to www.sparrowwallet.com
go to downloads
download manifest txt.asc file
download manifest txt file
copy gpg --verify sparrow-1.7.1-manifest.txt.asc

in terminal:
paste gpg from www.sparrowwallet.com
enter
should see “Good Signature” from Craig Raw

Check the checksum
in browser:
copy linux checksum

in terminal:
paste checksum
should say “OK”

to install
in terminal:
sudo dpkg -i sparrow
enter password

look on your computer applications to find Sparrow Wallet and open

Connect to Private Electrum Server

Configure Server
Private Electrum
URL is your ip address
port 50002
select ssl
hit test connection

now connected Sparrow Wallet to your Fulcrum Server

Create Wallet in Sparrow:

Name Wallet
Bip39 Software wallet
Generate new
add secure passphrase
12 words
confirm you wrote down your 12 words in order
confirm you wrote down your passphrase

these 12 words and passphrase are necessary to restore funds
losing these 12 words in order or your passphrase will lose your bitcoin

create keystore
leave defaults
import keystore
enter bip39 passphrase

xpub is shown
zpub is shown
fingerprint is shown
derivation path is shown
descriptor is shown
script type is shown
single sig is shown

hit apply
add a password to access and unencrypt this filename
this password is not your seed passphrase
this password grants access to the wallet in sparrow
set password

Memepool.space

install docker
in browser:
go to https://docs.docker.com/engine/install/ubuntu/
scroll to set up repository

copy commands on website

in terminal ssh into node:
sudo apt update
y
sudo apt-get intall
ca-certificates
curl
gnupg
lsb-release

in browser:
copy gpg key from instruction number 2

in terminal:

sudo mkdir -p /etc/apt/keyrings

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

echo
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update

in browser:
copy command from install docker engine instruction number 2

in terminal paste in command:
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
yes

in browser:
Scroll to the bottom of page and click on link for “post installation steps for linux”
https://docs.docker.com/engine/install/linux-postinstall/

add user to docker group
copy user command from instruction number 2


in terminal:
sudo usermod -aG docker $USER
(this allows you to use docker without sudo)
exit

ssh back into node
docker ps


in browser:
navigate to https://docs.docker.com/compose/install/other/
go to install linux standalone binary
copy command under instruction number 1

in terminal paste command with sudo in front:
sudo curl -SL https://github.com/docker/compose/releases/download/v2.13.0/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
enter password
sudo chmod +x /usr/local/bin/docker-compose
docker-compose –version

in browser:
navigate to https://github.com/mempool/mempool
click green code button
copy code link https://github.com/mempool/mempool.git

in terminal from home directory:
cd ~
git clone https://github.com/mempool/mempool.git
ls
cd mempool/
ls
cd docker/
ls
nano docker-compose.yml

in file change:
port to - 4080:8080
change rpc host to your “ip address”
change username to “rcp username”
change password to “rcp password”

change restart to always
change restart to always
change restart to always

in browser:
go to https://github.com/mempool/mempool/tree/master/docker

find the bitcoin core + electrum section

in terminal in file under api environment make this change:

  MEMPOOL_BACKEND: "electrum"

in terminal in file under api environment add in these changes:

  ELECTRUM_HOST: "youripaddress"
  ELECTRUM_PORT: "50002"
  ELECTRUM_TLS: "true”

past in at end of docker-compose file:

networks:
  default:
   driver: bridge
    ipam:
     config:
       - subnet: 172.16.57.0/24

ctrl x to exit
y to save
enter to return to the terminal

in first terminal:
docker-compose up

in second terminal:
exit

ssh back into node
in second terminal:
docker ps

shows containers running

in browser:
type your ip address:4080

now you have your own mempool.space

to stop in terminal:
ctrl c to exit

once stopped
to start in first terminal:
docker-compose up -d

That completes mempool.space, on to Samourai Wallet

Samourai Wallet:

in browser:
navigate to https://samouraiwallet.com/
scroll down to dojo and click download
https://samouraiwallet.com/download/dojo
click code repository
click releases
copy link to zip file https://code.samourai.io/dojo/samourai-dojo/-/archive/v1.18.1/samourai-dojo-v1.18.1.zip

ssh into terminal:
cd downloads/
wget https://code.samourai.io/dojo/samourai-dojo/-/archive/v1.18.1/samourai-dojo-v1.18.1.zip
ls
sudo apt install unzip
enter password
unzip samourai-dojo-v1.18.1.zip
ls

cd..
mkdir dojo-app
ls
mv ~/downloads/ samourai-dojo-v1.18.1/* ~/dojo-app/
cd dojo-app/
ls
cd docker/
ls
cd my-dojo/
ls
cd conf/
ls
nano docker-bitcoind.conf.tpl

in file change:
rpc user
bitcoind install to off
bitcoind ip address to your node ip address
bitcoind rpc port to 8332

in second terminal:
ssh into node
nano .bitcoin/bitcoin.conf

check to see in rpc port now matches

in first terminal:
change the zmq raw txs to match yours (28333)
change the zmq block hash to match yours

ctrl x to exit
y to save
enter to return to terminal

in first terminal:
ls
nano docker-explorer.conf.tpl

in file change:
explorer to off
explorer install off

ctrl x
y
enter

in first terminal:
ls
nano docker-indexer.conf.tpl

in file change:
indexer type to fulcrum
indexer ip address to node ip address
indexer rpc port 50002
indexer batch support to active
indexer protocol to tls

ctrl x
y
enter

in first terminal:
nano docker-mysql.conf.tpl

in file change:
mysql root password
mysql password

ctrl x
y
enter

in terminal:
nano docker-node.conf.tpl

in file change:
node api key
node admin key (this is the key used to access Dojo Maintenance Tool, make a note of this key)
node jwt secret
node active indexer to local_indexer

ctrl x
y
enter

in first terminal:
cd ..
ls

(this should take you to ~/dojo-app/docker/my-dojo$)

./dojo.sh install
y
enter

in second terminal:
docker ps

Wait for installation to finish and headers reach chain tip

docker ps

Now get onion address to log into dojo maintenance tool

in second terminal:
cd dojo-app/
ls
cd docker/my-dojo/
./dojo.sh onion

this will show the onion address of the Dojo Maintenance Tool
copy onion address
paste into a tor browser
add /admin to the end
enter
once page loads find the admin key from before

in second terminal:
cd conf/
nano docker-node.conf

in file:
scroll to admin key and copy

in tor browser:
paste in admin key
enter

should say it has successfully connected to the backend
look for green check marks all around

Samourai Wallet on Android phone and connect to dojo

navigate to https://docs.samourai.io/wallet/start
read the documentation and download onto your android device

Open App:
select mainnet
get started
choose backup directory
choose documents
allow access
enable tor
select connect to your own dojo
scan qr code from dojo maintenance tool under pairing
grant app access to camera when using app
or enter dojo onion address and api key

after dojo connects
create new wallet
create passphrase
check box indicating you understand
set a wallet pin code
confirm pin code
write down list of 12 words
confirm passphrase
claim paynym

Whirlpool CLI

in browser:
navigate to https://samouraiwallet.com/download/whirlpool
click on code repository
click on whirlpool in upper left to navigate to https://code.samourai.io/whirlpool
select whirlpool-client-cli
select releases
select whirlpool 0.10.13
copy download link

in first terminal:
sudo apt install openjdk-18-jre-headless
y
enter

in first terminal from home:
mkdir whirlpool
cd whirlpool/
ls
wget https://code.samourai.io/whirlpool/whirlpool-client-cli/uploads/c1bb32bac6d4b377f625c996387375c2/whirlpool-client-cli-0.10.13-run.jar

NOTE: whirlpool 0.10.16 appears to have been released at this time with major impovements – cannot say if it works with this build

java -jar whirlpool-client-cli-0.10.13-run.jar –init

it will ask for pairing payload

in Samourai Wallet app:
go to settings
transactions
experimental
copy pairing to clipboard

in first terminal:
paste payload
enter
authenticate with wallet passphrase

whirlpool should authenticate and start running

to make whirlpool start on boot create a service file

in first terminal:
ctrl c
sudo nano /etc/systemd/system/whirlpool.service

in the file paste in:
[Unit]
Description=Whirlpool
After=tor.service

[Service]
WorkingDirectory=/home/yourusername/whirlpool
ExecStart=/usr/bin/java -jar whirlpool-client-cli-0.10.13-run.jar --server=mainnet --tor --auto-mix --mixs-target=0 --listen
User= your username
Group= your username
Type=simple
KillMode=process
TimeoutSec=60
Restart=always
RestartSec=60

[Install]
WantedBy=multi-user.target

ctrl x
y
enter

in first terminal:
sudo systemctl daemon-reload
sudo systemctl enable whirlpool
sudo systemctl start whirlpool
sudo systemctl status whirlpool

Whirlpool should start and ask for authentication from whirlpool gui

in browser
go to https://samouraiwallet.com/download to download whirlpool gui
select the correct file for your laptop

download
verify
install
open

in whirlpool gui:
select advanced
enter node ip address:8899

in terminal:
nano whirlpool-cli-config.properties

in file:
copy whirlpool api key

in whirlpool gui:
paste in api key
click connect
be patient
enter wallet passphrase when prompted

read whirlpool documentation

This build now has a dedicated system running bitcoin core, fulcrum indexer, sparrow wallet with whirlpool, mempool.space, samourai dojo, samourai wallet & whirlpool.

This concludes the step by step transcription of the Bitcoin Full Node Box 2022 by Ministry of Nodes. Thank you to the amazing work by Ministry of Nodes to offer this build to the public. I hope this helps others create their own full nodes.

🧡
Found this post helpful? Consider sending the author a tip
ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ