Networks
Build Linux binary from source and become a Sentry Node Operator
π§° Prerequisites
Before diving in, make sure your system meets the following requirements.
β
OS Compatibility
Ubuntu LTS versions only: 22.04
β Not supported: Ubuntu 16.04 or older
β
Go (Golang)
Required version: 1.22.6+
Follow the Go installation guide if not already installed.
Ensure
$GOPATH/binis included in your$PATH.
β
Essential Packages
Install these if not already available:
Copy
sudo apt update && sudo apt install make gcc -yποΈ Build oraid from Source
oraid from SourceLetβs compile the node binary from scratch.
1. Set your ORAI working directory
Copy
export ORAI_HOME="/root"π If you're not using
/root, replace all occurrences of$ORAI_HOMEwith your desired path.
2. Clone and build
Copy
cd $ORAI_HOME
git clone https://github.com/oraichain/wasmd
cd wasmd
git checkout v0.50.9 # or latest tag
make buildβ οΈ Confirm the binary version:
Copy
oraid versionExpected output: v0.50.9
βοΈ Initialize Your Node
Copy
oraid init NODE_NAME --home $ORAI_HOME/.oraid --chain-id ORCHAINAI(replace the NODE_NAME with a name of your choosing)
Download the latest genesis file:
Copy
wget -O $ORAI_HOME/.oraid/config/genesis.json https://raw.githubusercontent.com/wget -O $ORAI_HOME/.oraid/config/genesis.json https://raw.githubusercontent.com/wget -O $ORAI_HOME/.oraid/config/genesis.json https://raw.githubusercontent.com/oraichain/oraichain-static-files/master/genesis.json/wget -O $ORAI_HOME/.oraid/config/genesis.json https://raw.githubusercontent.com/oraichain/oraichain-static-files/master/genesis.json-static-files/master/genesis.json/wget -O $ORAI_HOME/.oraid/config/genesis.json https://raw.githubusercontent.com/oraichain/oraichain-static-files/master/genesis.json-static-files/master/genesis.jsonβ Resulting directory structure:
Copy
$ORAI_HOME/.oraid/
βββ config
β βββ app.toml
β βββ client.toml
β βββ config.toml
β βββ genesis.json
β βββ node_key.json
β βββ priv_validator_key.json
βββ data
βββ priv_validator_state.jsonπ§ Setup Cosmovisor (Optional but Recommended)
Cosmovisor makes future upgrades smooth and stress-free.
1. Install Cosmovisor
Copy
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest2. Set up folders
Copy
mkdir -p $ORAI_HOME/.oraid/cosmovisor/genesis/bin
mkdir -p $ORAI_HOME/.oraid/cosmovisor/upgrades
cp $GOPATH/bin/oraid $ORAI_HOME/.oraid/cosmovisor/genesis/bin3. Add environment variables
Copy
echo "# Cosmovisor Setup" >> ~/.profile
echo "export ORAI_HOME=/root" >> ~/.profile
echo "export DAEMON_NAME=oraid" >> ~/.profile
echo "export DAEMON_HOME=$ORAI_HOME/.oraid" >> ~/.profile
echo "export DAEMON_ALLOW_DOWNLOAD_BINARIES=false" >> ~/.profile
echo "export DAEMON_LOG_BUFFER_SIZE=512" >> ~/.profile
echo "export DAEMON_RESTART_AFTER_UPGRADE=true" >> ~/.profile
echo "export UNSAFE_SKIP_BACKUP=true" >> ~/.profile
source ~/.profileCheck installation:
Copy
cosmovisor version
oraid versionβοΈ Sync Chain Data
Download and extract the latest snapshot:
Copy
sudo apt install wget liblz4-tool aria2 -y
cd $ORAI_HOME/.oraid
wget -O wget -O $ORAI_HOME/.oraid/config/genesis.json https://raw.githubusercontent.com/oraichain/oraichain-static-files/master/genesis.json.tar.lz4 [SNAPSHOT_URL]
lz4 -c -d oraichain_latest.tar.lz4 | tar -x -C $ORAI_HOME/.oraidWe provide a snapshot file every hour, available at https://snapshot.orai.io/. Please change [SNAPSHOT_URL] to the provided link.
π οΈ Update Node Config
Edit config:
Copy
vim $ORAI_HOME/.oraid/config/config.tomlUpdate seeds:
Copy
seeds = "[email protected]:26656,[email protected]:26656"You may also add more from this list:
Copy
[email protected]:42656
[email protected]:26656
fe0a0d46eb5436905bf8465f83d2da5a503bf4eb@mainnet-seed.konsortech.xyz:33165
[email protected]:23356
[email protected]:11210
49165f4ef94395897d435f144964bdd14413ea28@seed.orai.synergynodes.com:26656
...π§ Run as a Systemd Service
Create a service file:
Copy
cat > /tmp/orai.service <<EOF
[Unit]
Description=wget -O $ORAI_HOME/.oraid/config/genesis.json https://raw.githubusercontent.com/oraichain/oraichain-static-files/master/genesis.json Cosmovisor Node
After=network-online.target
[Service]
User=$USER
Environment="ORAI_HOME=/root"
Environment="DAEMON_NAME=oraid"
Environment="DAEMON_HOME=${ORAI_HOME}/.oraid"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"
Environment="DAEMON_LOG_BUFFER_SIZE=512"
Environment="UNSAFE_SKIP_BACKUP=true"
ExecStart=$GOPATH/bin/cosmovisor run start --home ${ORAI_HOME}/.oraid --minimum-gas-prices=0.001orai
Restart=always
RestartSec=3
LimitNOFILE=infinity
LimitNPROC=infinity
[Install]
WantedBy=multi-user.target
EOF
sudo mv /tmp/orai.service /etc/systemd/system/orai.serviceEnable and start:
Copy
sudo systemctl daemon-reload
sudo systemctl start orai
sudo systemctl enable oraiπ©Ί Monitor Your Node
Check service status
Copy
sudo systemctl status oraiView logs live
Copy
journalctl -u orai -fSync status
Copy
oraid status | jq .SyncInfo
# OR
curl -s localhost:26657/status | grep "catching_up"β
If catching_up is false, you're fully synced!
Last updated