×
Celestia Node Setup Guide
Complete guide to set up your Celestia Full Node for Mocha-4 testnet
1. 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
2. Install Go
cd $HOME
VER="1.22.6"
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:~/go/bin" >> ~/.bash_profile
source ~/.bash_profile
3. Set Environment Variables
echo "export MONIKER="YOUR_MONIKER_NAME"" >> $HOME/.bash_profile
echo "export CELESTIA_CHAIN_ID="mocha-4"" >> $HOME/.bash_profile
source $HOME/.bash_profile
4. Install Celestia App
cd $HOME
rm -rf celestia-app
git clone https://github.com/celestiaorg/celestia-app.git
cd celestia-app/
git checkout tags/v2.3.0-mocha
make install
5. Initialize Node
celestia-appd config keyring-backend os
celestia-appd config chain-id mocha-4
celestia-appd init $MONIKER --chain-id mocha-4
6. Download Genesis & Address Book
wget -O $HOME/.celestia-app/config/genesis.json https://snapshots2.stakeus.xyz/celestia-testnet/genesis.json
wget -O $HOME/.celestia-app/config/addrbook.json https://snapshots2.stakeus.xyz/celestia-testnet/addrbook.json
7. Configure Node
# Query peers from our RPC
PEERS=$(curl -s https://celestia-testnet-rpc.stakeus.xyz/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):" + (.node_info.listen_addr | capture("(?.+):(?[0-9]+)$").port)' | paste -sd "," -)
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.celestia-app/config/config.toml
8. Create Service
sudo tee /etc/systemd/system/celestia-appd.service > /dev/null << EOF
[Unit]
Description=Celestia Node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which celestia-appd) start
Restart=on-failure
RestartSec=5
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
9. Download Node Snapshot (Archived; Note: only use if you wanna run an Archival Node)
To download and use the latest snapshot:
wget https://snapshots2.stakeus.xyz/celestia-testnet/mocha-4_cl_1234.tar.lz4 --inet4-only
lz4 -c -d mocha-4_cl_1234.tar.lz4 | tar -x -C $HOME/.celestia-app/data
Latest Snapshot available is at height 12345 (123.45 GB)
Last updated: 2024-24-10 10:05:47 GMT
10. Start Node
sudo systemctl daemon-reload
sudo systemctl enable celestia-appd
sudo systemctl start celestia-appd
# Check logs
sudo journalctl -u celestia-appd -f -o cat