Research into running a hive node: part one

Words
999
Reading
5 min
5h
Listen to this post
~7 min

Introduction

The purpose of this article series is to gather together instructions in plain English, American English, to put together eventually as a prompt, to give to an AI Agent like Claude, Hermes or possibly Open Claw. Then launch them on a separate computer on an isolated network with the hardware and the software they need to construct and launch a Hive Node.

This is a work in progress, as I amass these instructions sets and ultimately hope to create the ultimate prompt.

First set of instructions:

.

From GEmini and me, a series of prompts, copy and pastes, additions, etc...

Here is the guide updated with plain-English translations for the technical jargon. Whenever a complex blockchain or server term appears, you'll see a simple "In Plain English" translation right beside or below it.


1. Hardware & System Requirements

Running a block-producing Hive witness node requires dependable, high-speed performance.

What is a Witness? (In Plain English): Think of a witness node as a specialized server that acts like an automated accountant. Witnesses collect incoming transactions, group them together, and publish them to the blockchain in secure batches called blocks.

Technical TermMinimumRecommendedIn Plain English
CPU4 Cores8+ CoresThe brain of the computer. Higher performance means faster block calculations.
RAM16 GB32 GBThe short-term memory. The node needs plenty of RAM to hold active blockchain data in memory.
Storage500 GB NVMe1 TB+ NVMeThe hard drive. Must be ultra-fast NVMe SSD technology (standard spinning disks or slow SSDs are too slow to keep up).
Bandwidth100 Mbps1 GbpsYour internet connection speed. High bandwidth ensures low latency (no delays communicating with other servers).
OSUbuntu 22.04 LTSUbuntu 22.04 / 24.04The Operating System (like Windows or Mac, but Linux-based and optimized for servers).

2. Server Setup & Hardening

What is Hardening? (In Plain English): Server hardening means locking all the virtual doors and windows on your computer so hackers cannot break in and hijack your witness.

Step 2.1: Create a Dedicated Service User

Avoid running software as the default root system administrative account (the master key account). Create a separate, standard user named hive:

sudo adduser hive
sudo usermod -aG sudo hive
su - hive

Step 2.2: Set Up SSH Key Authentication

SSH Key (In Plain English): Instead of logging into your remote server with a secret password (which can be guessed or hacked), you generate a pair of long digital cryptographic files (keys). Your computer holds the private key, and the server holds the public key. Login happens automatically without passwords.

# On your personal computer, copy your public key to your server:
ssh-copy-id hive@<YOUR_SERVER_IP>

# Open SSH configuration settings on the server:
sudo nano /etc/ssh/sshd_config

Update or set these directives in /etc/ssh/sshd_config to turn off password logins:

PasswordAuthentication no
PermitRootLogin no
PubkeyAuthentication yes

Restart the SSH service:

sudo systemctl restart ssh

Step 2.3: Firewall Configuration (UFW)

Firewall / Port (In Plain English): Think of ports as virtual doors on your server. A firewall closes all doors by default except the specific ones you choose to open:

  • Port 22 (SSH): The entrance door for you to control your server remotely.
  • Port 2001 (P2P Gossip): The entrance door for other computers on the Hive network to talk to your server and share block updates.
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow 22/tcp
sudo ufw allow 2001/tcp
sudo ufw enable


3. Installing & Running hived

What is hived? (In Plain English): hived (short for Hive Daemon) is the core background program that turns your server into an official Hive node. It listens for transactions and Syncs (downloads) the history of the blockchain.

Option A: Running via Docker (Recommended)

What is Docker? (In Plain English): Docker puts the entire hived program and all software tools it needs into a neat pre-packaged container box. You don't have to install complex dependencies manual—Docker runs the software cleanly inside this virtual box.

  1. Install Docker:
sudo apt-get update
sudo apt-get install -y docker.io docker-compose
sudo usermod -aG docker hive
newgrp docker

  1. Pull and Run the Hive Container:
mkdir -p ~/hive-data
docker run -d \
  --name hive-node \
  --net=host \
  -v ~/hive-data:/var/hive \
  hiveio/hive:latest \
  hived --data-dir=/var/hive


4. Registering & Configuring the Witness

Step 4.1: Key Terminology & Signing Keys

