Skip to main content

Installation


 

 
Custom Configuration (optional)
  • Custom user
sudo adduser namada
sudo adduser namada sudo
su - namada
  • Custom Port 
PORT=36
echo "export PORT=${PORT}" >> $HOME/.bash_profile
source $HOME/.bash_profile


Install Update and Dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install make clang pkg-config libssl-dev build-essential git jq llvm libudev-dev protobuf-compiler

 

Install GO(ver. 20.5)
sudo rm -rf /usr/local/go && \
curl -Ls https://go.dev/dl/go1.20.5.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local && \
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile && \
source $HOME/.bash_profile && \
go version

Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"
Install CometBFT
curl -sL https://github.com/cometbft/cometbft/releases/download/v0.37.2/cometbft_0.37.2_linux_amd64.tar.gz | sudo tar -C /usr/local/bin -xzf- cometbft
cometbft version

 

Installing Binary
wget https://github.com/anoma/namada/releases/download/v0.31.1/namada-v0.31.1-Linux-x86_64.tar.gz
tar -xzvf namada-v0.31.1-Linux-x86_64.tar.gz
cd namada-v0.31.1-Linux-x86_64
sudo cp namada* $HOME/.cargo/bin/
namada --version

 

Join the network as post-genesis validator
  export CHAIN_ID="shielded-expedition.88f17d1d14" ## (replace with the actual chain-id)  
  namada client utils join-network --chain-id $CHAIN_ID 
Set Custom Port
sed -i.bak -e "s%:26658%:${PORT}658%g;
s%:26657%:${PORT}657%g;
s%:26656%:${PORT}656%g;
s%:26545%:${PORT}545%g;
s%:8545%:${PORT}545%g;
s%:26660%:${PORT}660%g" $HOME/.local/share/namada/shielded-expedition.88f17d1d14/config.toml
 
Create Service
sudo tee /etc/systemd/system/namadad.service > /dev/null <<EOF
[Unit]
Description=Namada TestNode
After=network-online.target

[Service]
User=$USER
WorkingDirectory=$HOME/.local/share/namada
Environment=TM_LOG_LEVEL=p2p:none,pex:error
Environment=NAMADA_CMT_STDOUT=true
ExecStart=$(which namada) --base-dir=$HOME/.local/share/namada node ledger run
StandardOutput=syslog
StandardError=syslog
Restart=always
RestartSec=10
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF

 

Register And Start Service
sudo systemctl daemon-reload
sudo systemctl enable namadad
sudo systemctl restart namadad && sudo journalctl -fu namadad -o cat

 

Delete Node
sudo systemctl stop namadad
sudo systemctl disable namadad
sudo rm -rf /etc/systemd/system/namadad.service
sudo systemctl daemon-reload
sudo rm $(which namada)
sudo rm -rf $HOME/.local/share/namada/shielded-expedition.88f17d1d14