Manual Installation
Follow these step-by-step instructions to manually install and configure Injective node on your server. This guide covers all necessary dependencies, configuration, and service setup.
⚙️ Customize Your Installation
Fill in your custom values. Commands below will update automatically.
Chain ID
injective-1 Binary
injective-chain-releasesd Version
v1.13.2 Port
26 Install dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install curl git wget htop tmux build-essential jq make lz4 gcc unzip -y Install go
cd $HOME
VER="1.22.10"
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"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin Set vars
echo "export WALLET=\"wallet\"" >> $HOME/.bash_profile
echo "export MONIKER=\"test\"" >> $HOME/.bash_profile
echo "export CHAIN_ID=\"injective-1\"" >> $HOME/.bash_profile
echo "export PORT=\"26\"" >> $HOME/.bash_profile
source $HOME/.bash_profile Download binary
cd $HOME
git clone https://github.com/InjectiveLabs/injective-chain-releases
cd injective
git checkout v1.13.2
make install Config and init app
injective-chain-releasesd init test --chain-id injective-1 Download genesis and addrbook
wget -O $HOME/.injective/config/genesis.json https://snapshots.winnode.xyz/injective-mainnet/genesis.json
wget -O $HOME/.injective/config/addrbook.json https://snapshots.winnode.xyz/injective-mainnet/addrbook.json Set seeds and peers
SEEDS="SEED_NODE_ID_HERE@seed.injective.winnode.xyz:26656"
PEERS="PEER_NODE_ID_HERE@peer.injective.winnode.xyz:26656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.injective/config/config.toml Set custom ports in app.toml
sed -i.bak -e "s%:1317%:26317%g;
s%:8080%:26080%g;
s%:9090%:26090%g;
s%:9091%:26091%g;
s%:8545%:26545%g;
s%:8546%:26546%g;
s%:6065%:26065%g" $HOME/.injective/config/app.toml Set custom ports in config.toml file
sed -i.bak -e "s%:26658%:26658%g;
s%:26657%:26657%g;
s%:6060%:26060%g;
s%:26656%:26656%g;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):26656\"%;
s%:26660%:26660%g" $HOME/.injective/config/config.toml Config pruning
sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/.injective/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/.injective/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"19\"/" $HOME/.injective/config/app.toml Set minimum gas price, enable prometheus and disable indexing
sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "160000000inj"|g' $HOME/.injective/config/app.toml
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.injective/config/config.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.injective/config/config.toml Create service file
sudo tee /etc/systemd/system/injective-chain-releasesd.service > /dev/null <<EOF
[Unit]
Description=Injective node
After=network-online.target
[Service]
User=$USER
WorkingDirectory=$HOME/.injective
ExecStart=$(which injective-chain-releasesd) start --home $HOME/.injective
Restart=on-failure
RestartSec=5
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF Reset and download snapshot
injective-chain-releasesd tendermint unsafe-reset-all --home $HOME/.injective
if curl -s --head https://snapshots.winnode.xyz/injective-mainnet/snapshot_latest.tar.lz4 | head -n 1 | grep "200" > /dev/null; then
curl https://snapshots.winnode.xyz/injective-mainnet/snapshot_latest.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.injective
else
echo "Snapshot not found"
fi Enable and start service
sudo systemctl daemon-reload
sudo systemctl enable injective-chain-releasesd
sudo systemctl restart injective-chain-releasesd && sudo journalctl -u injective-chain-releasesd -f