Nodes Guide

Fullnode & Validator

Learn how to run your Namada Node or Validator

Prerequisites

You have completed Getting Started with Namada

Set environment variables

open .env file with your editor and set your desired variables. don't forget to uncomment the commented variables

nano .env

Some most commonly used settings are

  • NODE_P2P_PORT set a valid, non-busy port - default is 26656
  • NODE_RPC_PORT set a valid, non-busy port - default is 26657
  • NODE_RPC_IP RPC endpoint is bound to localhost by default, so it's not accessible from the outside, to make it public set this to 0.0.0.0
  • NAMADA_NETWORK_CONFIGS_SERVER set this if you want to join custom networks other than mainnet e.g. Housefire or Campfire or Dryrun
  • NAMADA_LEDGER__CHAIN_ID should be obtained from network coordinator
  • NAMADA_LEDGER__COMETBFT__MONIKER A name for your node, will be public to others
  • NAMADA_LEDGER__COMETBFT__P2P__SEEDS comma separated list of seed nodes
  • NAMADA_LEDGER__COMETBFT__P2P__PERSISTENT_PEERS comma separated list of persistent peers
  • NAMADA_LEDGER__COMETBFT__P2P__EXTERNAL_ADDRESS your server public IP address
In Namada, Every config in the config.toml file can be modified through env variables. so do not modify config.toml file manually, instead override them. more info https://docs.namada.net/operators/ledger/env-vars#constructing-environment-variables
Every time you change an environment variable, you need to recreate your container for the changes to take effect (a restart won't apply the updates). For example, use docker compose up -d node to recreate your node container with the updated configurations.
You don't have to open above ports on the firewall. just exposing them is enough to be accessible from outside world

Initialize network

run and exec into an ephemeral container:

docker compose --profile node run --rm --entrypoint /bin/bash node

now we are inside the container, we can run initialize commands.

Genesis validator

if you are part of genesis validators, do the following, otherwise jump to Post Genesis Validator or Full Node section.
Create necessary paths to place your validator wallet

mkdir -p ~/.local/share/namada/pre-genesis/$NAMADA_LEDGER__COMETBFT__MONIKER

now you should copy your validator wallet to the above path, the easiest way is to copy and paste it using Nano

nano ~/.local/share/namada/pre-genesis/$NAMADA_LEDGER__COMETBFT__MONIKER/validator-wallet.toml

Join the network, this will download genesis files and will set your consensus keys.

namadac utils join-network --chain-id $NAMADA_LEDGER__CHAIN_ID --genesis-validator $NAMADA_LEDGER__COMETBFT__MONIKER

Now exit the container using Ctrl+D

Post Genesis Validator

TBA

Full node

Join the network, this will download genesis files and will set your consensus keys.

namadac utils join-network --chain-id $NAMADA_LEDGER__CHAIN_ID

Now exit the container using Ctrl+D

Run Node container

You are ready to run your node in the background.

docker compose --profile node up -d

Check node logs. If your node is correctly configured as a genesis validator, you should see This node is a validator. otherwise, This node is not a validator

docker compose --profile node logs -f --tail 100

Run commands inside the node container

to run any commands using namada binary, just exec into the running node container

docker compose exec node bash

then run any commands you want normally, like namada status.

The bash completion for Namada is installed in the docker image. press Tab to receive suggestions!

when you are done, exit the container using ctrl+D

if you don't have plan to run a Node on Namada , but still want to have access to namada binary to run some commands like creating a wallet or query the blockchain, you can use ephemeral containers (they live as long as you are inside them, then will get removed)
docker compose --profile node run --rm --entrypoint /bin/bash node