Links to other tutorials from the series:[BitcoinTalk Node Tutorial #2] Installing Electrs from source https://bitcointalksearch.org/topic/bitcointalk-node-tutorial-2-installing-electrs-from-source-5477339[BitcoinTalk Node Tutorial #3] Sparrow terminal / infinite Whirlpool mixes https://bitcointalksearch.org/topic/bitcointalk-node-tutorial-3-sparrow-terminal-infinite-whirlpool-mixes-5470024[BitcoinTalk Node Tutorial #4] Connecting BISQ to our node https://bitcointalksearch.org/topic/bitcointalk-node-tutorial-4-connecting-bisq-to-our-node-5478756[BitcoinTalk Node Tutorial #5] Hosting a Monero node on the same machine https://bitcointalksearch.org/topic/bitcointalk-node-tutorial-5-hosting-a-monero-node-on-the-same-machine-5480371Size required on disk:$ sudo du -sh /media/apogio/BTC/bitcoincore
627G /media/apogio/BTC/bitcoincore
I will create a series of posts (at my own slow pace).
In this series, I will create a custom Bitcoin Node on a GUI-less OS.
I will add various features on this node.
I encourage all of you to share your thoughts and suggestions. In fact, some decisions will be determined by your suggestions.
Hardware / Software used in the seriesComputer | Raspberry Pi 4b 8GB RAM |
Software | Raspberry Pi OS Lite (64-bit) |
Storage | 2TB external SSD |
Installing and running Bitcoin Core on Raspbian LiteDownloading Bitcoin CoreFirstly, we create a directory on the home path, where we will download the necessary packages, let's say we create it inside the
Downloads directory:
mkdir -p ~/Downloads/Core
cd ~/Downloads/Core
Now, the latest version is 25.1, so the following command will download the core software and the checksum in our directory:
wget https://bitcoincore.org/bin/bitcoin-core-25.1/bitcoin-25.1-aarch64-linux-gnu.tar.gz
wget https://bitcoincore.org/bin/bitcoin-core-25.1/SHA256SUMS
Let's check whether the checksum is correct:
sha256sum --ignore-missing --check SHA256SUMS
So, now we must extract the installer from the tarball:
tar -xvf bitcoin-25.1-aarch64-linux-gnu.tar.gz
Personally, I install my binaries in
/usr/local/bin, so I will use the following command:
sudo install -m 0755 -o root -g root -t /usr/local/bin bitcoin-25.1/bin/*
We must be done, let's check:
bitcoind --version
We should receive a prompt that the version is 25.1.
Let's delete the directory we created to download the stuff we needed. It's no longer necessary:
cd ~;
rm -rf ~/Downloads/Core
Running Bitcoin CoreMost of the time, when the external storage is connected, it mounts to a specific filesystem location. Let's check where it is:
lsblk
This will return something like:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
...
sdb 8:16 0 1.9T 0 disk
`-sdb1 8:17 0 1.9T 0 part /media/apogio/BTC
...
From this, we can see that the external drive is mounted on
/media/apogio/BTC. This will be our home directory for Bitcoin Core.
Let's create a configuration file and start Bitcoin Core:
cd /media/apogio/BTC
mkdir bitcoincore
nano bitcoin.conf
This will open up nano and create a file called
bitcoin.conf inside the directory
/media/apogio/BTC/bitcoincore.
The following lines are ok for the moment:
datadir=/media/apogio/BTC/bitcoincore
dbcache=5000
daemon=1
server=1
Now we are ready to go.
Let's run Bitcoin Core and wait until the IBD is finished:
bitcoind -conf=/media/apogio/BTC/bitcoincore/bitcoin.conf
This will take some days. So relax and let it work.
If at any time you wish to stop the daemon, just run:
bitcoin-cli --datadir=/media/apogio/BTC/bitcoincore stop
The IBD is finished, I will stop Bitcoin Core, and I will refresh my
bitcoin.conf file as follows:
# basic directives
datadir=/media/apogio/BTC/bitcoincore
# bitcoin daemon
daemon=1
server=1
listen=1
# tor
proxy=127.0.0.1:9050
bind=127.0.0.1
# network
rpcuser=
rpcpassword=
[main]
rpcbind=127.0.0.1
rpcbind=
rpcallowip=127.0.0.1
rpcallowip=192.168.0.0/16
# optimimizations
maxconnections=30