LogoLogo
  • Onomy Overview
    • Introduction & Resources
    • Onomy's Vision (IFS)
  • Core Concepts
    • Staking
      • How to Stake NOM?
    • Governance
      • Onomy Improvement Proposals (OIPs)
  • Nodes and Validators
    • Install onomyd
    • Full Node Instructions
    • Become a Validator
    • Consumer Chain Nodes
  • Chain Toolkit
    • Selected Core Modules
      • auth (gas & fees)
      • bank
      • distribution
      • gov
      • mint
      • staking
  • Consumer Apps
    • Onomy Reserve (FX dStables)
      • Auction Module
      • Parity Stability Module
      • Oracle Module
      • Vault Module
  • NOM (Native coin of Onomy)
    • The NOM Token
Powered by GitBook
On this page
  • Installation Method 1 - Automatic
  • Installation Method 2 - Manually From Source
  1. Nodes and Validators

Install onomyd

PreviousOnomy Improvement Proposals (OIPs)NextFull Node Instructions

Last updated 1 year ago

onomyd is the command-line interface and daemon that connects to Onomy Protocol so that you can interact with the blockchain.

NOTE: If your ultimate goal is to operate a full node or validator node, then skip directly to the for a one-command onomyd installation, environment, and full node setup with seed nodes, snapshots, and more for Ubuntu machines.

Installation Method 1 - Automatic

  1. Download the bin.sh script locally with wget

wget https://raw.githubusercontent.com/onomyprotocol/validator/main/mainnet/scripts/bin.sh
  1. Add the executable permission using chmod +x bin.sh

  2. Run the script using bash bin.sh

This script downloads and compiles onomyd. A new directory .onomy will be created in your home directory. All the source code will be downloaded in the .onomy/src directory. The compiled binary will be in .onomy/bin directory.

  1. Verify onomyd installation with onomyd version

Installation Method 2 - Manually From Source

  1. Create .onomy directory tree

$HOME
  |- .onomy (Default home location for onomy chain)
      |- bin (Default location for all the binaries)
      |- scripts (Default location of all the scripts)
      |- comsovisor (If utilizing cosmovisor to manage upgrades)
      |- src (Default location for source code, in case binaries are compiled locally)
  1. Install packages needed to build Onomy binary (Ubuntu example shown)

sudo apt-get update 
sudo apt-get upgrade -y 
sudo apt-get install curl nano ca-certificates tar git jq perl python3 moreutils wget nodejs make hostname crudini cmake -y
  1. Install GO (ensure latest stable release version)

curl -LO https://go.dev/dl/go1.20.1.linux-amd64.tar.gz 
tar -C $HOME -xzf go1.20.1.linux-amd64.tar.gz
  1. Setup environment variables, then ensure correct installation via go version

export PATH=$PATH:$HOME/go/bin
export GOPATH=$HOME/go
  1. Optionally install Cosmovisor

git clone -b cosmovisor-v1.0.1 https://github.com/onomyprotocol/onomy 
cd onomy 
make cosmovisor 
cp cosmovisor/cosmovisor $HOME/.onomy/bin/cosmovisor
  1. Compile Onomy by ensuring to use the most up to date release in place of vX.X.X

git clone -b vX.X.X https://github.com/onomyprotocol/onomy.git 
cd onomy 
make build 

Cosmovisor users: mv onomyd $HOME/.onomy/cosmovisor/genesis/bin

Otherwise: mv onomyd $HOME/.onomy/bin

  1. Verify $ONOMY_HOME Environment Variable

Ensure that the $ONOMY_HOME environment variable is correctly set to point to your ~/.onomy directory with echo $ONOMY_HOME. If the output is not your ~/.onomy path or is empty, you need to set it correctly. Add the following line to your ~/.bashrc or ~/.profile file to ensure it's set in every session: source ~/.bashrc or source ~/.profile

  1. Make the binaries executable

chmod +x $ONOMY_HOME/bin/* 
chmod +x $ONOMY_HOME/cosmovisor/genesis/bin/* 
  1. Add Onomy paths to PATH variable

export PATH=$PATH:$HOME/.onomy/bin 
export PATH=$PATH:$HOME/.onomy/cosmovisor/genesis/bin
  1. Add to bashrc to make changes persistent

echo "export GOPATH=$HOME/go" >> ~/.bashrc  
echo "export PATH=$PATH" >> ~/.bashrc
  1. These variables are needed only for Cosmovisor

echo "export DAEMON_HOME=$ONOMY_HOME/" >> ~/.bashrc 
echo "export DAEMON_NAME=onomyd" >> ~/.bashrc 
echo "export DAEMON_RESTART_AFTER_UPGRADE=true" >> ~/.bashrc 
  1. Verify onomyd installation with onomyd version

The easiest method to install onomyd is to compile the binary locally using a provided script from the .

Onomy GitHub
full node instructions