# Fullnode

### Install depencies

```bash
sudo apt update && sudo apt upgrade -y
sudo apt-get install -y make git-core libssl-dev pkg-config libclang-12-dev build-essential protobuf-compiler
```

### Install GO

```bash
cd $HOME
VER="1.22.5"
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
```

### Install Rust

```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
```

### Set variables. Replace yout Moniker(ALIAS), wallet name, custom port.

```bash
NAMADA_PORT=26
echo "export NAMADA_PORT="$NAMADA_PORT"" >> $HOME/.bash_profile
echo "export ALIAS="CHOOSE_A_NAME_FOR_YOUR_VALIDATOR"" >> $HOME/.bash_profile
echo "export WALLET="wallet"" >> $HOME/.bash_profile
echo "export PUBLIC_IP=$(wget -qO- eth0.me)" >> $HOME/.bash_profile
echo "export CHAIN_ID="namada.5f5de2dd1b88cba30586420"" >> $HOME/.bash_profile
echo "export BASE_DIR="$HOME/.local/share/namada"" >> $HOME/.bash_profile
source $HOME/.bash_profile
# set custom configs server
export NAMADA_NETWORK_CONFIGS_SERVER="https://github.com/anoma/namada-mainnet-genesis/releases/download/mainnet-genesis"

```

### Install cometBFT

```bash
cd $HOME
rm -rf cometbft
git clone https://github.com/cometbft/cometbft.git
cd cometbft
git checkout v0.37.15
make build
sudo cp $HOME/cometbft/build/cometbft /usr/local/bin/
cometbft version
```

### Install binaries

```bash
cd $HOME
rm -rf namada
git clone https://github.com/anoma/namada
cd namada
git checkout v101.1.2
make build

sudo cp $HOME/namada/target/release/namad* /usr/local/bin/
namada --version
if [ ! -d "$BASE_DIR" ]; then
    mkdir -p "$BASE_DIR"
fi
```

### Join network

```bash
namadac utils join-network --chain-id $CHAIN_ID
sed -i 's#persistent_peers = ".*"#persistent_peers = "tcp://805ba1297ee4e4d64e2d5ec17423365b0489dafb@namada-mainnet-peer.itrocket.net:14656,tcp://43e00ece489d4d334c46484f0227e7ecf8c68b26@207.121.63.124:14656,tcp://b5f8f5b74eb42624a4f566c81e9e8abfb2b9eb32@128.140.11.24:26656,tcp://11d23ba849851e33add18f566ac1a3ea431f516b@190.2.141.78:16656,tcp://7b2fcfb157212fe24797153b8dc30e05285285f4@212.83.33.148:26602,tcp://109f29b27490ff7773fa07078a57f2a17c6436f9@158.220.81.95:26856,tcp://ae17b481a49aeb85b40b1d3b02b0e908ba9a3615@88.216.198.178:18300,tcp://7d70425b03d90f7c0de35e429fae1b9849b72098@149.202.88.223:26656,tcp://593109ec6db7a1b15cae99cc85cc2b5cb2ca3f67@51.81.34.21:26656,tcp://eded4153ce8a1e0b4b20dfaa7af78effab135c5d@38.242.214.36:26656,tcp://df4fed252c4820880f86d82a359475c2c5d6448d@206.72.196.131:26656"#' $HOME/.local/share/namada/namada.5f5de2dd1b88cba30586420/config.toml
```

### Set custom ports

```bash
sed -i.bak -e "s%:26658%:${NAMADA_PORT}658%g;
s%:26657%:${NAMADA_PORT}657%g;
s%:26656%:${NAMADA_PORT}656%g;
s%:26545%:${NAMADA_PORT}545%g;
s%:8545%:${NAMADA_PORT}545%g;
s%:26660%:${NAMADA_PORT}660%g" $HOME/.local/share/namada/namada.5f5de2dd1b88cba30586420/config.toml
```

### Create service file

```bash
sudo tee /etc/systemd/system/namadad.service > /dev/null <<EOF
[Unit]
Description=namada
After=network-online.target

[Service]
User=$USER
WorkingDirectory=$BASE_DIR
Environment=CMT_LOG_LEVEL=p2p:none,pex:error
Environment=NAMADA_CMT_STDOUT=true
Environment=NAMADA_BROADCASTER_TIMEOUT_SECS=600
ExecStart=$(which namada) node ledger run
StandardOutput=syslog
StandardError=syslog
Restart=always
RestartSec=10
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF
```

{% hint style="info" %}
For a quick launch, find relevant snapshots from the community by asking in discord chats.
{% endhint %}

### Start the node and check logs

```bash
sudo systemctl daemon-reload
sudo systemctl enable namadad
sudo systemctl restart namadad && sudo journalctl -u namadad -f
```

### Check sync status

```bash
curl http://127.0.0.1:${NAMADA_PORT}657/status | jq
```
