Manual
Build the Node from scratch step by step
1. Install Dependencies
sudo apt update && sudo apt upgrade -y && sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential bsdmainutils git make ncdu gcc git jq chrony liblz4-tool -y
Install GO
If you already Installed GO version 1.19.5 you can skip this step
check your GO version:
ver="1.19.5"
cd $HOME
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz"
rm "go$ver.linux-amd64.tar.gz"
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> ~/.bash_profile
source ~/.bash_profile
go version
Download and Install Binary
cd $HOME
rm -rf osmosis/
git clone https://github.com/osmosis-labs/osmosis.git
cd osmosis/
git fetch
git checkout v1.0.5
make build
Install Cosmovisor
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.4.0
Create Symbolic Links for Cosmovisor
mkdir -p $HOME/.osmosisd/cosmovisor/genesis/bin
mv build/osmosisd $HOME/.osmosisd/cosmovisor/genesis/bin/
rm -rf build
sudo ln -s $HOME/.osmosisd/cosmovisor/genesis $HOME/.osmosisd/cosmovisor/current
sudo ln -s $HOME/.osmosisd/cosmovisor/current/bin/osmosisd /usr/local/bin/osmosisd
Set Config App
First, create variable for:
NODENAME=<fill with your node name>
PORT=<fill with your available port>
(you can use port 4-65353, : 18, 22, 23, 53, 80 and 323)
osmosisd config chain-id osmosis-1
osmosisd config keyring-backend file
osmosisd config node tcp://localhost:${PORT}657
osmosisd init $NODENAME --chain-id $CHAIN
Download Addrbook & Genesis
wget -O ${HOME}/.osmosisd/config/addrbook.json https://ss.osmosis.nodestake.top/addrbook.json
wget -O ${HOME}/.osmosisd/config/genesis.json https://ss.osmosis.nodestake.top/genesis.json
Configure Seeds and Peers
SEEDS="c32efea4647f8db185facf809dfb6ff84fd1b6b1@rpc.osmosis.nodestake.top:666"
PEERS=$(curl -s https://ss.osmosis.nodestake.top/peers.txt)
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.planqd/config/config.toml
Configure Pruninge
PRUNING="custom"
PRUNING_KEEP_RECENT="100"
PRUNING_INTERVAL="19"
sed -i -e "s/^pruning *=.*/pruning = \"$PRUNING\"/" $HOME/.osmosisd/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \
\"$PRUNING_KEEP_RECENT\"/" $HOME/.osmosisd/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \
\"$PRUNING_INTERVAL\"/" $HOME/.osmosisd/config/app.toml
Create Service
sudo tee /etc/systemd/system/osmosisd.service > /dev/null << EOF
[Unit]
Description=osmosis node service
After=network-online.target
[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.osmosisd"
Environment="DAEMON_NAME=osmosisd"
Environment="UNSAFE_SKIP_BACKUP=true"
[Install]
WantedBy=multi-user.target
EOF
Start Node
sudo systemctl daemon-reload
sudo systemctl enable osmosisd
sudo systemctl start osmosisd
(Optional) Check Node Status
if you want check your Node logs, run the command below:
sudo journalctl -fu osmosisd-o cat
if you want check your Node synchronize status, run the command below:
curl -s localhost:${PORT}657/status
Last updated