Home / Guides / Bitcoin node setup guide
Guide

Run a Bitcoin node on a VPS.

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.

What you need

  • A CORE plan or larger (2 vCPU, 4 GB RAM, 60 GB NVMe). Choose Bitcoin Node in the configurator and the right plan is selected for you.
  • Transfer: the first sync downloads the whole chain (about 760 GB in 2026), even when pruned.
  • About 30 to 60 minutes of your time, then patience while it syncs.
  • A full archival node needs about 760 GB of disk and is not offered on these plans.

1. Update the server and create a user

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.

Update and create an admin user
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 admin

2. Open only the port the node needs

Allow 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.

Firewall
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 status

3. Add swap on small plans

Bitcoin Core uses memory for its database cache during sync. With 4 GB of RAM a swap file prevents out-of-memory stops.

Add swap (recommended on 4 GB plans)
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 -h

4. Create the service account

Account and directories
sudo useradd --system --create-home --home-dir /var/lib/bitcoind --shell /usr/sbin/nologin bitcoin
sudo install -d -m 755 /etc/bitcoin

5. Download and verify Bitcoin Core

Check 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.

Download
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.asc
Verify the checksum
sha256sum --ignore-missing --check SHA256SUMS
Verify signatures (after importing builder keys from the official guix.sigs repository)
gpg --verify SHA256SUMS.asc SHA256SUMS
Install the binaries
tar -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 -1

6. Configure

prune=550 is the smallest allowed value. A larger value keeps more recent blocks, which helps if you rescan a wallet. RPC stays on localhost.

/etc/bitcoin/bitcoin.conf
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.conf

7. Run it with systemd

/etc/systemd/system/bitcoind.service
sudo 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-pager

8. Check sync

The node is synced when blocks equals headers and verificationprogress is close to 1.

Status commands
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-pager

Using your node from a wallet

  • Point a wallet that supports your own node at it through an SSH tunnel: ssh -L 8332:127.0.0.1:8332 admin@YOUR-SERVER-IP. RPC credentials live in the datadir cookie file.
  • Do not open port 8332 to the internet.
  • Use a hardware wallet or a wallet on a device you control for funds. The node does not need keys.

Upgrade and stop safely

Stop, upgrade, start
sudo systemctl stop bitcoind
# repeat step 5 with the new version, then:
sudo systemctl start bitcoind
FAQ

Common questions

Can I run a full archival Bitcoin node here?

No. 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.

Does pruning make the node less secure?

No. A pruned node validates every block. It only discards old raw block data afterwards, so it cannot serve old blocks to other peers.

Why is the first sync so slow?

It must download and verify the whole chain. A larger dbcache helps if you have spare RAM.

Which port do I open?

8333/tcp for peers. Leave RPC (8332) closed.

Can I move the node to a bigger plan later?

Yes. Order the larger plan, set it up again and let it sync, or copy the datadir while both are stopped.

Keep reading

Related pages

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 →

VPS hardening checklist: secure a new Linux server in 15 minutes

A practical checklist for a new Linux VPS: SSH keys, a non-root user, firewall, automatic updates and backups, with the commands.

Read more →

Encrypt a VPS with LUKS and unlock it remotely over SSH

Step-by-step: full-disk encryption on a Debian or Ubuntu VPS with LUKS and dropbear in the initramfs for remote unlock.

Read more →

Monero node setup guide

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 →

Order a server with the right plan preselected.

Open the configurator