HYDRA Documentation
  • Introduction to Hydra Chain
  • HydraGon
    • Migrate to HydraGon
    • Staking Calculator
  • Legacy Hydra
  • FAQ
  • Hydra web wallet
    • Create New Wallet
      • Key File Option
      • Mnemonic Words Option
    • Access Your Wallet
      • From Mnemonic Words
      • From Private Key
      • From Key File
    • Send and Receive Assets
      • Receive Assets
      • Send Assets
    • Add HRC20 Token
    • Setup Offline Wallet
  • Hydra web browser extension
    • How to integrate with dApps
  • Hydra for Beginners
  • Ledger Nano Guide
  • Hydra Bridge
  • HydraDEX
    • Adding and Removing Liquidity
    • Liquidity Mining on HydraDEX
  • Useful Links (Legacy)
  • Essentials
    • UTXOs Accounting
    • Test & Main Networks
    • Desktop wallet basic usage
    • Wallet Encrypt, Backup and Restore
    • Hydra Core Wallet Commands
    • Adding Nodes
    • Encrypt and Unlock Hydra Wallet
    • Wallet Recovery With Salvagewallet
    • bech32 support
    • Repositories
    • Hydra Exchange Usage Guide
    • How to Add Options
    • How to Use bootstrap.dat
    • Command Lines (RPC API)
    • Guidance of Hydra Deployment and RPC Settings
    • How to Build Hydra on Raspbian
  • HRC20 Tokens
    • HRC20 Token
    • HRC20 Raw Transactions
    • HRC20 With Hydrachainjs
    • HRC20 DApp
  • HRC721 Tokens
    • HRC721 Token - How to deploy
  • How Transactions Work
  • Hydra Economy (Legacy)
    • The Flexible Supply Mechanism
    • Legacy Staking Calculator
  • Installation Guides
  • Guide for Linux
  • Guide for Raspberry Pi
  • Guide for MacOS
  • Staking HYDRA Coins
    • Setting up Staking
    • Staking with Windows VPS on AWS
    • Staking with Linux on DigitalOcean VPS
    • How to Stake Hydra on Linux
    • Stake With Linux VPS
    • How to Stake on FreeBSD
    • Hydra node health check
    • Superstaking
    • Delegating to Superstaker
    • Delegating via Mobile App or Web Browser
    • Lydra Basics
    • Understanding LYDRA — Key Concepts and Dynamics
  • Hydra Chain Core Team
  • KYC/AML Policy
  • Privacy Policy
  • API Documentation
    • Explorer API (in work)
      • General Blockchain Info
      • Fetching Transaction History for HYDRA and HRC20 tokens
      • Block Info
      • Transaction Info
    • Hydra DEX API
  • Community Tools
    • Github repository
    • Docker image for Hydra Node
    • Hydradex.org Custom Lists
  • Security Audits Hydra Bridge
Powered by GitBook
On this page
  • System Requirements
  • Memory Requirements
  • Build Process
  • Install Dependencies
  • Prepare Building Folder
  • Build Berkeley DB Dependency
  • Build Hydra

Was this helpful?

  1. Essentials

How to Build Hydra on Raspbian

Hydra is capable to run on small devices, it requires quite little CPU power, memory and storage to mine coins. But the binaries released by Hydra official are not suitable for Raspberry Pi Zero or First Generations. Here is a tutorial on how to build Hydra on a raspi. In this tutorial, we assume that you are using a raspbian system.

System Requirements

Generally, a raspi is capable to build Hydra, but we need:

  • an SD card with at least 8G space and at least 6G available;

  • Internet connection is also required.

Memory Requirements

Hydra requires quite few memory to run. However it is not true for building Hydra. It requires over 1.5G memory to build, which is much more than a raspi has. So we have to set the swap space to 2G:


sudo sed -ri 's/CONF_SWAPSIZE=[0-9]+/CONF_SWAPSIZE=2048/' /etc/dphys-swapfile
sudo systemctl restart dphys-swapfile

Build Process

Install Dependencies

We cat install building tools and most dependencies with apt:

# install dependencies
sudo apt-get install git autoconf libtool libboost-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-random-dev libssl-dev libevent-dev libboost-test-dev

If you need the Qt GUI, additionally run:

sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler qrencode

Prepare Building Folder

mkdir build_Hydra
cd build_Hydra

Build Berkeley DB Dependency

Unfortunately we can't install Berkeley DB 4.8 dependency on a raspbian via apt, so we need to build it ourselves:

# to build berkeley db 4.8
wget http://download.oracle.com/berkeley-db/db-4.8.30.tar.gz
tar -xzf db-4.8.30.tar.gz
pushd db-4.8.30/build_unix
../dist/configure --prefix=/usr/local --enable-cxx
make # this would take around 50 minutes on a raspi 0 W
sudo make install
popd

Build Hydra

First we have to get the source:

 git clone https://github.com/Hydra-Chain/node.git --recursive HYDRA
 cd node

Then we should switch to the download directory:

cd node

Finally the most common way to build and install a software:

./autogen.sh
./configure
make
sudo make install

It is highly recommended that you run the make step inside a virtual console like screen or tmux because the step takes more than 20 HOURS. By using a virtual console, you don't need to keep the ssh session during its building. To do this, run these commands before make:

sudo apt install screen
screen -S build

And when you started making, you may leave the screen by pressing Ctrl + A then D, and you may go back to it with this command:

screen -R

Boom! Now you have Hydra installed on your raspi!

PreviousGuidance of Hydra Deployment and RPC SettingsNextHRC20 Tokens

Last updated 1 year ago

Was this helpful?