Blockchain Node Hosting on a VPS means running a blockchain node, which is a server that helps operate and verify a blockchain network like Ethereum, Geth and Erigon, Bitcoin Core on a VPS instead of your own hardware. This Blockchain Node Hosting VPS Tutorial shows you how to install and manage blockchain nodes on a fresh Ubuntu VPS for Web3 and cryptocurrency projects.
If you need a powerful and high-performance VPS which optimized for blockchain workloads, you can check PerLod Hosting.
Install and Manage Blockchain Nodes on VPS
In this guide, we will use Ubuntu LTS, like Ubuntu 24.04 or Ubuntu 22.04, to run an Ethereum and a Bitcoin Core node. Here are the hardware recommendations for Blockchain Node Hosting VPS Tutorial:
For production RPC nodes, use a VPS with NVMe storage, fast SSDs, 8–16 CPU cores, and 32–64 GB of RAM.
For lighter or standard nodes, you can use 4 CPU cores, 16 GB of RAM, and 1–2 TB of NVMe storage.
Prepare the System for Blockchain Node Hosting VPS Tutorial
The first step is to prepare the OS, like installing essential tools, configuring firewall rules, and disk partitioning.
Run the system update and upgrade, then install the required tools and packages with the commands below:
Create a dedicated user for blockchain nodes with the command below:
Bash
sudoadduser--disabled-password--gecos""nodeuser
Optionally, if the user needs to run sudo commands, add the user to the sudo group:
Bash
sudousermod-aGsudonodeuser
Set the correct timezone on your system:
Bash
sudotimedatectlset-timezoneUTC
When you want to run a blockchain node, it generates a huge amount of data, which can quickly crash a system's main drive. Therefore, you must prepare a high-performance NVMe SSD, ensuring your node has the dedicated and fast storage it needs to operate reliably.
Create a single disk partition and then mount it to a directory, such as /var/lib/blockchain, using the commands below. We assume /dev/nvme1n1 is the data disk; please double-check the correct device name.
To run an Ethereum Node on a VPS, you can use two methods: Go Ethereum (Geth) and Erigon. Geth is best for a typical full node and moderate resource use, and for heavy-duty RPC providers and indexers, it is recommended to use Erigon.
Method 1. Install Geth Client for General-purpose
You can use the official Ethereum repository for a straightforward Geth client installation. Add the repository and install it with the following commands:
Note: If the PPA repository is not available on your system, download the binary from Go Ethereum and extract it.
Before running your node, you need to create a dedicated folder for the blockchain data. To do this, you can run the commands below:
Bash
sudo-unodeusermkdir-p/var/lib/blockchain/gethsudo-unodeusergeth--datadir/var/lib/blockchain/gethinit/usr/share/geth/genesis.json#only for private chain; skip for mainnet
Then, run the Geth client with HTTP RPC enabled for local-only for a secure and efficient mainnet sync:
To check Geth service logs, you can use the following command:
Bash
sudojournalctl-ugeth-f
Note: If you run a production RPC node, make sure it’s securely exposed to the internet. You can use a reverse proxy, enable TLS, and add authentication. The official Geth documentation explains how to set the right flags and how to connect a consensus client if you’re running a validator after the Ethereum Merge.
Method 2. Install Erigon Client for Heavy RPC and Indexing
For advanced indexing and performance, you can install Erigon by downloading the latest pre-compiled binary directly from the project's GitHub releases. To do this, you can run the following commands as your nodeuser:
Create a systemd service similar to the one used for Geth, but change the command to start Erigon instead:
Bash
ExecStart=/usr/local/bin/erigon...
Note: Erigon supports features like snapshots and pruning, and it usually runs with a larger cache and more threads for better performance. Check the Erigon documentation to see the recommended resource settings for your system.
Run a Bitcoin Full Node on a VPS
Bitcoin Core fully checks all transactions and connects to other nodes in the Bitcoin network. According to the official guidance, you will need:
At least 500 GB of disk space (the blockchain is now over 500 GB).
A fast internet connection.
At least 2 GB of RAM.
Use the official Bitcoin repository to install the Bitcoin Core client:
Verify the Bitcoin Core installation by checking its version:
Bash
bitcoind--version
Then, create a configuration file to define how your node operates, including controlling essential settings like data location, RPC authentication, and whether to index all transactions:
Bash
sudonano~/.bitcoin/bitcoin.conf
Add the following configuration to the file:
Bash
# Example bitcoin.confserver=1daemon=1txindex=1# enable if you need transaction index/RPC queriesrpcuser=bitcoinrpcrpcpassword=$(xxd-l16-p/dev/urandom)rpcallowip=127.0.0.1rpcport=8332listen=1maxconnections=40datadir=/var/lib/blockchain/bitcoin
Enable the bitcoind system service and check the logs with the commands below:
Note: If you are limited on disk space, you can configure your node in bitcoin.conf file to prune old blockchain data:
Bash
prune=550# keep ~550MB? (number is MB of block files) — choose carefully
Remember that pruning disables txindex and some RPC features; choose based on your use case.
Secure RPC Endpoints via Nginx Reverse Proxy
RPC Endpoints allow applications to send commands and request data from the node, such as checking a balance or broadcasting a transaction, so it becomes a primary attack vector. Never expose it directly to the internet and always bind it to localhost and use a secure reverse proxy if external access is required.
Also, allow the necessary ports through your firewall and keep all other ports locked down by default:
For safe remote access to the RPC API, you can use Nginx reverse proxy, which allows you to add essential layers of security like TLS encryption, password authentication, and rate limiting. For example:
To keep your blockchain node healthy, you can install a system monitoring tool that tracks server resources like CPU, memory, and disk usage.
Install Prometheus node_exporter on your VPS to collect system metrics and set up Prometheus to collect these metrics. If you want detailed blockchain data, you can use Geth with the --metrics option, or Erigon’s metrics endpoint.
For example, set up node_exporter with the commands below:
For comprehensive monitoring, you can collect and analyze your node's logs by setting up centralized logging, which helps you quickly diagnose issues like disk errors or synchronization problems.
Also, you must regularly check your disk space to avoid running out of storage:
Bash
df-h/var/lib/blockchaindu-sh/var/lib/blockchain/*
Note: Blockchain nodes often need to maintain many network connections simultaneously. If you see errors about "too many open files," increase your system's file handle limit in systemd or /etc/security/limits.conf.
Conclusion
By following the Blockchain Node Hosting VPS Tutorial, you have learned to install, configure, secure, and monitor your blockchain node on a VPS environment. For the best performance and reliability, you can host your blockchain infrastructure on PerLod VPS Hosting Solutions.
We hope you enjoy this guide. Subscribe to our X and Facebook channels to get the latest updates and articles on Blockchain tutorials.
A blockchain node is a computer that connects to a blockchain network to store, validate, and broadcast transaction data, which ensures the network remains decentralized and secure.
For most full nodes, you will need at least 4 CPU cores, 16 GB RAM, and 1–2 TB of fast NVMe storage.
Yes, but only if your server has sufficient CPU, memory, and disk space. Isolate each node’s data directory and port to prevent conflicts.
We use cookies to run PerLod and to understand how the site is used. You can accept everything, or open Manage to turn individual categories off. Cookie policy.