Full Node
Full Storage Node Setup for Mocha Testnet — mocha-4
Server preparation
sudo apt update && sudo apt upgrade -y
sudo apt install curl git wget htop tmux build-essential jq make gcc tar clang pkg-config libssl-dev ncdu -yGO 1.23.1
ver="1.23.1"
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" >> $HOME/.bash_profile
source $HOME/.bash_profile
go versionInstall Celestia-node
cd $HOME
rm -rf celestia-node
git clone https://github.com/celestiaorg/celestia-node.git
cd celestia-node/
git checkout tags/v0.28.2-mocha
make build
sudo make install
make cel-keyCreate wallet
./cel-key add my_celes_key --keyring-backend test --node.type full --p2p.network mocha(Optional) Restore an existing cel_key
cd ~/celestia-node
./cel-key add my_celes_key --keyring-backend test --node.type full --recoverYou can find the address by running the following command in the celestia-node directory
cd $HOME/celestia-node
./cel-key list --node.type full --keyring-backend test --p2p.network mochaConfig and init app
celestia full init --core.ip <RPC_NODE_IP> --p2p.network mocha-4cd $HOME/celestia-node
./cel-key list --node.type full --keyring-backend test --p2p.network mochaCreate Service file
sudo tee /etc/systemd/system/celestia-full.service > /dev/null <<EOF
[Unit]
Description=celestia full
After=network-online.target
[Service]
User=$USER
ExecStart=$(which celestia) full start --archival \
--p2p.network mocha \
--metrics.tls=true --metrics --metrics.endpoint otel.mocha.celestia.observer
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOFEnable and start service
sudo systemctl daemon-reload
sudo systemctl enable celestia-full
sudo systemctl restart celestia-full && sudo journalctl -u celestia-full -fo catGet your node's peerId information
NODE_TYPE=full
AUTH_TOKEN=$(celestia $NODE_TYPE auth admin --p2p.network mocha)Then you can get the peerId of your node with the following curl command
curl -X POST \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":0,"method":"p2p.Info","params":[]}' \
http://localhost:26658Last updated