Skip to content

FrankMike/bitcoin-installer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Bitcoin Core Installer

This repository contains scripts to automate the installation, configuration, and monitoring of a Bitcoin Core full node on Linux, macOS, and Windows systems.

Repository Structure

The repository is organized into three main directories:

  • linux/ - Scripts for Linux systems
  • mac/ - Scripts for macOS systems
  • windows/ - Scripts for Windows systems

Each directory contains the installation and status monitoring scripts specific to that operating system.

Features

  • Automatically detects your operating system and distribution
  • Downloads and installs the latest version of Bitcoin Core
  • Verifies the download using cryptographic signatures
  • Sets up a proper configuration file
  • Creates a service for easy management (systemd on Linux, LaunchAgent on macOS, Windows Service on Windows)
  • Supports multiple architectures (x86_64, aarch64/arm64 on Linux and macOS; 32-bit and 64-bit on Windows)
  • Includes status monitoring scripts

Requirements

Linux

  • A Linux system (Ubuntu, Debian, Fedora, CentOS, Arch, etc.)
  • Root or sudo access
  • At least 500GB of free disk space (for a full node)
  • A reliable internet connection

macOS

  • macOS 10.15 (Catalina) or later
  • Administrator privileges
  • At least 500GB of free disk space (for a full node)
  • A reliable internet connection

Windows

  • Windows 7 or later (Windows 10/11 recommended)
  • Administrator privileges
  • At least 500GB of free disk space (for a full node)
  • A reliable internet connection
  • PowerShell 5.0 or later

Quick Start

The repository includes launcher scripts that detect your operating system and guide you through the installation process:

For Linux and macOS users:

# Clone the repository
git clone https://github.com/yourusername/bitcoin-installer.git
cd bitcoin-installer

# Make the launcher script executable
chmod +x install.sh

# Run the launcher script
./install.sh

For Windows users:

# Clone the repository
git clone https://github.com/yourusername/bitcoin-installer.git
cd bitcoin-installer

# Run the PowerShell launcher script (as Administrator)
.\install.ps1

Manual Installation

If you prefer to manually navigate to the appropriate directory for your operating system, follow these steps:

Linux Installation

  1. Navigate to the Linux directory and make the scripts executable:
cd linux
chmod +x install_bitcoin_core.sh check_node_status.sh
  1. Run the installation script with sudo:
sudo ./install_bitcoin_core.sh
  1. Follow the prompts during installation.

macOS Installation

  1. Navigate to the macOS directory and make the scripts executable:
cd mac
chmod +x install_bitcoin_core_mac.sh check_node_status_mac.sh
  1. Run the installation script with sudo:
sudo ./install_bitcoin_core_mac.sh
  1. Follow the prompts during installation.

Windows Installation

  1. Navigate to the Windows directory:
cd windows
  1. Open PowerShell as Administrator

  2. Enable script execution if not already enabled:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
  1. Run the installation script:
.\install_bitcoin_core.ps1
  1. Follow the prompts during installation.

Configuration

The scripts create a default configuration file with sensible defaults for running a full node.

Linux Configuration

Located at ~/.bitcoin/bitcoin.conf. You can modify this file:

nano ~/.bitcoin/bitcoin.conf

macOS Configuration

Located at ~/Library/Application Support/Bitcoin/bitcoin.conf. You can modify this file:

nano ~/Library/Application\ Support/Bitcoin/bitcoin.conf

Windows Configuration

Located at %APPDATA%\Bitcoin\bitcoin.conf. You can modify this file:

notepad $env:APPDATA\Bitcoin\bitcoin.conf

Some important configuration options:

  • txindex=1: Maintains a full transaction index (useful for blockchain explorers)
  • prune=550: Uncomment to enable pruning (reduces disk space requirements but limits functionality)
  • dbcache=450: Database cache size in megabytes (increase for faster initial sync if you have more RAM)
  • maxuploadtarget=5000: Limits the upload bandwidth (in MiB per day)

Managing Your Bitcoin Node

Linux Management