Private vs Public Keys (In Plain English):

  • Public Key (starts with STM...): Like your public mailing address or bank account number. Anyone can see it.
  • Private Key (starts with 5K...): Like your digital signature or PIN. It proves ownership.
  • Block Signing Key: A special private key created only for signing blocks. Do not use your Master or Owner key here. If your witness server ever gets hacked, a hacker would only steal your block signing key—not your actual wallet funds!

Step 4.2: Configure config.ini

config.ini (In Plain English): The main settings file where you tell hived your account name, your signing keys, and how to connect to other servers.

Edit the file:

nano ~/hive-data/config.ini

Set these configuration values:

# Enable witness features and network communication
plugin = witness p2p webserver

# Your official Hive account username
witness = "your-account-name"

# Your private block-signing key
private-key = 5K_YOUR_PRIVATE_SIGNING_KEY

# Open port for communicating with other nodes
p2p-endpoint = 0.0.0.0:2001

# Seed Nodes (In Plain English: Bootstrap servers your node connects to initially to find the network)
p2p-seed-node = seed.hiveblocks.com:2001
p2p-seed-node = anyx.io:2001

Step 4.3: Broadcast Witness Registration Transaction

Broadcast (In Plain English): Sending an official announcement to the Hive blockchain saying: "I am online, here is my server's public key, and I am ready to produce blocks if users vote for me!"

You can do this using cli_wallet (command-line wallet) or frontends like PeakD:

  • Account Creation Fee: 3.000 HIVE (The standard cost to register a new account on Hive).
  • Maximum Block Size: 65536 bytes (Standard block size limit).
  • HBD Interest Rate: 0 (Your vote on what interest rate Hive Dollars earn).

Using cli_wallet:

update_witness "your-account-name" "https://peakd.com/@your-account-name" "STM_YOUR_PUBLIC_KEY" {"account_creation_fee":"3.000 HIVE","maximum_block_size":65536,"hbd_interest_rate":0} true


5. Integrating "Hive Witness Essentials"

What is Hive Witness Essentials? (In Plain English): A helper toolkit written by community developer @therealwolf. It acts like an automated assistant that does two vital jobs:

  1. Price Feed: Regularly checks real-world market prices for Hive/HBD and reports them to the blockchain (required for all active witnesses).
  2. Watcher/Alerts: Text-messages you on Telegram if your server crashes or misses a block slot.

Step 5.1: Installation

  1. Install Node.js & Package Managers (programming environment tools to run JavaScript apps):
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo npm install -g pnpm pm2

  1. Clone the Tool & Set Configuration:
git clone https://github.com/therealwolf42/hive-witness-essentials.git
cd hive-witness-essentials
pnpm i
cp config.example.json config.json
nano config.json

  1. Fill Out Config Settings:
{
  "WITNESS": "your-account-name",
  "ACTIVE_KEY": "5K_YOUR_PRIVATE_ACTIVE_KEY",
  "TELEGRAM": {
    "ENABLED": true,
    "BOT_TOKEN": "YOUR_TELEGRAM_BOT_TOKEN",
    "CHAT_ID": "YOUR_TELEGRAM_CHAT_ID"
  },
  "PRICE_FEED": {
    "ENABLED": true,
    "INTERVAL": 60
  },
  "WATCHER": {
    "ENABLED": true,
    "MISSED_BLOCKS_THRESHOLD": 1
  }
}

Step 5.2: Launch with PM2

PM2 (In Plain English): A manager program that keeps your helper scripts running 24/7 in the background. If the helper script crashes, PM2 automatically restarts it immediately.

pm2 start index.js --name witness-essentials
pm2 save
pm2 startup


6. Maintenance & Key Concepts

TermIn Plain EnglishWhat You Need To Do
Missed BlocksWhen it was your node's turn to produce a block, but your server failed to respond in time (within a 3-second window).Keep an eye on Telegram alerts. Too many missed blocks drop your rank and lose voter confidence.
Failover NodeA backup server running in a completely separate location.If your main server goes offline, you quickly switch your witness signing key to point to your backup server so you don't miss blocks.
Hardfork (HF)A major protocol upgrade to the Hive blockchain software agreed upon by developers and top witnesses.Update your hived software binary whenever new network release updates are announced.

Research into running a hive node: part one | Ecency