Install onomyd
Last updated
Last updated
onomyd
is the command-line interface and daemon that connects to Onomy Protocol so that you can interact with the blockchain.
The easiest method to install onomyd is to compile the binary locally using a provided script from the Onomy GitHub.
Download the bin.sh script locally with wget
wget https://raw.githubusercontent.com/onomyprotocol/validator/main/mainnet/scripts/bin.sh
Add the executable permission using chmod +x bin.sh
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.
Verify onomyd
installation with onomyd version
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)
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
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
Setup environment variables, then ensure correct installation via go version
export PATH=$PATH:$HOME/go/bin
export GOPATH=$HOME/go
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
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
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
Make the binaries executable
chmod +x $ONOMY_HOME/bin/*
chmod +x $ONOMY_HOME/cosmovisor/genesis/bin/*
Add Onomy paths to PATH variable
export PATH=$PATH:$HOME/.onomy/bin
export PATH=$PATH:$HOME/.onomy/cosmovisor/genesis/bin
Add to bashrc to make changes persistent
echo "export GOPATH=$HOME/go" >> ~/.bashrc
echo "export PATH=$PATH" >> ~/.bashrc
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
Verify onomyd
installation with onomyd version