...
How to set up and run your own bitcoin node on ubuntu vps
Learn how to set up and run your own bitcoin node on ubuntu vps!

This article provides a guide demonstrating how to set up and run your own Bitcoin node on Ubuntu VPS.

Running your own Bitcoin node is one of the best ways to participate directly in the Bitcoin network while maintaining independent control over how you validate transactions and blocks.

By hosting a Bitcoin node on a Virtual Private Server (VPS), you can operate a continuously available node without purchasing dedicated hardware or relying on a home internet connection.

Whether you want to support the Bitcoin network, independently verify transactions, improve your financial privacy, or build Bitcoin-powered applications, a VPS provides a flexible foundation.

In this tutorial, we’ll walk through installing Bitcoin Core on an Ubuntu VPS, securing the installation, synchronizing the blockchain, configuring automatic startup, and monitoring your node.

Bitcoin nodes independently validate the blockchain and communicate with other nodes across the decentralized peer-to-peer network.

Table of Contents

What is a Bitcoin node?

A Bitcoin node is a computer running software that participates in the Bitcoin peer-to-peer network.

A fully validating Bitcoin node independently checks blocks and transactions against the network’s consensus rules, rather than trusting a third-party service to determine which transactions are valid.

When running Bitcoin Core, your node can:

  • Download and independently validate the Bitcoin blockchain.
  • Verify transactions against Bitcoin’s consensus rules.
  • Communicate directly with other Bitcoin nodes.
  • Relay valid transactions and blocks to peers.
  • Provide locally verified blockchain information to applications.
  • Support your own Bitcoin wallet infrastructure.
  • Contribute to the reliability and decentralization of the Bitcoin network.

Important: Running a Bitcoin node is not the same as Bitcoin mining. A full node validates network activity but does not earn mining rewards or generate passive Bitcoin income.

Launch 100% ssd ubuntu vps from $3. 19/mo!


Compare Ubuntu VPS Plans

KVM-SSD-1
KVM-SSD-8
KVM-SSD-16
KVM-SSD-32
CPU
1 Core
2 Cores
4 Cores
8 Cores
Memory
1 GB
8 GB
16 GB
32 GB
Storage
16 GB NVMe
128 GB NVMe
256 GB NVMe
512 GB NVMe
Bandwidth
1 TB
4 TB
8 TB
16 TB
Network
1 Gbps
1 Gbps
1 Gbps
1 Gbps
Delivery Time
⏱️ Instant
⏱️ Instant
⏱️ Instant
⏱️ Instant
Location
US/EU/APAC
US/EU/APAC
US/EU/APAC
US/EU/APAC
Price
$7.58*
$39.50*
$79.40*
$151.22*
KVM-SSD-1
$7.58*
CPU 1 Core
Memory 1 GB
Storage 16 GB NVMe
Bandwidth 1 TB
Network 1 Gbps
Delivery Time ⏱️ Instant
Location US/EU/APAC
KVM-SSD-8
$39.50*
CPU 2 Cores
Memory 8 GB
Storage 128 GB NVMe
Bandwidth 4 TB
Network 1 Gbps
Delivery Time ⏱️ Instant
Location US/EU/APAC
KVM-SSD-16
$79.40*
CPU 4 Cores
Memory 16 GB
Storage 256 GB NVMe
Bandwidth 8 TB
Network 1 Gbps
Delivery Time ⏱️ Instant
Location US/EU/APAC
KVM-SSD-32
$151.22*
CPU 8 Cores
Memory 32 GB
Storage 512 GB NVMe
Bandwidth 16 TB
Network 1 Gbps
Delivery Time ⏱️ Instant
Location US/EU/APAC

How to Set Up and Run Your Own Bitcoin Node on Ubuntu VPS

