This guide details the setup of a Bitcoin Core node on a bare-metal Ubuntu server. It is optimized for my specific hardware: an Optiplex with 24GB of RAM, a 2TB NVMe SSD for performance-critical data, and a 4TB HDD for secondary storage.
Phase 1: OS Installation & Storage Configuration
(Check out my guide on getting bare-metal, headless, Ubuntu 24.04 LTS up and running https://expatriotic.me/ubuntu)
- Configure the 2TB NVMe: Set it as the "boot device":
- A
1Gfat32partition mounted at/boot/efiwill be automatically created. - Then navigate to where it says "free space" and create an
ext4partition mounted at/.
- A
- Configure the 4TB HDD: Create one large
ext4partition mounted at/mnt/bigdata.
This ensures your entire OS and all future I/O-intensive work will run from the NVMe.
Phase 2: Initial Server Setup
Once installed, and log in as your
satoshis user.-
Update System & Install Tools:
sudo apt update && sudo apt upgrade -y sudo apt install -y ufw fail2ban unattended-upgrades tmux gpg ufw -
Configure Firewall:
sudo ufw allow ssh sudo ufw allow 8333 # Bitcoin P2P sudo ufw enable
Phase 3: Bitcoin Core v30.0 Installation & Verification
Here we will use your improved, variable-based method to download and verify the latest version.
1. Download the Binaries & Hashes
# Set the version for easy updates in the future
BITCOIN_VERSION=30.0
cd ~
wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}-x86_64-linux-gnu.tar.gz
wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS
wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc
2. Verify the Software (Do Not Skip)
This cryptographic check ensures the software is authentic.
# Import developers' GPG keys
gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys \
01EA5486DE18A882D4C2684590C8019E36C2E964 \
F46018499914761321051F335338D04620E89B4B
# Verify the signature on the hash file
gpg --verify SHA256SUMS.asc SHA256SUMS
Look for a "Good signature" message.
# Check your download against the trusted hash
sha256sum --check --ignore-missing SHA256SUMS
You must see the line:
bitcoin-${BITCOIN_VERSION}-x86_64-linux-gnu.tar.gz: OK3. Install the Binaries
tar -zxvf bitcoin-${BITCOIN_VERSION}-x86_64-linux-gnu.tar.gz
sudo mv bitcoin-${BITCOIN_VERSION}/bin/* /usr/local/bin/
Phase 4: Configuration (bitcoin.conf)
This file controls your node. We'll use your user's home directory (
~/) for all paths.-
Create the Bitcoin directory:
mkdir -p ~/.bitcoin -
Create and edit the config file:
nano ~/.bitcoin/bitcoin.conf -
Paste the following configuration:
# --- Bitcoin Core Config --- # For a node serving Fulcrum and Ashigaru. [Network] server=1 txindex=1 [Node] prune=0 [RPC] # Bind to localhost and set credentials for your indexers # Fulcrum/Ashigaru are NOT compatible with rpcauth, use rpcpassword rpcbind=127.0.0.1 rpcport=8332 rpcuser=satoshis rpcpassword=REPLACE_THIS_WITH_A_VERY_STRONG_RANDOM_PASSWORD [ZMQ (ZeroMQ)] # Required for real-time updates to indexers zmqpubrawblock=tcp://127.0.0.1:28332 zmqpubrawtx=tcp://127.0.0.1:28333 [Wallet & GUI] disablewallet=1 [Performance] # Use 4GB (4096MB) of your 24GB RAM as a cache # This will dramatically speed up the IBD dbcache=4096
Phase 5: Launching the IBD with tmux
This phase covers the initial sync, where
tmux is essential for session persistence.Check out my tmux guide: https://expatriotic.me/tmux
-
Start a New
tmuxSession:tmux new -s bitcoin -
Launch
bitcoind:-
Run the daemon in the foreground. This will pipe all log output directly to your
tmuxwindow (acting just liketail -f)./usr/local/bin/bitcoind -datadir=$HOME/.bitcoin -
Or run the daemon in the background if you prefer.
bitcoind -daemon
-
-
Monitor and Detach: You will see the node connect to peers and begin downloading blocks.To check the sync status, you'll need to open a new SSH terminal (or a new
tmuxwindow withCtrl+b,c). In that new terminal, run:bitcoin-cli getblockchaininfoLook at theverificationprogressfield. It will climb towards1.0(which is 100%).To detach from your logging session (leaving it running), pressCtrl+bthend. You can now safely log out. -
Re-attaching and Monitoring (After Detaching): To check on the sync later, SSH back in and run:
tmux attach -t bitcoin(to see the live log again)bitcoin-cli getblockchaininfo(to get a clean status report)tail -f ~/.bitcoin/debug.log(if you prefer to watch the log outside oftmux)
Phase 6: Transitioning to a systemd Service (Post-IBD)
tmux is for the initial sync. Once the node is fully synced (which will take days), we will move it to a systemd service so it runs reliably and auto-starts on boot.Once the IBD is 100% complete:
-
Stop the Node Gracefully: Re-attach to your session (
tmux attach -t bitcoin) and stop the daemon.bitcoin-cli stopWait for the process to exit, then typeexitto close thetmuxsession. -
Create the
systemdService File:sudo nano /etc/systemd/system/bitcoind.service -
Paste the Service Configuration: Note: Inside a
systemdunit file, we must use the full, hardcoded path. Variables like$HOMEor~/will not work because the service runs in a non-interactive context. I have updated all paths to use your correct home directory:/home/satoshis.[Unit] Description=Bitcoin Daemon After=network-online.target Wants=network-online.target [Service] # Run as your 'satoshis' user User=satoshis Group=satoshis Type=forking PIDFile=/home/satoshis/.bitcoin/bitcoind.pid # Specify the command to start bitcoind in daemon mode ExecStart=/usr/local/bin/bitcoind -daemon \ -pid=/home/satoshis/.bitcoin/bitcoind.pid \ -conf=/home/satoshis/.bitcoin/bitcoin.conf \ -datadir=/home/satoshis/.bitcoin Restart=on-failure RestartSec=30 TimeoutStopSec=600 # Hardening PrivateTmp=true ProtectSystem=full NoNewPrivileges=true PrivateDevices=true MemoryDenyWriteExecute=true [Install] WantedBy=multi-user.target -
Launch Your Node:
sudo systemctl daemon-reload sudo systemctl enable --now bitcoind -
Verify:
journalctl -fu bitcoindPressCtrl+Cto stop following the log. -
Quick Health Check:
sudo systemctl status bitcoind -
Progress Bar:
bitcoin-cli getblockchaininfoThis will return a block of JSON data. Look for the"verificationprogress"field. Since your node is already synced, this value should be1.0(or very close to it), confirming you are at the chain tip. -
Raw Log:
tail -f ~/.bitcoin/debug.logThis shows you the raw, detailed application log from Bitcoin Core itself. You will see it connect to peers, validate transactions, and announce new blocks as they are found. Just like withjournalctl, pressCtrl+Cto stop following the log.
Bitcointo my friends.