Reddcoin Install Guide Raspberrypi - reddcoin-project/reddcoin GitHub Wiki

ReddCoin v4.22.9 Installation Guide for Raspberry Pi 4 or Greater

This guide will walk you through the process of installing ReddCoin v4.22.9 specifically on a Raspberry Pi 4 or newer model. ReddCoin is a decentralized cryptocurrency focused on social tipping and microtransactions.

Prerequisites

  • Raspberry Pi 4 (2GB, 4GB, or 8GB RAM) or Raspberry Pi 5
  • Raspberry Pi OS 64-bit (Bullseye or newer recommended)
  • At least 32GB SD card (64GB or larger recommended)
  • USB 3.0 SSD or external hard drive (strongly recommended for blockchain storage)
  • Stable internet connection
  • Official Raspberry Pi power supply (3A minimum)
  • Basic knowledge of Linux commands

1. Initial Setup

Start by updating your Raspberry Pi's operating system:

sudo apt update
sudo apt upgrade -y

For optimal performance with ReddCoin on Pi 4/5, make sure you're using 64-bit Raspberry Pi OS:

# Check if running 64-bit OS
uname -m  # Should show "aarch64" for 64-bit

# If not running 64-bit, consider reinstalling with the 64-bit image
# from https://www.raspberrypi.com/software/operating-systems/

For better storage performance, make sure you're using high-quality storage:

  • Use Class A1 or A2 SD cards at minimum
  • For blockchain storage, use an SSD connected via USB 3.0 port (blue ports on Pi 4)

2. Install Dependencies

Install the necessary dependencies:

sudo apt update
sudo apt upgrade -y

If you plan to compile from source:

sudo apt install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils python3 libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev libdb-dev libdb++-dev -y

If you only plan to use pre-compiled binaries, you only need:

sudo apt install libssl-dev libevent-dev libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-thread-dev libdb-dev libdb++-dev -y

3. Install Additional Dependencies

If you plan to use the graphical interface (ReddCoin-Qt):

sudo apt install libzmq3-dev libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler libqrencode-dev -y

If you're only using the command-line interface (ReddCoin daemon):

sudo apt install libzmq3-dev -y

4. Create Swap File (Optional)

For Raspberry Pi 4 models with 2GB RAM, creating additional swap space is recommended. For 4GB or 8GB models, this step is typically not necessary but can still help during intensive compilation:

sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

Note: For Pi 4 8GB or Pi 5 models, you can skip this step.

5. Installation Options

You have two options for installing ReddCoin v4.22.9 on your Raspberry Pi 4/5:

Option A: Download Pre-compiled Binaries (Recommended)

This is the faster and easier method:

# Create directory for ReddCoin
mkdir -p ~/reddcoin

# Download the ARM64 binaries for Raspberry Pi 4/5
cd ~/reddcoin
wget https://download.reddcoin.com/bin/reddcoin-core-4.22.9/reddcoin-4.22.9-aarch64-linux-gnu.tar.gz

# Download the SHA256SUM
wget https://download.reddcoin.com/bin/reddcoin-core-4.22.9/SHA256SUMS

# Verify checksum (optional but recommended)
# Replace with the actual checksum provided on the official website
sha256sum --check SHA256SUMS 2>/dev/null | grep ': OK'

# Extract the archive
tar -xzvf reddcoin-4.22.9-aarch64-linux-gnu.tar.gz

# Install the binaries
cd reddcoin-4.22.9/bin
sudo install -m 0755 -o root -g root -t /usr/local/bin reddcoin-cli reddcoind reddcoin-qt reddcoin-tx

Option B: Compile from Source

If you prefer to compile from source, follow these steps:

# Download the source code
mkdir -p ~/reddcoin
cd ~/reddcoin
git clone https://github.com/reddcoin-project/reddcoin.git
cd reddcoin
git checkout v4.22.9

6. Compile ReddCoin (Source Installation Only)

If you chose Option B (compilation from source), continue with these steps. Compilation should be relatively fast on a Pi 4 or 5, especially with higher RAM models:

./autogen.sh
./configure --disable-tests
make -j$(nproc)

Notes:

  • The above configuration includes GUI support, which the Pi 4/5 can handle well
  • If you want a headless installation without GUI, add --without-gui to the configure command
  • For the 8GB Pi 4 or Pi 5, compilation should complete in approximately 45-60 minutes
  • For 2GB/4GB Pi 4 models, compilation may take 1.5-2.5 hours

7. Install ReddCoin (Source Installation Only)

If you compiled from source:

sudo make install

8. Set Up Data Directory

The Raspberry Pi 4/5's USB 3.0 ports allow for much faster external storage. Using an SSD connected via USB 3.0 is strongly recommended for blockchain storage:

8.1 Connect and Mount an SSD (Recommended)

