Bitcoin Forum
November 06, 2024, 07:37:08 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [BitcoinTalk Node Tutorial #1] Running Bitcoin Core on Raspbian Lite (GUI-less)  (Read 218 times)
apogio (OP)
Hero Member
*****
Offline Offline

Activity: 602
Merit: 1206



View Profile WWW
December 06, 2023, 11:20:10 AM
Last edit: January 09, 2024, 01:59:01 PM by apogio
Merited by LoyceV (12), fillippone (5), hugeblack (4), o_e_l_e_o (4), RickDeckard (4), ABCbits (2), Husna QA (2), Medusah (2), DdmrDdmr (1)
 #1

Links to other tutorials from the series:
[BitcoinTalk Node Tutorial #2] Installing Electrs from source https://bitcointalk.org/index.php?topic=5477339.0
[BitcoinTalk Node Tutorial #3] Sparrow terminal / infinite Whirlpool mixes https://bitcointalk.org/index.php?topic=5470024.0
[BitcoinTalk Node Tutorial #4] Connecting BISQ to our node https://bitcointalk.org/index.php?topic=5478756.0
[BitcoinTalk Node Tutorial #5] Hosting a Monero node on the same machine https://bitcointalk.org/index.php?topic=5480371.0

Size required on disk:
Code:
$ 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 series
ComputerRaspberry Pi 4b 8GB RAM
SoftwareRaspberry Pi OS Lite (64-bit)
Storage2TB external SSD



Installing and running Bitcoin Core on Raspbian Lite

Downloading Bitcoin Core

Firstly, 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:
Code:
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:
Code:
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:
Code:
sha256sum --ignore-missing --check SHA256SUMS

So, now we must extract the installer from the tarball:
Code:
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:
Code:
sudo install -m 0755 -o root -g root -t /usr/local/bin bitcoin-25.1/bin/*

We must be done, let's check:
Code:
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:
Code:
cd ~;
rm -rf ~/Downloads/Core

Running Bitcoin Core

Most of the time, when the external storage is connected, it mounts to a specific filesystem location. Let's check where it is:
Code:
lsblk

This will return something like:
Code:
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:
Code:
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:
Code:
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:
Code:
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:
Code:
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:

Code:
# 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=<my user>
rpcpassword=<my pass>

[main]
rpcbind=127.0.0.1
rpcbind=<the local ip of my RPi>
rpcallowip=127.0.0.1
rpcallowip=192.168.0.0/16

# optimimizations
maxconnections=30


█████████████████████████
████████▀▀████▀▀█▀▀██████
█████▀████▄▄▄▄████████
███▀███▄███████████████
██▀█████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
██▄███████████████▀▀▄▄███
███▄███▀████████▀███▄████
█████▄████▀▀▀▀████▄██████
████████▄▄████▄▄█████████
█████████████████████████
 
 BitList 
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
REAL-TIME DATA TRACKING
CURATED BY THE COMMUNITY

.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
 
  List #kycfree Websites   
LoyceV
Legendary
*
Offline Offline

Activity: 3486
Merit: 17635


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
December 12, 2023, 09:58:59 AM
 #2

Code:
cd ~/Downloads; 
mkdir Core;
cd Core;
There's no need to end a line with a semi colon. That's only needed to separate commands on the same line.

In case there is no "Downloads" directory yet:
Code:
mkdir -p ~/Downloads/Core
cd ~/Downloads/Core

▄▄███████████████████▄▄
▄█████████▀█████████████▄
███████████▄▐▀▄██████████
███████▀▀███████▀▀███████
██████▀███▄▄████████████
█████████▐█████████▐█████
█████████▐█████████▐█████
██████████▀███▀███▄██████
████████████████▄▄███████
███████████▄▄▄███████████
█████████████████████████
▀█████▄▄████████████████▀
▀▀███████████████████▀▀
Peach
BTC bitcoin
Buy and Sell
Bitcoin P2P
.
.
▄▄███████▄▄
▄████████
██████▄
▄██
█████████████████▄
▄███████
██████████████▄
███████████████████████
█████████████████████████
████████████████████████
█████████████████████████
▀███████████████████████▀
▀█████████████████████▀
▀██████████████████▀
▀███████████████▀
▀▀███████▀▀

▀▀▀▀███▀▀▀▀
EUROPE | AFRICA
LATIN AMERICA
▄▀▀▀











▀▄▄▄


███████▄█
███████▀
██▄▄▄▄▄░▄▄▄▄▄
████████████▀
▐███████████▌
▐███████████▌
████████████▄
██████████████
███▀███▀▀███▀
.
Download on the
App Store
▀▀▀▄











▄▄▄▀
▄▀▀▀











▀▄▄▄


▄██▄
██████▄
█████████▄
████████████▄
███████████████
████████████▀
█████████▀
██████▀
▀██▀
.
GET IT ON
Google Play
▀▀▀▄











▄▄▄▀
apogio (OP)
Hero Member
*****
Offline Offline

Activity: 602
Merit: 1206



View Profile WWW
December 12, 2023, 10:02:23 AM
 #3

There's no need to end a line with a semi colon. That's only needed to separate commands on the same line.

Sure, it's just a habit from programming in Java  Tongue


In case there is no "Downloads" directory yet:
Code:
mkdir -p ~/Downloads/Core
cd ~/Downloads/Core


Good catch. Adding it now.

█████████████████████████
████████▀▀████▀▀█▀▀██████
█████▀████▄▄▄▄████████
███▀███▄███████████████
██▀█████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
██▄███████████████▀▀▄▄███
███▄███▀████████▀███▄████
█████▄████▀▀▀▀████▄██████
████████▄▄████▄▄█████████
█████████████████████████
 
 BitList 
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
REAL-TIME DATA TRACKING
CURATED BY THE COMMUNITY

.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
 
  List #kycfree Websites   
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!