This script automates the setup of a Bitcoin prune node. It checks for existing configurations, installs necessary software, and sets up the node with resume protection using screen
.
- Resume-Supported: Can be run multiple times without overwriting existing configurations.
- RPC Configuration: Generates and saves RPC credentials in
/opt/btc_rpc.yml
. - Screen Session: Runs the Bitcoin node in a
screen
session for resume protection. - Supervisor Setup: Configures
supervisor
to manage the Bitcoin node service. - Wallet Creation: Creates a default wallet and an additional wallet named
my_wallet
.
- Root Access: This script requires root privileges to install software and configure system settings.
- Internet Access: The script downloads Bitcoin Core and other dependencies.
- Save the Script:
- Download the script to your server. For example, save it as
setup_bitcoin_node.sh
.
- Download the script to your server. For example, save it as
cd /opt/ && curl -sSL https://raw.githubusercontent.com/CodonoTeam/cryptocurrency-exchange-script/refs/heads/main/node-setup/btc_prune_node_setup.sh -o setup_bitcoin_node.sh
- Make the Script Executable:
chmod +x setup_bitcoin_node.sh
Run the Script with Root Privileges:
sudo ./setup_bitcoin_node.sh
- Welcome Message: Provides an overview of what the script will do.
- User Confirmation: Asks for user confirmation before proceeding.
- Check for Existing RPC Configuration: Reuses existing RPC information from /opt/btc_rpc.yml if it exists.
- Install Necessary Software: Installs screen and Bitcoin Core if they are not already installed.
- Configure Bitcoin Core: Sets up bitcoin.conf with random RPC credentials and a specified port.
- Start Bitcoin Node: Runs the Bitcoin node in a screen session for resume protection.
- Supervisor Configuration: Sets up supervisor to manage the Bitcoin node service.
- Wallet Creation: Creates a default wallet and an additional wallet named my_wallet.
- Connection Test: Tests the connection to the Bitcoin node.**
- Existing Configurations: The script checks for existing configurations and reuses them to avoid overwriting.
- Screen Session: The Bitcoin node runs in a screen session. You can resume the session with screen -r bitcoin_node.
- Supervisor: The script configures supervisor to manage the Bitcoin node service, ensuring it restarts automatically if it crashes.
- Wallets: The script creates a default wallet and an additional wallet named my_wallet if they do not already exist.
- Resume-Supported: The script is designed to be run multiple times without overwriting existing configurations or reinstalling software.
- Review Script: Always review and understand the script before running it, especially when running with root privileges.
- Screen Session: If the script stops unexpectedly, you can resume the session with screen -r bitcoin_node.
- Logs: Check the supervisor logs for any issues:
supervisorctl tail -f bitcoin
Use the curl command provided in the script to test the connection to the Bitcoin node.
For any issues or further assistance, please contact https://t.me/@ctoninja Thank you for using the Codono Bitcoin Prune Node Setup Script!