Install onomyd

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 full node instructions for a one-command onomyd installation, environment, and full node setup with seed nodes, snapshots, and more for Ubuntu machines.

Installation Method 1 - Automatic

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

  1. Download the script locally with wget

  1. Add the executable permission using chmod +x

  2. Run the script using bash

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

  |- .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 
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 
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 
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

Last updated