Blockchain node setup guide
How to run your own blockchain node on a VPS from scratch: choose a plan, secure the server, verify downloads, run a systemd service and check sync.
Read more →Bitcoin Core is the reference implementation of Bitcoin. This guide sets up a pruned node on Ubuntu 24.04: it validates the whole chain but keeps only recent blocks, so it fits on a CORE plan. Every command can be copied with one click.
Updated 2026-11-11 · Published by AnonVPS
Log in as root over SSH or the in-browser console, then update the system and create an unprivileged user for daily work. The node itself will run under its own service account, never as root.
apt update && apt full-upgrade -y
adduser admin
usermod -aG sudo admin
rsync --archive --chown=admin:admin ~/.ssh /home/admin
# log out, then log back in as adminAllow SSH and the Bitcoin peer-to-peer port. Keep the RPC and API ports closed to the internet: they are not meant to face the public network.
sudo apt install -y ufw
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow OpenSSH
sudo ufw allow 8333/tcp
sudo ufw enable
sudo ufw statusBitcoin Core uses memory for its database cache during sync. With 4 GB of RAM a swap file prevents out-of-memory stops.
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
free -hsudo useradd --system --create-home --home-dir /var/lib/bitcoind --shell /usr/sbin/nologin bitcoin
sudo install -d -m 755 /etc/bitcoinCheck the current version on bitcoincore.org and set it below. Signatures are made by several builders; the project explains how to verify them on its download page. At minimum, the checksum must match.
VER=VERSION_FROM_THE_DOWNLOAD_PAGE # example format: 30.0
cd /tmp
wget https://bitcoincore.org/bin/bitcoin-core-$VER/bitcoin-$VER-x86_64-linux-gnu.tar.gz
wget https://bitcoincore.org/bin/bitcoin-core-$VER/SHA256SUMS
wget https://bitcoincore.org/bin/bitcoin-core-$VER/SHA256SUMS.ascsha256sum --ignore-missing --check SHA256SUMSgpg --verify SHA256SUMS.asc SHA256SUMStar -xzf bitcoin-$VER-x86_64-linux-gnu.tar.gz
sudo install -m 0755 -o root -g root -t /usr/local/bin bitcoin-$VER/bin/bitcoind bitcoin-$VER/bin/bitcoin-cli
bitcoind --version | head -1prune=550 is the smallest allowed value. A larger value keeps more recent blocks, which helps if you rescan a wallet. RPC stays on localhost.
sudo tee /etc/bitcoin/bitcoin.conf >/dev/null <<'EOF'
datadir=/var/lib/bitcoind
prune=2000
dbcache=1000
maxconnections=40
listen=1
server=1
rpcbind=127.0.0.1
rpcallowip=127.0.0.1
EOF
sudo chown root:bitcoin /etc/bitcoin/bitcoin.conf
sudo chmod 640 /etc/bitcoin/bitcoin.confsudo tee /etc/systemd/system/bitcoind.service >/dev/null <<'EOF'
[Unit]
Description=Bitcoin Core daemon
After=network-online.target
Wants=network-online.target
[Service]
ExecStart=/usr/local/bin/bitcoind -conf=/etc/bitcoin/bitcoin.conf
User=bitcoin
Group=bitcoin
Type=simple
Restart=on-failure
TimeoutStopSec=600
PrivateTmp=true
ProtectSystem=full
NoNewPrivileges=true
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable --now bitcoind
sudo systemctl status bitcoind --no-pagerThe node is synced when blocks equals headers and verificationprogress is close to 1.
alias btc='sudo -u bitcoin bitcoin-cli -conf=/etc/bitcoin/bitcoin.conf'
btc getblockchaininfo | grep -E 'blocks|headers|verificationprogress|pruned'
btc getnetworkinfo | grep -E 'connections|version'
btc getconnectioncount
journalctl -u bitcoind -n 30 --no-pagerssh -L 8332:127.0.0.1:8332 admin@YOUR-SERVER-IP. RPC credentials live in the datadir cookie file.sudo systemctl stop bitcoind
# repeat step 5 with the new version, then:
sudo systemctl start bitcoindNo. It needs about 760 GB of disk and these plans top out below that. A pruned node validates the same rules and is what is offered.
No. A pruned node validates every block. It only discards old raw block data afterwards, so it cannot serve old blocks to other peers.
It must download and verify the whole chain. A larger dbcache helps if you have spare RAM.
8333/tcp for peers. Leave RPC (8332) closed.
Yes. Order the larger plan, set it up again and let it sync, or copy the datadir while both are stopped.
How to run your own blockchain node on a VPS from scratch: choose a plan, secure the server, verify downloads, run a systemd service and check sync.
Read more →A practical checklist for a new Linux VPS: SSH keys, a non-root user, firewall, automatic updates and backups, with the commands.
Read more →Step-by-step: full-disk encryption on a Debian or Ubuntu VPS with LUKS and dropbear in the initramfs for remote unlock.
Read more →Run your own Monero node (pruned or full) on a VPS: install monerod, verify hashes, configure, run with systemd and connect wallets. Copy-and-paste commands.
Read more →