# First, identify your SSD drive
lsblk

# Create a mount point (assuming the SSD is identified as sda1)
sudo mkdir -p /mnt/reddcoin-data

# Mount the drive (replace sda1 with your actual device)
sudo mount /dev/sda1 /mnt/reddcoin-data

# Add to fstab for automatic mounting at boot
echo '/dev/sda1 /mnt/reddcoin-data ext4 defaults,noatime 0 0' | sudo tee -a /etc/fstab

# Create directory for ReddCoin data
sudo mkdir -p /mnt/reddcoin-data/reddcoin
sudo chown -R pi:pi /mnt/reddcoin-data/reddcoin

# Create a symbolic link to the standard location
ln -s /mnt/reddcoin-data/reddcoin ~/.reddcoin

8.2 If using the SD card (not recommended due to blockchain size):

mkdir ~/.reddcoin

Note: The ReddCoin blockchain will grow over time and can eventually wear out your SD card. An external SSD is highly recommended.

9. Create Configuration File

Create a configuration file optimized for Raspberry Pi 4/5 hardware:

nano ~/.reddcoin/reddcoin.conf

Add the following content:

# Connection Settings
rpcuser=reddcoinuser
rpcpassword=YOUR_SECURE_PASSWORD
daemon=1
server=1
rpcallowip=127.0.0.1
listen=1

# Performance Optimizations for Pi 4/5
dbcache=256
maxorphantx=10
maxmempool=50
maxconnections=40
maxuploadtarget=5000

# Optional: Enable staking (for Proof of Stake)
staking=1

Notes:

  • Replace YOUR_SECURE_PASSWORD with a strong, unique password
  • For Pi 4 8GB or Pi 5 models, you can increase dbcache to 512 or even 1024
  • For Pi 4 2GB models, reduce dbcache to 128
  • The performance settings balance resource usage with node functionality

10. Start ReddCoin Daemon

Start the ReddCoin daemon:

reddcoind

11. Create Systemd Service (Optional)

For automatic startup, create a systemd service:

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

Add the following content:

[Unit]
Description=ReddCoin Daemon
After=network.target

[Service]
User=pi
Group=pi
Type=forking
ExecStart=/usr/local/bin/reddcoind
Restart=always
TimeoutStopSec=300

[Install]
WantedBy=multi-user.target

Enable and start the service:

sudo systemctl enable reddcoin
sudo systemctl start reddcoin

12. Monitor Blockchain Synchronization

Check the synchronization status:

reddcoin-cli getblockchaininfo

13. Secure Your Wallet

After installation, make sure to:

  1. Encrypt your wallet:

    reddcoin-cli encryptwallet "YOUR_STRONG_PASSPHRASE"
    
  2. Backup your wallet:

    reddcoin-cli backupwallet /path/to/backup/location/wallet.dat
    

Troubleshooting

Memory/Performance Issues

Raspberry Pi 4/5 specific recommendations:

  • For 2GB Pi 4 models, if you encounter memory issues:
    make -j2  # Limit compilation threads
    
  • For thermal throttling (if your Pi gets too hot):
    sudo apt install rpi-eeprom
    sudo nano /boot/config.txt
    
    Add these lines:
    # Better cooling settings
    over_voltage=0
    arm_freq=1800
    
  • Consider a cooling case or fan for your Pi during compilation and syncing

Permissions Issues

If you encounter permission issues:

sudo chown -R pi:pi ~/.reddcoin

Blockchain Sync Issues

If synchronization is slow:

  1. Download bootstrap files to speed up initial sync:
    cd ~/.reddcoin
    wget https://download.reddcoin.com/bin/bootstrap/v4/bootstrap_v4.tar.gz
    
  2. Optimize your configuration further:
    # Add these to reddcoin.conf for faster sync
    par=2
    checkblocks=24
    checklevel=0
    
  3. For Pi 4 with 4GB+ RAM, increase cache during initial sync:
    # Temporarily increase during initial sync, then reduce
    dbcache=512
    

Additional Pi 4/5 Optimization Tips

Using 64-bit Raspberry Pi OS

The 64-bit version of Raspberry Pi OS can provide performance benefits for ReddCoin:

# Check if you're running 64-bit
uname -m  # Should show "aarch64" for 64-bit

Enabling USB 3.0 Performance

For maximum SSD performance on Pi 4/5:

# Add to /boot/config.txt
dtoverlay=dwc2,dr_mode=host

Monitoring Performance

Install monitoring tools:

sudo apt install htop iotop

Resources


This guide is optimized for Raspberry Pi 4 and newer models. The Pi 4's increased RAM, CPU performance, and USB 3.0 capabilities make it an excellent platform for running a ReddCoin node. Remember to regularly update your system and ReddCoin software to ensure security and access to the latest features.