How to Set Up a Bitcoin Full Node (Pruned) on Ubuntu
Step 1: Get Your Server Ready
Before we begin, make sure you have:
-
A Linux server running Ubuntu (VPS or baremetal)
-
SSH access to the server (you should be able to connect via terminal)
-
At least 2GB of RAM and 50GB of storage (depending on your needs)
-
A stable internet connection
Step 2: Update Your Server
Log into your server and update the package lists:
sudo apt update && sudo apt upgrade -y
Step 3: Install Bitcoin Core Dependencies
Install required libraries for Bitcoin Core:
sudo apt install -y build-essential libtool autotools-dev automake pkg-config bsdmainutils python3
sudo apt install -y libssl-dev libevent-dev libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev
sudo apt install -y libzmq3-dev libminiupnpc-dev libsodium-dev
sudo apt install -y libdb-dev libdb++-dev libnatpmp-dev
sudo apt install -y libssl-dev libevent-dev
Step 4: Download Bitcoin Core
Next, we’ll download Bitcoin Core from the official website:
wget https://bitcoin.org/bin/bitcoin-core-24.0/bitcoin-24.0-x86_64-linux-gnu.tar.gz
tar -xvf bitcoin-24.0-x86_64-linux-gnu.tar.gz
cd bitcoin-24.0
Step 5: Install Bitcoin Core
Now install Bitcoin Core:
sudo cp -r bitcoin-24.0/bin/* /usr/local/bin/
Step 6: Configure Bitcoin Core (Pruned Mode)
Create a Bitcoin configuration file to enable pruned mode.
mkdir ~/.bitcoin
nano ~/.bitcoin/bitcoin.conf
Paste the following configuration into the bitcoin.conf
file:
# Bitcoin Core configuration file
server=1
rpcuser=yourrpcuser
rpcpassword=yourrpcpassword
rpcallowip=127.0.0.1
rpcport=8332
prune=550
txindex=1
daemon=1
-
rpcuser
andrpcpassword
: You can set these to whatever you'd like (make them strong). -
prune=550
: This will set the node to prune the blockchain after 550MB (you can adjust this for more storage). -
txindex=1
: Ensures that transaction indexing is enabled (helps with querying).
Save and exit.
Step 7: Start Bitcoin Core
Now, start Bitcoin Core:
bitcoind -daemon
Step 8: Check Your Node’s Status
To check if Bitcoin Core is running, use:
bitcoin-cli getblockchaininfo
You should see information about the blockchain, indicating that your node is syncing.