After installation, you can manage your Bitcoin node using systemd:

  • Start the node:

    sudo systemctl start bitcoind
  • Stop the node:

    sudo systemctl stop bitcoind
  • Check status:

    sudo systemctl status bitcoind
  • View logs:

    sudo journalctl -u bitcoind -f
  • Enable auto-start at boot:

    sudo systemctl enable bitcoind

macOS Management

After installation, you can manage your Bitcoin node using launchctl:

  • Start the node:

    launchctl start org.bitcoin.bitcoind
  • Stop the node:

    launchctl stop org.bitcoin.bitcoind
  • Check if running:

    launchctl list | grep bitcoin
  • View logs:

    tail -f ~/Library/Application\ Support/Bitcoin/debug.log
  • Enable auto-start at login:

    launchctl load ~/Library/LaunchAgents/org.bitcoin.bitcoind.plist

Windows Management

After installation, you can manage your Bitcoin node using Windows Services or PowerShell:

  • Start the node:

    Start-Service -Name BitcoinCore
  • Stop the node:

    Stop-Service -Name BitcoinCore
  • Check status:

    Get-Service -Name BitcoinCore
  • You can also manage the service through the Windows Services management console (services.msc)

Monitoring Your Node

The repository includes status monitoring scripts that provide detailed information about your Bitcoin node:

Linux Monitoring

cd linux
./check_node_status.sh

macOS Monitoring

cd mac
./check_node_status_mac.sh

Windows Monitoring

cd windows
.\check_node_status.ps1

These scripts display:

  • Service status
  • Blockchain information (current block, sync progress, size)
  • Network information (version, connections)
  • Memory pool information
  • Node uptime
  • System resource usage

Using Bitcoin Core

Once your node is running, you can interact with it using the bitcoin-cli command:

Linux and macOS

# Get blockchain information
bitcoin-cli getblockchaininfo

# Or with specific RPC credentials
bitcoin-cli -rpcuser=yourusername -rpcpassword=yourpassword getblockchaininfo

Windows

# Get blockchain information
& "C:\Program Files\Bitcoin\daemon\bitcoin-cli.exe" getblockchaininfo

# Or with specific RPC credentials
& "C:\Program Files\Bitcoin\daemon\bitcoin-cli.exe" -rpcuser=yourusername -rpcpassword=yourpassword getblockchaininfo

Initial Synchronization

The initial blockchain synchronization can take several days to complete depending on your hardware and internet connection. You can monitor the progress with the status scripts.

Security Considerations

  • The bitcoin.conf file has restricted permissions (600 on Linux and macOS)
  • The service includes basic hardening measures
  • Consider setting up a firewall to only allow connections on port 8333

Troubleshooting

If you encounter issues:

Linux Troubleshooting

  1. Check the logs:

    sudo journalctl -u bitcoind -f
  2. Verify your configuration:

    bitcoin-cli -conf=$HOME/.bitcoin/bitcoin.conf getnetworkinfo
  3. Ensure you have enough disk space:

    df -h
  4. Run the status check script for detailed information:

    cd linux
    ./check_node_status.sh

macOS Troubleshooting

  1. Check the logs:

    tail -f ~/Library/Application\ Support/Bitcoin/debug.log
  2. Verify your configuration:

    bitcoin-cli -conf="$HOME/Library/Application Support/Bitcoin/bitcoin.conf" getnetworkinfo
  3. Ensure you have enough disk space:

    df -h
  4. Run the status check script for detailed information:

    cd mac
    ./check_node_status_mac.sh

Windows Troubleshooting

  1. Check the logs:

    Get-Content "C:\Program Files\Bitcoin\daemon\bitcoin_error.log"
  2. Verify your configuration:

    & "C:\Program Files\Bitcoin\daemon\bitcoin-cli.exe" -conf="$env:APPDATA\Bitcoin\bitcoin.conf" getnetworkinfo
  3. Ensure you have enough disk space:

    Get-PSDrive C
  4. Run the status check script for detailed information:

    cd windows
    .\check_node_status.ps1

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Bitcoin Core developers for their incredible work
  • The Bitcoin community for their ongoing support and documentation

About

Bitcoin Full Node Installer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages