logo
X PrimeFlow

Manual node installation

Official operator documentationProject websiteSource repository

Network: Testnet

Chain ID: osmo-test-5

Recommended hardware: 4 Cores, 16GB RAM, 500GB NVMe

Go version: 1.22.11

Binary: osmosisd

Node home: ~/.osmosisd

1. Prepare the node host

sudo apt-get update
sudo apt-get install -y ca-certificates curl git jq make build-essential

# Install the exact Go version required by this network from https://go.dev/dl/,
# verify its published checksum, then confirm it before building.
go version  # required by project metadata: 1.22.11

2. Build the pinned node binary

cd $HOME
git clone https://github.com/osmosis-labs/osmosis
cd osmosis
git checkout v29.0.0
make install

# Verify which binary will be used before initialization.
command -v "osmosisd"
"osmosisd" version

3. Initialize a new node home

set -euo pipefail
BIN="osmosisd"
CHAIN_ID="osmo-test-5"
MONIKER='validator-name'
NODE_HOME="$HOME/.osmosisd"

command -v "$BIN"
test ! -e "$NODE_HOME" || { echo "Stop: $NODE_HOME already exists; back it up and review it first." >&2; exit 1; }
"$BIN" init "$MONIKER" --chain-id "$CHAIN_ID" --home "$NODE_HOME"
test -f "$NODE_HOME/config/genesis.json"

4. Install and validate genesis

set -euo pipefail
CHAIN_ID="osmo-test-5"
NODE_HOME="$HOME/.osmosisd"
GENESIS_URL='https://testnet-files.bonynode.online/osmosis/genesis.json'
GENESIS_DOWNLOAD="$NODE_HOME/config/genesis.json.download"

test -d "$NODE_HOME/config"
test ! -e "$GENESIS_DOWNLOAD" || { echo "Stop: review the existing $GENESIS_DOWNLOAD first." >&2; exit 1; }
curl --fail --show-error --location --proto "=https" --max-time 120   --output "$GENESIS_DOWNLOAD" "$GENESIS_URL"
jq -e --arg chain "$CHAIN_ID" '.chain_id == $chain' "$GENESIS_DOWNLOAD" >/dev/null
# No published checksum is recorded; the JSON and configured chain ID are validated before replacement.
cp --no-clobber "$NODE_HOME/config/genesis.json" "$NODE_HOME/config/genesis.json.init-backup" || true
install -m 0644 "$GENESIS_DOWNLOAD" "$NODE_HOME/config/genesis.json"
jq -r '.chain_id' "$NODE_HOME/config/genesis.json"

5. Configure minimum gas prices

set -euo pipefail
APP_TOML="$HOME/.osmosisd/config/app.toml"
test -f "$APP_TOML"
cp --no-clobber "$APP_TOML" "$APP_TOML.bonynode-backup" || true

if grep -q '^minimum-gas-prices' "$APP_TOML"; then
  sed -i 's|^minimum-gas-prices *=.*|minimum-gas-prices = "0.0025uosmo"|' "$APP_TOML"
else
  printf '
minimum-gas-prices = "0.0025uosmo"
' >> "$APP_TOML"
fi
grep '^minimum-gas-prices' "$APP_TOML"

Automatic installer

Create or restore wallet

set -euo pipefail
BIN="osmosisd"
WALLET="wallet"
[[ "$WALLET" =~ ^[a-zA-Z0-9_-]{1,64}$ ]] || { echo "Invalid wallet name" >&2; exit 1; }

# Create a new key. Store the mnemonic offline; it cannot be recovered by BonyNode.
"$BIN" keys add "$WALLET"

# To restore an existing key, run this separately:
# "$BIN" keys add "$WALLET" --recover

WALLET_ADDRESS=$("$BIN" keys show "$WALLET" -a)
"$BIN" query bank balances "$WALLET_ADDRESS"

Create validator

BIN="osmosisd"
CHAIN_ID="osmo-test-5"
WALLET="wallet"
MONIKER='validator-name'
IDENTITY=''
WEBSITE=''
DETAILS='Independent validator'
AMOUNT="1000000uosmo"
COMMISSION_RATE="0.10"
COMMISSION_MAX_RATE="0.20"
COMMISSION_MAX_CHANGE="0.01"

"$BIN" tx staking create-validator   --amount "$AMOUNT"   --from "$WALLET"   --commission-rate "$COMMISSION_RATE"   --commission-max-rate "$COMMISSION_MAX_RATE"   --commission-max-change-rate "$COMMISSION_MAX_CHANGE"   --min-self-delegation 1   --pubkey "$("$BIN" tendermint show-validator)"   --moniker "$MONIKER"   --identity "$IDENTITY"   --website "$WEBSITE"   --details "$DETAILS"   --chain-id "$CHAIN_ID"   --gas auto --gas-adjustment 1.5   -y

Basic host firewall

sudo ufw default allow outgoing
sudo ufw default deny incoming
sudo ufw allow ssh/tcp
# Review and open the configured P2P port only.
sudo ufw status verbose

Reversible decommission

This procedure stops and disables the service but retains the node home, binary and service file. Verify the backup before any later deletion.

set -euo pipefail

SERVICE="osmosisd"
NODE_HOME="$HOME/.osmosisd"
STAMP=$(date -u +%Y%m%dT%H%M%SZ)
RETIRED_HOME="$NODE_HOME.retired.$STAMP"
KEY_BACKUP="$HOME/osmosisd-validator-keys-$STAMP.tar.gz"
NODE_STOPPED=0

rollback() {
  trap - ERR INT TERM
  if [ "$NODE_STOPPED" -eq 1 ]; then sudo systemctl start "$SERVICE" || true; fi
  exit 1
}
trap rollback ERR INT TERM

test -d "$NODE_HOME"
test ! -e "$RETIRED_HOME"
test -s "$NODE_HOME/config/priv_validator_key.json"
test -s "$NODE_HOME/data/priv_validator_state.json"
sudo systemctl stop "$SERVICE"
NODE_STOPPED=1

# Back up validator identity/state before moving anything.
tar -czf "$KEY_BACKUP" -C "$NODE_HOME"   config/priv_validator_key.json config/node_key.json data/priv_validator_state.json
test -s "$KEY_BACKUP"
mv "$NODE_HOME" "$RETIRED_HOME"
sudo systemctl disable "$SERVICE"
NODE_STOPPED=0
trap - ERR INT TERM

echo "Node home was retained at: $RETIRED_HOME"
echo "Critical key backup: $KEY_BACKUP"
echo "No binary, service file or node data was deleted."