TUTORIAL - HOW TO INSTALL A PRUNED BITCOIN NODE ON DEBIAN / UBUNTU LINUX

This guide focuses on Debian / Ubuntu systems, but you can install a pruned Bitcoin node on any Linux system, whether it's a PC or VPS.

Check here for more information: https://bitcoin.org/en/full-node


1) Secure your system

Before you install your Bitcoin pruned node, make sure to secure your system. You can find a guide here: https://www.digitalocean.com/community/tutorials/an-introduction-to-securing-your-linux-vps

Most important parts are to update your system regularly with:
sudo apt-get update && sudo apt-get upgrade, set firewall rules, and secure remote access.


2) Add Bitcoin PPA

sudo apt-get install software-properties-common
sudo apt-add-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install bitcoind

3) Create user for Bitcoin and login

sudo adduser bitcoin
su - bitcoin

4) Add bitcoin.conf file

cd ~
mkdir .bitcoin
nano .bitcoin/bitcoin.conf

Paste the following text:

prune=550

If you have less than 2 GB RAM, use these options instead:

prune=550
minrelaytxfee=0.00005
limitfreerelay=0
dbcache=50
maxmempool=100
maxorphantx=10

The prune=550 option will ensure that bitcoind doesn't try to save the entire 250+ GB blockchain to disk and instead prunes it as it downloads. This means that your blockchain file will be less than 1 GB. chainstate will additionally write around 5 GB to disk.

Your system will still need to download the entire blockchain, even if it doesn't save it to disk, so make sure you have enough bandwidth. The remaining options save RAM by limiting mempool size and requiring a fee of more than 0.00005 BTC (around $0.25). With these options, your node should use less than 500 MB RAM. However, it is recommended to allow any tx fees, so if you have more than 2 GB RAM, feel free to only keep prune=550.

5) Start bitcoind and wait for blockchain sync

nohup bitcoind &

Depending on your system's internet speed, it may take 12-72 hours to sync. The first 300k blocks will sync fairly quickly, while the remaining 200k blocks will take longer to sync. nohup means that the process continues after you log out. & means that the process runs in the background, so you can execute other commands during sync.

To check sync progress, enter:

bitcoin-cli getblockchaininfo

When sync is completed, you will see something like:

"verificationprogress": 0.99998765

Verification progress doesn't need to reach 1.0000, a value close to 0.9999 is already synced.

6) Use and monitor your pruned node

Now your pruned node can relay transactions and you can use bitcoin-clis features. You can also create and encrypt a Bitcoin wallet, but due to security reasons, it is advised to not store a large amount on your system and instead use a hardware wallet like Trezor or Ledger or a secure paper wallet.

Check RAM usage:

free -h

The available column tells you how much RAM is free.

Check CPU and RAM usage by process:

ps aux --sort=-pcpu,-pmem

Look for bitcoind and you will see how much CPU and RAM it uses.

Check disk usage:

df -h

Check disk usage of Bitcoin:

du -h ~/.bitcoin

Congratulations, your pruned Bitcoin node is now ready to use.

TUTORIAL - HOW TO INSTALL A FULL BITCOIN NODE ON DEBIAN / UBUNTU LINUX

This guide focuses on Debian / Ubuntu systems, but you can install a full Bitcoin node on any Linux system, whether it's a PC or VPS.

Check here for more information: https://bitcoin.org/en/full-node


1) Secure your system

Before you install your Bitcoin full node, make sure to secure your system. You can find a guide here: https://www.digitalocean.com/community/tutorials/an-introduction-to-securing-your-linux-vps

Most important parts are to update your system regularly with:
sudo apt-get update && sudo apt-get upgrade, set firewall rules, and secure remote access.


2) Add Bitcoin PPA

sudo apt-get install software-properties-common
sudo apt-add-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install bitcoind

3) Create user for Bitcoin and login

sudo adduser bitcoin
su - bitcoin

4) Start bitcoind and wait for blockchain sync

nohup bitcoind &

Depending on your system's internet speed, it may take several days to sync. The first 300k blocks will sync fairly quickly, while the remaining blocks will take longer to sync. nohup means that the process continues after you log out. & means that the process runs in the background, so you can execute other commands during sync.

To check sync progress, enter:

bitcoin-cli getblockchaininfo

When sync is completed, you will see something like:

"verificationprogress": 0.99998765

Verification progress doesn't need to reach 1.0000, a value close to 0.9999 is already synced.

5) Use and monitor your full node

Now your full node can relay transactions and you can use bitcoin-clis features. You can also create and encrypt a Bitcoin wallet, but due to security reasons, it is advised to not store a large amount on your system and instead use a hardware wallet like Trezor or Ledger or a secure paper wallet.

Check RAM usage:

free -h

The available column tells you how much RAM is free.

Check CPU and RAM usage by process:

ps aux --sort=-pcpu,-pmem

Look for bitcoind and you will see how much CPU and RAM it uses.

Check disk usage:

df -h

Check disk usage of Bitcoin:

du -h ~/.bitcoin

Congratulations, your full Bitcoin node is now ready to use.