To set up and run your own Bitcoin Node on Ubuntu VPS, follow the steps outlined below:

  1. Choose the right VPS for your Bitcoin node

    The first step is selecting a VPS with sufficient computing resources, fast storage, and reliable network connectivity.

    Bitcoin Core can run on relatively modest hardware, particularly when blockchain pruning is enabled. However, larger VPS configurations improve initial synchronization performance and support additional applications.

    Recommended VPS specifications

    Resource Pruned node Archival full node
    CPU 2–4 vCPU 4+ vCPU
    RAM 4 GB 8–16 GB
    Storage 30–50 GB SSD 1 TB+ SSD/NVMe
    Network 100 Mbps+ 1 Gbps preferred
    Bandwidth High allowance High/unmetered preferred
    OS Ubuntu 24.04 LTS Ubuntu 24.04 LTS
    IPv4 Public IPv4 preferred Public IPv4 preferred

    These are practical VPS recommendations rather than absolute Bitcoin Core minimums.

    See Also: How to Setup BIND DNS Server on Ubuntu VPS

    As of October 2026, blockchain storage requirements are substantial. Bitcoin Core’s published requirements reference approximately 740 GB of historical blockchain data, while pruning substantially reduces persistent disk requirements.

    For archival operation, choose at least 1 TB of NVMe storage and plan additional capacity as the blockchain grows. For a pruned node, a much smaller VPS is sufficient because historical block files are deleted after validation.

    Understanding pruned versus archival nodes

    • Pruned Bitcoin node – Validates the blockchain from genesis but discards older block files after they are no longer required. Ideal for VPS instances with limited storage. It cannot serve arbitrary historical blocks to peers or applications.
    • Archival Bitcoin full node – Validates the blockchain and retains historical block data. Suitable for long-term infrastructure, applications needing old blocks, and helping other nodes retrieve blockchain history.

    Both configurations enforce Bitcoin’s consensus rules independently. A pruned node is still a fully validating node.

    For the remainder of this guide, we’ll use a pruned node configuration by default, with instructions for switching to archival operation.

  2. Deploy your Ubuntu VPS

    Provision a new VPS with the following configuration:

    • Operating system: Ubuntu 24.04 LTS
    • Architecture: x86_64 (AMD64)
    • Storage: SSD or NVMe
    • Network: Public IPv4 with outbound connectivity
    • Access: SSH with root or sudo privileges

    After deployment, connect to your server using SSH:

    ssh root@YOUR_SERVER_IP
    

    Replace YOUR_SERVER_IP with your VPS public IP address.

    If your SSH service uses a custom port, specify it explicitly:

    ssh -p 2211 root@YOUR_SERVER_IP
    

    The following instructions assume you are logged in with root privileges. Commands beginning with sudo can also be executed from a sudo-enabled administrator account.

  3. Update Ubuntu and install dependencies

    Before installing Bitcoin Core, update the operating system and install essential administration tools.

    sudo apt update
    sudo apt upgrade -y
    

    Install required packages:

    sudo apt install -y \
      wget \
      curl \
      tar \
      gnupg \
      git \
      ca-certificates \
      ufw \
      jq \
      htop
    

    Confirm your Ubuntu release:

    lsb_release -a
    

    Check server resources:

    free -h
    df -h
    nproc
    

    Confirm the CPU architecture:

    uname -m
    

    For the x86_64 installation steps below, the expected result is:

    x86_64
    

    If your VPS uses ARM64, download the corresponding aarch64-linux-gnu Bitcoin Core release instead.

  4. Download Bitcoin Core

    Bitcoin Core is an open-source Bitcoin implementation that includes a fully validating node.

    See Also: How to Install Centmin Mod on AlmaLinux VPS (5 Minute Quick-Start Guide)

    The official download website is:

    Bitcoin Core official downloads

    At the time of writing, Bitcoin Core 32.1 is the latest stable release listed on the official download page.

    Create a temporary installation directory:

    mkdir -p /tmp/bitcoin-install
    cd /tmp/bitcoin-install
    

    Define the Bitcoin Core release:

    BTC_VERSION="32.1"
    BTC_ARCH="x86_64-linux-gnu"
    
    BTC_URL="https://bitcoincore.org/bin/bitcoin-core-${BTC_VERSION}"
    BTC_FILE="bitcoin-${BTC_VERSION}-${BTC_ARCH}.tar.gz"
    

    Download Bitcoin Core:

    wget "${BTC_URL}/${BTC_FILE}"
    

    Download its checksum and signature files:

    wget "${BTC_URL}/SHA256SUMS"
    wget "${BTC_URL}/SHA256SUMS.asc"
    

    Check the downloaded files:

    ls -lh
    

    You should see the Bitcoin Core archive alongside SHA256SUMS and SHA256SUMS.asc.

  5. Verify Bitcoin Core before installing

    Verifying the downloaded Bitcoin Core software is especially important when running infrastructure that may eventually interact with wallets or manage financial transactions.

    There are two distinct checks:

    1. Verify that the archive matches the published SHA-256 checksum.
    2. Verify that the checksum manifest has been signed by trusted Bitcoin Core release signers.

    Verify the SHA-256 checksum

    Run:

    sha256sum --ignore-missing --check SHA256SUMS
    

    Expected output:

    bitcoin-32.1-x86_64-linux-gnu.tar.gz: OK
    

    If the checksum does not match, do not install the archive.

    A matching checksum alone does not prove authenticity if both the archive and checksum file were tampered with. That is why signature verification matters.

    Verify the release signatures

    Obtain Bitcoin Core release-signing public keys from the official repository:

    git clone https://github.com/bitcoin-core/guix.sigs.git
    

    Import the available builder keys:

    gpg --import guix.sigs/builder-keys/*
    

    Verify the checksum file:

    gpg --verify SHA256SUMS.asc SHA256SUMS
    

    Look for valid signatures, and independently verify that the signers’ key fingerprints match trusted keys published by the Bitcoin Core project. An imported key is not inherently trustworthy simply because it was downloaded.

    The official Bitcoin Core download documentation explains how to validate release signatures and distinguish trusted signatures from warnings about missing keys.

    Do not proceed until the archive checksum matches and you have established authenticity through trusted signatures.

  6. Install Bitcoin Core

    Extract the verified Bitcoin Core archive:

    tar -xzf "$BTC_FILE"
    

    Install the node daemon and command-line utility:

    sudo install -m 0755 \
      "bitcoin-${BTC_VERSION}/bin/bitcoind" \
      /usr/local/bin/bitcoind
    
    sudo install -m 0755 \
      "bitcoin-${BTC_VERSION}/bin/bitcoin-cli" \
      /usr/local/bin/bitcoin-cli
    

    Confirm installation:

    bitcoind --version
    

    And:

    See Also: Easily Deploy NodeBB Community Forum on Ubuntu VPS

    bitcoin-cli --version
    

    The version output should identify Bitcoin Core 31.1.

    Installing binaries in /usr/local/bin allows them to be used from anywhere on the system.

  7. Create a dedicated Bitcoin service account

    For security, Bitcoin Core should not run as root.

    Instead, create a dedicated system account that owns the node’s data and runs the background service.

    sudo useradd \
      --system \
      --home-dir /var/lib/bitcoind \
      --shell /usr/sbin/nologin \
      bitcoin
    

    Create its data directory:

    sudo install -d \
      -o bitcoin \
      -g bitcoin \
      -m 0700 \
      /var/lib/bitcoind
    

    Verify permissions:

    ls -ld /var/lib/bitcoind
    

    Expected permissions:

    drwx------ bitcoin bitcoin
    

    This separates Bitcoin Core from other server applications and helps protect the node’s configuration and runtime authentication cookie.

  8. Configure Bitcoin Core

    Bitcoin Core uses a configuration file named bitcoin.conf.

    For this installation, we’ll store it at:

    /var/lib/bitcoind/bitcoin.conf
    

    Create the file:

    sudo nano /var/lib/bitcoind/bitcoin.conf
    

    Insert the following production-oriented configuration:

    # Bitcoin Core VPS Configuration
    
    # Enable JSON-RPC server functionality
    server=1
    
    # Enable incoming P2P connections
    listen=1
    
    # Bitcoin mainnet peer-to-peer port
    port=8333
    
    # Limit node connections
    maxconnections=40
    
    # Database cache in MiB
    dbcache=1024
    
    # Prune historical block files
    # 0 = disable pruning
    # 10000 = target approximately 10 GB of block files
    prune=10000
    
    # Transaction indexing
    # Must remain disabled when pruning
    txindex=0
    
    # Do not enable public RPC access
    # Keep RPC bound to loopback
    rpcbind=127.0.0.1
    
    # Optional bandwidth limit in MiB per day
    # maxuploadtarget=5000
    

    Save the file.

    Set secure ownership and permissions:

    sudo chown bitcoin:bitcoin \
      /var/lib/bitcoind/bitcoin.conf
    
    sudo chmod 600 \
      /var/lib/bitcoind/bitcoin.conf
    

    Important configuration options

    Setting Purpose
    server=1 Enables Bitcoin Core RPC commands
    listen=1 Accepts incoming Bitcoin P2P connections
    port=8333 Uses the mainnet P2P port
    maxconnections=40 Limits peer connections
    dbcache=1024 Allocates up to approximately 1 GiB for the database cache
    prune=10000 Keeps roughly 10 GB of recent block files
    txindex=0 Disables the full transaction index
    rpcbind=127.0.0.1 Restricts RPC listening to IPv4 loopback

    The prune setting is a target for block-file storage, not a limit on total Bitcoin Core disk usage. The UTXO database, chainstate, indexes, logs, and other files consume additional space.

    For a 4 GB RAM VPS, a smaller cache such as dbcache=450 may be preferable, especially if you run other applications on the same server.

    Optional: Enable archival mode

    If your VPS has sufficient storage and you want to retain the complete blockchain, replace:

    See Also: 🚀 Deploy ERPNext on Ubuntu VPS

    prune=10000
    txindex=0
    

    With:

    prune=0
    txindex=1
    

    txindex=1 is optional for archival nodes. It is useful for applications that need transaction lookups outside wallet-related data, but it consumes additional storage and indexing time.

    Important: Converting an already-pruned node to archival operation requires downloading the missing historical blockchain data again. Choose your intended storage model before initial synchronization whenever possible.

  9. Configure automatic startup with systemd

    Rather than manually starting Bitcoin Core after every VPS reboot, configure it as a systemd service.

    This allows Bitcoin Core to:

    • Start automatically when the server boots.
    • Run under the dedicated bitcoin account.
    • Restart automatically after unexpected failures.
    • Be controlled using standard Linux service commands.
    • Be monitored using systemd and journalctl.

    Create a new service file:

    sudo nano /etc/systemd/system/bitcoind.service
    

    Insert:

    [Unit]
    Description=Bitcoin Core Daemon
    Documentation=https://bitcoincore.org/
    After=network-online.target
    Wants=network-online.target
    
    [Service]
    Type=exec
    
    User=bitcoin
    Group=bitcoin
    
    ExecStart=/usr/local/bin/bitcoind -datadir=/var/lib/bitcoind -daemon=0
    
    ExecStop=/usr/local/bin/bitcoin-cli -datadir=/var/lib/bitcoind stop
    
    Restart=on-failure
    RestartSec=30
    
    TimeoutStartSec=15min
    TimeoutStopSec=15min
    
    LimitNOFILE=65536
    
    NoNewPrivileges=true
    PrivateTmp=true
    
    [Install]
    WantedBy=multi-user.target
    

    Bitcoin Core runs in the foreground when -daemon=0 is specified, allowing systemd to track the process.

    The extended shutdown timeout is important because Bitcoin Core may need additional time to flush its databases and exit cleanly.

    Reload systemd:

    sudo systemctl daemon-reload
    

    Enable Bitcoin Core to start on boot:

    sudo systemctl enable bitcoind
    

    Start the service:

    sudo systemctl start bitcoind
    

    Check its status:

    sudo systemctl status bitcoind
    

    A properly started service should show:

    Active: active (running)
    

    If it has just started, the RPC interface may not respond immediately while Bitcoin Core initializes its databases.

    To inspect service logs:

    sudo journalctl -u bitcoind -n 100 --no-pager
    

    To monitor the Bitcoin Core debug log directly:

    sudo tail -f /var/lib/bitcoind/debug.log
    
  10. Configure your VPS firewall

    Bitcoin nodes communicate with other peers over the Bitcoin peer-to-peer protocol.

    For Bitcoin mainnet, the traditional default P2P port is:

    8333/TCP

    Allow inbound

    Bitcoin Core also has a local RPC interface, traditionally using port 8332/TCP.

    Do not expose Bitcoin RPC port 8332 to the public internet. Bitcoin Core’s RPC interface is not designed to serve arbitrary untrusted traffic, and standard RPC connections are unencrypted.

    Enable UFW on Ubuntu

    First, explicitly allow your SSH port.

    See Also: 4 Quick Steps to Install CloudPanel on Debian VPS Server

    For servers using SSH port 22:

    sudo ufw allow 22/tcp
    

    For servers using SSH port 2211 instead:

    sudo ufw allow 2211/tcp
    

    Use the port on which your SSH daemon actually listens. Before enabling the firewall, confirm that your SSH allowance is correct so you do not lock yourself out.

    Allow Bitcoin mainnet connections:

    sudo ufw allow 8333/tcp
    

    Configure the default firewall policies:

    sudo ufw default deny incoming
    sudo ufw default allow outgoing
    

    Enable UFW:

    sudo ufw enable
    

    Verify the configuration:

    sudo ufw status verbose
    

    The firewall should permit inbound SSH and Bitcoin P2P traffic while denying other unsolicited inbound connections.

    Also configure any VPS provider-level firewall, security group, or network ACL to permit TCP 8333.

    Verify that Bitcoin is listening

    Use:

    sudo ss -lntp | grep -E '8332|8333'
    

    You should find Bitcoin Core listening on its configured peer-to-peer port.

    The RPC listener should be limited to 127.0.0.1:8332 and possibly IPv6 loopback, rather than a public interface.

    A node can still validate and synchronize blocks without inbound P2P connectivity, but accepting inbound connections helps other network participants reach your node.

  11. Start synchronizing the Bitcoin blockchain

    Once Bitcoin Core has started successfully, it begins discovering peers and downloading blockchain data.

    This process is known as Initial Block Download (IBD).

    During IBD, Bitcoin Core independently checks historical blocks and builds the chainstate database.

    Synchronization time varies based on CPU performance, memory, SSD speed, available bandwidth, and network peer availability. It can take hours or several days.

    Check blockchain synchronization

    Run:

    sudo -u bitcoin \
      bitcoin-cli -datadir=/var/lib/bitcoind \
      getblockchaininfo
    

    Example of abbreviated output:

    {
      "chain": "main",
      "blocks": 750000,
      "headers": 920000,
      "initialblockdownload": true,
      "verificationprogress": 0.81,
      "pruned": true
    }
    

    These numbers are illustrative, not current blockchain heights.

    The important fields are:

    Field Meaning
    chain Bitcoin network, such as mainnet
    blocks Number of blocks validated locally
    headers Number of block headers known
    initialblockdownload Whether IBD is still underway
    verificationprogress Estimated synchronization progress
    pruned Whether pruning is enabled

    When synchronization finishes, initialblockdownload should report false, verification progress should be close to 1, and the node’s validated block height should be close to the network tip.

    Create a simple synchronization progress command

    To display just the synchronization percentage:

    sudo -u bitcoin \
      bitcoin-cli -datadir=/var/lib/bitcoind \
      getblockchaininfo \
      | jq -r '.verificationprogress * 100 | "\(.)%"'
    

    For a frequently refreshed display:

    watch -n 30 \
      "sudo -u bitcoin bitcoin-cli -datadir=/var/lib/bitcoind getblockchaininfo | jq '{blocks,headers,initialblockdownload,verificationprogress}'"
    

    Press Ctrl+C to exit the watch display.

    See Also: Deploy Kubernetes Cluster on Ubuntu VPS

    Monitor initial disk usage

    Run:

    sudo du -sh /var/lib/bitcoind
    

    Monitor available disk space:

    df -h /var/lib/bitcoind
    

    Even on a pruned installation, Bitcoin Core must download and validate historical blocks before discarding older block data.

    Therefore, pruning reduces long-term storage usage but does not eliminate the initial bandwidth requirement.

  12. Verify your Bitcoin node is connected to peers

    Bitcoin nodes communicate with one another over decentralized P2P connections.

    Once your node has discovered peers, you can inspect its network activity.

    View network information

    sudo -u bitcoin \
      bitcoin-cli -datadir=/var/lib/bitcoind \
      getnetworkinfo
    

    This provides information about network status, connection counts, supported network types, and other details.

    Check connected peers

    sudo -u bitcoin \
      bitcoin-cli -datadir=/var/lib/bitcoind \
      getconnectioncount
    

    For detailed peer information:

    sudo -u bitcoin \
      bitcoin-cli -datadir=/var/lib/bitcoind \
      getpeerinfo
    

    For a more concise overview:

    sudo -u bitcoin \
      bitcoin-cli -datadir=/var/lib/bitcoind \
      getpeerinfo \
      | jq '.[] | {
          addr,
          connection_type,
          subver,
          synced_blocks
        }'
    

    A healthy node generally maintains outbound peers, and a publicly reachable listening node may receive inbound connections as well.

    If you have no peers, check your firewall rules, outbound network connectivity, logs, and any provider restrictions.

  13. Test blockchain queries and transaction verification

    One of the principal benefits of running your own Bitcoin node is that you can retrieve verified blockchain data directly from your own infrastructure.

    Retrieve the latest validated block height

    sudo -u bitcoin \
      bitcoin-cli -datadir=/var/lib/bitcoind \
      getblockcount
    

    Retrieve the latest validated block hash

    sudo -u bitcoin \
      bitcoin-cli -datadir=/var/lib/bitcoind \
      getbestblockhash
    

    Retrieve block details

    First, fetch a block hash for a particular height:

    sudo -u bitcoin \
      bitcoin-cli -datadir=/var/lib/bitcoind \
      getblockhash 100000
    

    Then retrieve the block’s information:

    sudo -u bitcoin \
      bitcoin-cli -datadir=/var/lib/bitcoind \
      getblock BLOCK_HASH
    

    Replace BLOCK_HASH with the returned hash.

    Note: On a pruned node, old block data may no longer be available locally. Queries for historical blocks that have been pruned will fail, even though your node previously validated those blocks.

    Query a transaction

    Use:

    sudo -u bitcoin \
      bitcoin-cli -datadir=/var/lib/bitcoind \
      getrawtransaction TXID true
    

    Replace TXID with the transaction ID.

    For transactions not in the mempool or wallet, a node without txindex may require a known containing block hash as an additional argument. Pruned block data cannot be retrieved if it has already been discarded.

    If your application needs extensive historical transaction lookups, consider using an archival node with txindex=1.

  14. Optimize Bitcoin Core for VPS resource usage

    VPS environments generally have defined limits on RAM, CPU, disk space, and network transfer.

    See Also: 🚀 How to Deploy Coolify on Ubuntu VPS

    Properly tuning Bitcoin Core allows you to balance node performance against your VPS resource allocation.

    Optimize memory consumption

    The dbcache setting controls memory allocated for Bitcoin Core’s database cache.

    Typical starting configurations:

    VPS RAM Suggested dbcache
    2 GB 300 MB
    4 GB 450 MB
    8 GB 1024 MB
    16 GB 2048 MB
    32 GB+ 4096 MB

    These are starting recommendations, not guaranteed total memory consumption. Bitcoin Core uses additional RAM for other activities, and the operating system needs memory as well.

    For example, on an 8 GB VPS:

    dbcache=1024
    

    Higher cache values can accelerate initial block validation when sufficient RAM is available.

    Limit upload bandwidth

    Nodes with public inbound connectivity may upload substantial blockchain data to peers.

    If your VPS plan has bandwidth limits, configure an upload target.

    For example:

    maxuploadtarget=5000
    

    This sets an approximate target of 5,000 MiB per 24-hour window for bandwidth tracked by Bitcoin Core’s outbound upload limiter. It is not an absolute cap on all VPS traffic.

    Bitcoin Core prioritizes certain traffic needed to keep the network functioning.

    Limit connected peers

    To reduce network and memory consumption:

    maxconnections=40
    

    Reducing this value may make sense for smaller VPS instances, but extremely restrictive peer limits can reduce network connectivity.

    Restart after configuration changes

    After modifying bitcoin.conf, restart Bitcoin Core:

    sudo systemctl restart bitcoind
    

    Check its status:

    sudo systemctl status bitcoind
    

    Be aware that restarts briefly interrupt peer connections, synchronization, and dependent RPC applications.

  15. Secure your Bitcoin node

    Operating a Bitcoin node on a publicly accessible VPS requires some basic security precautions.

    Bitcoin Core is designed to connect to untrusted peers over its P2P interface, but that does not mean all of its services should be publicly accessible.

    Keep Bitcoin RPC private

    Never configure the RPC interface to listen on all public addresses:

    # Do not use on an Internet-facing VPS
    rpcbind=0.0.0.0
    rpcallowip=0.0.0.0/0
    

    Instead, keep RPC local:

    rpcbind=127.0.0.1
    

    Bitcoin Core uses cookie-based RPC authentication by default, meaning a randomly generated authentication token is stored in a file accessible to the node’s operating-system account.

    The commands in this guide use:

    sudo -u bitcoin bitcoin-cli -datadir=/var/lib/bitcoind
    

    This allows local administration through the service account without hardcoding an RPC password in a configuration file.

    See Also: How to Install Osquery on Ubuntu VPS

    Access RPC securely from another computer

    If you need to administer Bitcoin Core from a workstation, use an SSH tunnel rather than opening RPC publicly.

    For example:

    ssh -N \
      -L 8332:127.0.0.1:8332 \
      -p 2211 \
      administrator@YOUR_SERVER_IP
    

    This forwards the workstation’s port 8332 through SSH to the VPS loopback interface.

    The tunnel protects transport, but the remote RPC client still requires authentication. Use an appropriate, separately scoped RPC credential rather than copying unrestricted authentication cookies casually between machines.

    For production application integrations, use Bitcoin Core’s rpcauth mechanism, least-privilege host access, and dedicated application credentials where appropriate.

    Enable automatic operating-system security updates

    Install Ubuntu’s unattended-upgrades package:

    sudo apt install -y unattended-upgrades
    

    Configure automatic APT updates:

    sudo dpkg-reconfigure unattended-upgrades
    

    Review the configuration in:

    /etc/apt/apt.conf.d/50unattended-upgrades
    

    Automatic OS updates do not replace Bitcoin Core release management when you’ve installed Bitcoin Core manually from official binaries.

    You must still monitor Bitcoin Core announcements and apply new releases yourself.

    Additional security precautions

    For a production Bitcoin VPS, we recommend SSH key authentication, disabling unnecessary network services, restricting sudo access, monitoring available disk space, and keeping the server dedicated to trusted applications.

    If you only need a node for validation or application queries, you do not need to create or fund a Bitcoin wallet on the VPS. Keeping private keys off publicly accessible infrastructure greatly reduces financial exposure if the server is compromised.

  16. Monitor your Bitcoin node

    Once your node finishes synchronizing, the next objective is maintaining its reliability.

    Check service health

    sudo systemctl is-active bitcoind
    

    Expected output:

    active
    

    Inspect recent events

    sudo journalctl -u bitcoind --since "1 hour ago"
    

    Or inspect the application log:

    sudo tail -n 100 /var/lib/bitcoind/debug.log
    

    Check network activity

    sudo -u bitcoin \
      bitcoin-cli -datadir=/var/lib/bitcoind \
      getnettotals
    

    This displays network data received and transmitted.

    Check CPU and memory consumption

    htop
    

    Or:

    ps -C bitcoind -o pid,%cpu,%mem,rss,etime,cmd
    

    Build a lightweight node health-check script

    Create:

    sudo nano /usr/local/sbin/bitcoin-node-health.sh
    

    Insert:

    #!/usr/bin/env bash
    
    set -euo pipefail
    
    DATADIR="/var/lib/bitcoind"
    CLI="/usr/local/bin/bitcoin-cli"
    
    echo "===================================="
    echo " Bitcoin Node Health Report"
    echo "===================================="
    echo
    
    echo "Service status:"
    systemctl is-active bitcoind
    echo
    
    echo "Blockchain synchronization:"
    sudo -u bitcoin "$CLI" \
      -datadir="$DATADIR" \
      getblockchaininfo | jq '{
        chain,
        blocks,
        headers,
        initialblockdownload,
        verificationprogress,
        pruned
      }'
    echo
    
    echo "Connected peers:"
    sudo -u bitcoin "$CLI" \
      -datadir="$DATADIR" \
      getconnectioncount
    echo
    
    echo "Disk usage:"
    du -sh "$DATADIR"
    df -h "$DATADIR"
    echo
    
    echo "System memory:"
    free -h
    

    Make the script executable:

    See Also: 🚀 Deploy Docmost on Ubuntu VPS

    sudo chmod 750 \
      /usr/local/sbin/bitcoin-node-health.sh
    

    Run it:

    sudo /usr/local/sbin/bitcoin-node-health.sh
    

    This provides a convenient overview of service health, synchronization progress, peer connectivity, disk consumption, and available memory.

    The script is intended to be run by root or an appropriately privileged administrator.

  17. Update Bitcoin Core safely

    Bitcoin Core periodically releases improvements, bug fixes, security patches, and protocol-related updates.

    Because we installed Bitcoin Core using official release binaries, upgrading requires downloading and verifying the new release.

    The general upgrade procedure is:

    1. Review the new release notes and compatibility requirements.
    2. Download the new Linux archive and its verification files.
    3. Verify the checksum and trusted release signatures.
    4. Stop Bitcoin Core cleanly.
    5. Replace the installed binaries.
    6. Restart the service.
    7. Verify synchronization and peer connectivity.

    For example, after downloading, verifying, and extracting a new release into your installation directory:

    sudo systemctl stop bitcoind
    

    Confirm that Bitcoin Core has stopped:

    sudo systemctl is-active bitcoind
    

    Install the verified new binaries, replacing NEW_VERSION with the actual version:

    sudo install -m 0755 \
      "bitcoin-NEW_VERSION/bin/bitcoind" \
      /usr/local/bin/bitcoind
    
    sudo install -m 0755 \
      "bitcoin-NEW_VERSION/bin/bitcoin-cli" \
      /usr/local/bin/bitcoin-cli
    

    Restart:

    sudo systemctl start bitcoind
    

    Confirm its version:

    bitcoind --version
    

    And inspect its status:

    sudo systemctl status bitcoind
    

    Always read the release notes before upgrading. Some versions may change configuration options, data formats, or database compatibility. Do not assume that rolling back binaries will always be safe after a database upgrade.

  18. Back up your Bitcoin node

    The backup strategy depends on how you use your node.

    If the VPS runs Bitcoin Core solely for independent blockchain verification, its blockchain data can be downloaded and validated again. Losing that data costs time and bandwidth but does not inherently result in lost Bitcoin.

    If the node also hosts a wallet, backup requirements are much more serious.

    Back up the Bitcoin configuration

    For a node without wallet functionality, begin by preserving its configuration.

    sudo install -d -m 0700 /root/bitcoin-backups
    

    Copy the configuration file:

    sudo cp \
      /var/lib/bitcoind/bitcoin.conf \
      /root/bitcoin-backups/bitcoin.conf
    

    Protect the backup:

    sudo chmod 600 \
      /root/bitcoin-backups/bitcoin.conf
    

    Store backups securely, preferably encrypted and outside the VPS.

    Back up blockchain data

    Full blockchain backups can be extremely large.

    See Also: How to Manage Ruby Apps in cPanel

    For archival nodes, backups may consume hundreds of gigabytes or more. Depending on your recovery objectives, resynchronizing may be more economical.

    If you choose to back up the complete Bitcoin Core data directory, stop the daemon before taking a file-level copy:

    sudo systemctl stop bitcoind
    

    Then create the backup:

    sudo tar -czf \
      /root/bitcoin-backups/bitcoin-datadir.tar.gz \
      -C /var/lib \
      bitcoind
    

    Restart:

    sudo systemctl start bitcoind
    

    Ensure the destination has sufficient capacity for the resulting archive. For large archival nodes, storage snapshots or incremental backups may be more practical than producing a single tarball.

    Wallet warning: If your node contains wallet private keys, treat wallet backups as highly sensitive. Wallet recovery depends on the wallet type and its recovery material. Do not rely solely on a VPS provider snapshot, and never place wallet seed phrases or private keys in ordinary server configuration files.

  19. Troubleshoot common Bitcoin VPS problems

    Even a correctly configured node may encounter issues during initial synchronization or normal operation.

    Problem Likely cause Suggested solution
    Bitcoin Core fails to start Invalid configuration or permissions Check journalctl and debug.log
    Zero peer connections Network or firewall restrictions Check port 8333 and outbound connectivity
    Slow initial sync Storage I/O, CPU, or insufficient cache Use NVMe and tune dbcache
    VPS runs out of disk Insufficient total storage or pruning disabled Expand the filesystem or adjust pruning
    RPC connection refused Bitcoin Core not ready or RPC unreachable Check service status and loopback listener
    Historical block unavailable Block was pruned Use an archival node
    High network usage Peer traffic and block synchronization Configure maxuploadtarget
    Service stops unexpectedly OOM, disk pressure, or application error Inspect journal, memory, and disk metrics

    Diagnose a failed service

    Run:

    sudo systemctl status bitcoind --no-pager
    sudo journalctl -u bitcoind -n 100 --no-pager
    

    Check data permissions:

    sudo ls -ld /var/lib/bitcoind
    

    Check available storage:

    df -h /var/lib/bitcoind
    

    Check whether the kernel killed the process because of memory exhaustion:

    sudo journalctl -k | grep -iE 'out of memory|oom|killed process'
    

    Avoid repeatedly restarting a node until you’ve identified the root cause, particularly if the logs indicate database or filesystem corruption.

Frequently asked questions

Can I run a Bitcoin node on a VPS?

Yes. Bitcoin Core can run on a Linux VPS with sufficient CPU, RAM, SSD storage, and network connectivity. A VPS is particularly useful when you want the node online continuously.

How much RAM do I need?

See Also: 🚀 Deploy Odoo on Rocky Linux VPS

For a practical deployment, 4 GB RAM is a reasonable starting point for a pruned node. An 8 GB or larger VPS provides additional room for database caching and other applications.

How much disk space does a Bitcoin node need?

A pruned Bitcoin node can operate with substantially less disk space than an archival node. We recommend allocating at least 30–50 GB for a small VPS deployment. An archival node needs enough storage for the entire blockchain and continued growth—plan for at least 1 TB of fast storage today.

Does running a Bitcoin node earn money?

No. Running Bitcoin Core alone does not earn mining rewards, staking rewards, or transaction fees. It provides transaction validation and supports the network.

Can I run Bitcoin Core without downloading the entire blockchain?

A pruned node still needs to download and validate the historical blockchain during initial synchronization. It then deletes older block files. This reduces long-term disk usage, not the initial validation requirement.

Do I need a public IPv4 address?

Not strictly. A node can establish outbound connections without public inbound connectivity. However, a publicly reachable IPv4 or IPv6 address makes it easier for other peers to connect. Tor connectivity is another option for appropriate deployments.

Can I run a Bitcoin node on Ubuntu 22.04 or Debian?

Yes. Bitcoin Core supports compatible Linux systems, including Ubuntu and Debian. Package dependencies and installation details may vary, but the overall procedure is similar.

Can I use the same VPS for a Bitcoin node and a website?

Yes, provided the VPS has sufficient resources. However, a dedicated Bitcoin VPS simplifies security, capacity planning, troubleshooting, and performance management.

Is running a Bitcoin node secure?

Bitcoin Core is designed to validate data received from untrusted network peers. Nevertheless, a publicly accessible VPS still requires regular updates, firewalls, secure administration, and careful RPC access controls. For self-custody, keeping wallet private keys on separate trusted hardware is generally safer.
Launch 100% ssd ubuntu vps from $3. 19/mo!

Conclusion: Run your own Bitcoin infrastructure with a VPS

Running your own Bitcoin node gives you an independently verified view of the Bitcoin blockchain while contributing to the network’s decentralization.

With an Ubuntu VPS, Bitcoin Core, and a properly configured systemd service, you can operate a continuously available node without maintaining physical server hardware.

For most individuals getting started, a pruned Bitcoin node on a VPS with 4 GB RAM and 30–50 GB of SSD storage offers a practical and economical introduction. More demanding applications may benefit from a larger archival configuration with additional memory and NVMe storage.

See Also: 🚀 How to Deploy Cosmos Cloud on Ubuntu VPS

By keeping Bitcoin Core updated, monitoring synchronization and disk capacity, and securing the RPC interface, you can build a reliable foundation for Bitcoin validation and self-hosted blockchain services.

You now know how to set up and run your own Bitcoin node on Ubuntu VPS.

Related resources

For further reading and future updates, consult the official project documentation:

Avatar of editorial staff

Editorial Staff

Rad Web Hosting is a leading provider of web hosting, Cloud VPS, and Dedicated Servers in Dallas, TX.

Leave a Reply

lg