Running your own Bitcoin node gives you complete control over your transactions. You validate every block yourself without relying on anyone else. This guide walks you through setting up a full Bitcoin node on a virtual private server. We'll cover everything from choosing the right specifications to getting your node up and running.
Before you begin
Let's make sure you have everything ready before starting. You'll need basic command-line experience to follow along comfortably. Grab an SSH client for connecting to your server. Mac and Linux users have Terminal built in. Windows users can use PuTTY or the Windows Subsystem for Linux. Budget it around $20 to $35 per month for a quality server. The exact cost depends on your provider and configuration. The setup itself takes about 30 to 60 minutes. The initial blockchain sync takes much longer, anywhere from 12 to 48 hours, depending on your internet speed and server performance.
Bitcoin node fundamentals
A Bitcoin node is a computer that runs the Bitcoin software. It validates transactions and blocks according to the network's consensus rules. Full nodes download the entire blockchain and verify every transaction that has ever occurred. They don't trust other nodes to do this work. When you run a full node, you're strengthening the Bitcoin network. You help new nodes sync and relay valid transactions to other peers.
Why use a VPS for your node
A VPS gives you dedicated resources that stay online constantly. Unlike running a node on your home computer, you get consistent uptime without worrying about power cuts or internet outages. Modern providers offer reliable infrastructure with clear availability target. Your node stays connected to the network even when your personal devices are offline.
The blockchain requires substantial storage space. The full blockchain is approximately 707 GB now and grows by about 80 to 100 GB annually. Using NVMe SSD storage dramatically improves sync times and overall performance. The fast read and write speeds make a noticeable difference when validating blocks.
Recommended VPS specifications
Choosing the right server specifications ensures smooth operation. Here's a quick reference for minimum and recommended specifications:
| Component | Minimum | Recommended |
|---|---|---|
| CPU cores | 4 cores | 6–8 cores |
| RAM | 8 GB | 16 GB |
| Storage | 1 TB SSD | 2 TB NVMe SSD |
| Bandwidth | 500 Mbps | 1 Gbps unmetered |
| OS | Ubuntu 22.04 LTS | Ubuntu 24.04 LTS |
You need at least 4 virtual CPU cores since Bitcoin Core uses multiple threads for validation and networking tasks. 8 GB of RAM handles the memory requirements comfortably, though 16 GB is recommended if you plan to run additional services like Lightning Network. Storage is critical because you're downloading the entire blockchain. Get a server with at least 1.5 to 2 TB of NVMe SSD storage to accommodate the current blockchain size and several years of future growth.
For the operating system, Ubuntu 24.04 LTS provides a stable base with long-term security maintenance. Before installing, check the official Bitcoin Core releases and select a supported release rather than relying on a version number copied from an older guide. Size storage and bandwidth from the blockchain requirements and your provider’s current plan details.
Bitcoin node setup on Ubuntu VPS
Once you have your Linux server ready, you can start the installation process. These steps assume you're logged into your Ubuntu server via SSH with root access.
Update your system
Update your system packages to ensure you have the latest security patches:
“`bash title="Update all Ubuntu packages" apt update && apt upgrade -y
This refreshes your package list and upgrades all installed software. The process takes a few minutes, depending on available updates.
### Install Bitcoin Core
Download the software directly from the [official website](https://bitcoincore.org/en/download/) for maximum security. This method is more reliable than using third-party repositories.
Navigate to the temporary directory:
```bash title="Enter the temporary directory"
cd /tmp
Download the Bitcoin Core binary:
“`bash title="Download Bitcoin Core 30.0 for x86-64 Linux" wget https://bitcoincore.org/bin/bitcoin-core-30.0/bitcoin-30.0-x86_64-linux-gnu.tar.gz
Download the verification files:
```bash title="Download Bitcoin Core checksums and signature"
wget https://bitcoincore.org/bin/bitcoin-core-30.0/SHA256SUMS
wget https://bitcoincore.org/bin/bitcoin-core-30.0/SHA256SUMS.asc
Verify the download integrity:
“`bash title="Verify the Bitcoin Core archive checksum" sha256sum –ignore-missing –check SHA256SUMS
You should see this output:
```text title="Review a successful Bitcoin Core checksum result"
bitcoin-30.0-x86_64-linux-gnu.tar.gz: OK
This confirms the software hasn't been tampered with. If you see FAILED or don't see OK, download the files again before continuing.
Extract the downloaded files:
“`bash title="Extract the Bitcoin Core archive" tar -xzf bitcoin-30.0-x86_64-linux-gnu.tar.gz
Install the binaries on your system:
```bash title="Install Bitcoin Core binaries into /usr/local/bin"
sudo install -m 0755 -o root -g root -t /usr/local/bin bitcoin-30.0/bin/*
Verify the installation:
“`bash title="Show the installed Bitcoin Core version" bitcoind –version
You should see version information displayed, confirming the software is installed correctly.
### Create a dedicated user
Running Bitcoin Core as root creates serious security risks. Create a dedicated user and group for running the node.
First, create the bitcoin group:
```bash title="Create the bitcoin system group"
groupadd -r bitcoin
Create the bitcoin user and add it to the bitcoin group:
“`bash title="Create the dedicated bitcoin user" adduser –disabled-password –gecos "" –ingroup bitcoin bitcoin
This user account isolates Bitcoin Core from other system processes and limits potential damage if something goes wrong. Notice we don't add this user to the sudo group because it doesn't need administrative privileges.
### Configure your node
Switch to the bitcoin user to set up the configuration. You have two main options, depending on whether you want a full node or a pruned node.
Switch to the bitcoin user:
```bash title="Open a login shell as the bitcoin user"
sudo -u bitcoin -i
Create the Bitcoin data directory:
“`bash title="Create the Bitcoin Core data directory" mkdir -p ~/.bitcoin
Open the configuration file in the nano editor:
```bash title="Edit the Bitcoin Core configuration"
nano ~/.bitcoin/bitcoin.conf
For a full node
Use this configuration if you have 1TB or more of storage and want to store the complete blockchain.
Here's what these settings do. The daemon setting runs Bitcoin Core in the background. Setting prune to 0 stores the complete blockchain with no pruning. The txindex option enables transaction indexing so you can query any transaction by ID. The RPC settings allow you to control your node via the command line. The network settings allow other nodes to connect to yours.
Add these settings to your bitcoin.conf file:
“`ini title="Configure a full Bitcoin node with local RPC" daemon=1 prune=0 txindex=1 rpcuser=bitcoinrpc rpcpassword=CHANGETHISTOSTRONGPASSWORD rpcallowip=127.0.0.1 rpcport=8332 listen=1 server=1 maxconnections=125
Replace `CHANGE_THIS_TO_STRONG_PASSWORD` with a strong, unique password that combines letters, numbers, and special characters.
Save the file by pressing `Ctrl+X`, then `Y`, then `Enter`.
#### For a pruned node
Use this configuration if you want to save disk space. Pruning keeps only recent blocks while still validating everything.
Here's what these settings do. The `daemon` setting runs Bitcoin Core in the background. The `prune` value of `5500` keeps approximately 5 to 10 GB of recent block data, depending on which blocks are retained. This provides better support to the network than the minimum 550 MB while still saving significant disk space. You cannot use `txindex` with pruning enabled, so choose one approach or the other.
Add these settings to your `bitcoin.conf` file:
```ini title="Configure a pruned Bitcoin node with local RPC"
daemon=1
prune=5500
rpcuser=bitcoinrpc
rpcpassword=CHANGE_THIS_TO_STRONG_PASSWORD
rpcallowip=127.0.0.1
rpcport=8332
listen=1
server=1
Save the file by pressing Ctrl+X, then Y, then Enter.
Create system service
Exit back to your admin user:
“`bash title="Exit the bitcoin user's shell" exit
Create a systemd service file so Bitcoin Core starts automatically on boot. Open the service file:
```bash title="Create the bitcoind systemd unit file"
sudo nano /etc/systemd/system/bitcoind.service
Copy and paste these contents into the file:
“`ini title="Define the bitcoind systemd service" [Unit] Description=Bitcoin daemon After=network.target [Service] User=bitcoin Group=bitcoin Type=forking ExecStart=/usr/local/bin/bitcoind -daemon -conf=/home/bitcoin/.bitcoin/bitcoin.conf -pid=/home/bitcoin/.bitcoin/bitcoind.pid ExecStop=/usr/local/bin/bitcoin-cli -conf=/home/bitcoin/.bitcoin/bitcoin.conf stop Restart=on-failure [Install] WantedBy=multi-user.target
Save the file and exit the editor. Reload systemd to recognize the new service:
```bash title="Reload systemd unit definitions"
sudo systemctl daemon-reload
Enable the service to start automatically on boot:
“`bash title="Enable bitcoind at boot" sudo systemctl enable bitcoind
Start the service immediately:
```bash title="Start the bitcoind service"
sudo systemctl start bitcoind
Your node is now running and will automatically restart if it crashes or when your server reboots.
Checking node health
Your node needs time to download and verify the blockchain. This initial block download takes anywhere from several hours to a few days, depending on your connection speed.
Switch back to the bitcoin user to check your progress:
“`bash title="Return to a bitcoin user login shell" sudo -u bitcoin -i
#### Check network connectivity
Verify your node is connecting to other peers on the network:
```bash title="Show Bitcoin Core network information"
bitcoin-cli getnetworkinfo
Look for the connections field, which shows how many peers you're connected to. Your node automatically maintains 8 to 10 outbound connections. Once you open port 8333 in the next section, you can accept up to 125 inbound connections from other nodes. A healthy, fully connected node typically shows 30 to 125 total connections.
The networkactive field should show true, indicating your node is actively participating in the network.
Monitor blockchain sync
Check how much of the blockchain you've downloaded and verified:
“`bash title="Show Bitcoin blockchain sync information" bitcoin-cli getblockchaininfo
The verification progress field shows sync progress as a decimal from 0.0 to 1.0, where 0.75 equals 75% complete, and 1.0 equals fully synced.
When this number reaches 1.0, your node is fully synced. The initial block download field shows true during the sync and switches to false when complete.
You can run this command periodically to track your progress during the initial download.
#### View node status
Check if Bitcoin Core is running properly:
```bash title="Show the bitcoind service status"
systemctl status bitcoind
Look for active and running in the output. You can also check the debug log for detailed information:
“`bash title="Show the last 100 Bitcoin Core log lines" tail -n 100 ~/.bitcoin/debug.log
This shows the last 100 lines, including connection attempts and blocked downloads.
### Opening required ports
Bitcoin Core uses port `8333` for peer-to-peer connections. Other nodes connect to yours through this port.
Configure your firewall to allow incoming connections on this port:
```bash title="Allow Bitcoin peer traffic through UFW"
ufw allow 8333/tcp
Enable the firewall:
“`bash title="Enable UFW" ufw enable
Without this step, your node can only make outbound connections. Allowing incoming connections helps the network by letting new nodes sync from yours.
### Basic security hardening
Your node is now running, but consider these additional security measures to protect your server. For a comprehensive guide to server security, check out our [VPS security checklist](/blog/technical-guides/vps-security-checklist/).
#### SSH security
Change your SSH port from the default `22` and disable direct root login.
First, open the new port in your firewall to avoid getting locked out:
```bash title="Allow future SSH port 2222 through UFW"
ufw allow 2222/tcp
Now open the SSH configuration file:
“`bash title="Edit the OpenSSH server configuration" sudo nano /etc/ssh/sshd_config
Look for these two lines in the file. You can search using `Ctrl+W` in nano.
First, find the `Port` line. Look for `Port 22` or `#Port 22` and change it to `Port 2222`. You can choose any number between 1024 and 65535.
Second, find the `PermitRootLogin` line. Look for `PermitRootLogin yes` or `#PermitRootLogin yes` and change it to `PermitRootLogin no`.
Save the file by pressing `Ctrl+X`, then `Y`, then `Enter`.
Restart SSH to apply the changes:
```bash title="Restart the OpenSSH daemon"
sudo systemctl restart sshd
Before disconnecting, open a new terminal window and test the new SSH port to ensure you can still connect. Connect using ssh -p 2222 username@your-server-ip.
Keep software updated
Check for Bitcoin Core updates every few months by visiting the releases page for the latest versions.
Install security updates regularly on your system:
“`bash title="Install available Ubuntu security updates" sudo apt update && sudo apt upgrade -y
Regular updates protect against known vulnerabilities and keep your node secure.
## Commonly used extensions
Once your node is running, you can extend its functionality with additional software. These tools build on top of Bitcoin Core to add new capabilities.
### BTCPay Server
[BTCPay Server](https://btcpayserver.org/) is a self-hosted payment processor that merchants use to accept Bitcoin payments directly. It connects to your Bitcoin node and monitors the blockchain for incoming payments without any intermediaries. The software eliminates payment processing fees. You receive Bitcoin directly to your wallet with no third party involved.
Setting up BTCPay Server requires your node to have txindex enabled. It provides a web interface where you can create invoices, track payments, and manage your Bitcoin commerce operations.
### Lightning Network
The [Lightning Network](https://lightning.network/) is a layer two solution that enables fast micropayments with minimal fees. It opens payment channels between users where transactions can occur off-chain. Running a Lightning node requires Bitcoin Core as its backend. [LND publishes supported versions on its official releases page](https://github.com/lightningnetwork/lnd/releases); check that page and the compatibility notes before installing.
Lightning dramatically increases Bitcoin's transaction capacity. Payments settle instantly and cost fractions of a cent. Your node can route payments for others and earn small routing fees in the process. Setting up Lightning involves opening channels with other nodes by locking Bitcoin in multisig addresses. These channels allow instant payments without broadcasting every transaction to the blockchain.
### Lightning Terminal
[Lightning Terminal](https://github.com/lightninglabs/lightning-terminal) provides a web-based interface for managing your Lightning node. Instead of using command-line tools, you get a visual dashboard for all operations.
You can view your channels, monitor liquidity across different paths, and manage your node's settings through your browser. The interface shows channel balances, pending payments, and routing statistics in real time.
### Ordinals and inscriptions
The [Ordinals protocol](https://github.com/ordinals/ord/) lets you inscribe data onto individual satoshis. Each satoshi becomes uniquely identifiable and can carry content like images, text, or other data. Running an Ordinals-aware node requires txindex to be enabled in your configuration. This allows you to track specific satoshis and their inscriptions across transactions.
## Common issues and solutions
Here are solutions to problems you might encounter during setup or operation. For more detailed troubleshooting, see our guide on [common server issues](/blog/technical-guides/five-common-vps-hosting-issues-and-fixes/).
### Initial sync is very slow
Your node downloads 707+ GB of data. On a slower connection, this can take several days. This is normal.
Check your progress periodically:
```bash title="Review Bitcoin blockchain sync progress"
bitcoin-cli getblockchaininfo
Look at the verification progress field to see how far along you are. The sync will complete eventually, just be patient.
Cannot allocate memory error
Your server needs at least 8 GB of RAM. If you have less, you'll need to upgrade your VPS plan with more RAM. You can also try adding swap space, though this significantly slows performance.
Node not connecting to peers
Check your firewall settings:
“`bash title="Show UFW firewall status" sudo ufw status
Ensure you see 8333/tcp ALLOW Anywhere in the output. If not, repeat the firewall configuration steps from earlier.
### Disk space running out
The blockchain grows continuously. If nearing capacity, either upgrade your storage or switch to a pruned configuration. Remember that pruning disables transaction indexing.
## Final thoughts
Congratulations on setting up your Bitcoin node. You now have a fully operational system that validates transactions independently and contributes to the network's decentralization. Your node provides the foundation for exploring Lightning Network, BTCPay Server, and other Bitcoin applications as your journey continues.
Ready to run a Bitcoin node on Virtarix VPS?
Compare VPS sizes for node sync, storage growth, uptime, root access, NVMe storage, IPv4 + IPv6, snapshots, and backups.
Storage VPS S
For backups, media and small archives
- ✓ 2 CPU cores
- ✓ 4 GB RAM
- ✓ 200 GB NVMe
- ✓ Unlimited
Storage VPS M
For growing files and app storage
- ✓ 4 CPU cores
- ✓ 8 GB RAM
- ✓ 400 GB NVMe
- ✓ Unlimited