Skip to content

Celestia

Installation

Terminal window
# install dependencies, if needed
sudo apt update && sudo apt upgrade -y
sudo apt install curl git wget htop tmux build-essential jq make lz4 gcc unzip -y
Terminal window
# install go, if needed
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"
[ ! -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
# set vars
echo "export WALLET="wallet"" >> $HOME/.bash_profile
echo "export MONIKER="test"" >> $HOME/.bash_profile
echo "export CELESTIA_CHAIN_ID="mocha-4"" >> $HOME/.bash_profile
echo "export CELESTIA_PORT="11"" >> $HOME/.bash_profile
source $HOME/.bash_profile
# download binary
cd $HOME
rm -rf celestia-app
git clone https://github.com/celestiaorg/celestia-app.git
cd celestia-app/
APP_VERSION=v3.3.1-mocha
git checkout tags/$APP_VERSION -b $APP_VERSION
make install
# config and init app
celestia-appd config node tcp://localhost:${CELESTIA_PORT}657
celestia-appd config keyring-backend os
celestia-appd config chain-id mocha-4
celestia-appd init $MONIKER --chain-id mocha-4
celestia-appd download-genesis mocha-4
# download genesis and addrbook
wget -O $HOME/.celestia-app/config/genesis.json https://server-4.itrocket.net/testnet/celestia/genesis.json
wget -O $HOME/.celestia-app/config/addrbook.json https://server-4.itrocket.net/testnet/celestia/addrbook.json
# set seeds and peers
SEEDS="5d0bf034d6e6a8b5ee31a2f42f753f1107b3a00e@celestia-testnet-seed.itrocket.net:11656"
PEERS="daf2cecee2bd7f1b3bf94839f993f807c6b15fbf@celestia-testnet-peer.itrocket.net:11656,d6c13af818704c64a42f77d74ab6ab6dc4e164dd@65.108.74.218:40656,3b5cfaef16c0affb426c9dd159cd3da6049159c2@217.160.102.31:26656,bdde9be71fa7bb568e09068238cf5db1dc995258@65.109.84.33:11656,5415b191808b7c16f2f2795960dde67666b0c71d@212.83.43.61:26656,e96d0885f8eeeb25b4603d0a43fb6f0d0a0e6488@65.109.106.214:11656,d7fc95caa0450605b6cbc0a8ab47e3f20992cfd1@46.4.115.61:11656,30a8f6668043544ee2d9af9369f0f68ff8cf2c43@136.243.176.86:26656,a831cf42d79aded9d25efd71b1a6629311c2f644@95.217.120.205:11656,ae7d00d6d70d9b9118c31ac0913e0808f2613a75@177.54.156.69:26656,15eb02dd78fe034a9bb35ab325290004ddf67c9a@138.201.122.61:36656,c2870ce12cfb08c4ff66c9ad7c49533d2bd8d412@185.183.33.109:26656,aea85cf7e03258e9b02cdd8854f64857e9046d73@89.187.156.100:26698,85aef6d15d0197baff696b6e31c88e0f21073c59@162.55.245.144:2400,20c6e72c7cd3b3b37f88d703217576b4f72936d4@185.185.51.34:26656,5c2a752c9b1952dbed075c56c600c3a79b58c395@195.3.221.9:27206,98f1c42a46c9ec5f93c2ae04198e6408ff95a391@207.121.13.108:11656,c17c0cbf05e98656fee5f60fad469fc528f6d6de@65.109.25.113:11656,a902afc777d078f9fd39d02f360a1a9ec5e6c8ab@113.43.234.98:26256,14973f993d5418e93e735885abaca693e6c979da@37.27.109.215:26656,7acb49ef77a268b8ae134ad9db3632c933e5013a@212.83.43.40:26656"
sed -i -e "/^\[p2p\]/,/^\[/{s/^[[:space:]]*seeds *=.*/seeds = \"$SEEDS\"/}" \
-e "/^\[p2p\]/,/^\[/{s/^[[:space:]]*persistent_peers *=.*/persistent_peers = \"$PEERS\"/}" $HOME/.celestia-app/config/config.toml
# set custom ports in app.toml
sed -i.bak -e "s%:1317%:${CELESTIA_PORT}317%g;
s%:8080%:${CELESTIA_PORT}080%g;
s%:9090%:${CELESTIA_PORT}090%g;
s%:9091%:${CELESTIA_PORT}091%g;
s%:8545%:${CELESTIA_PORT}545%g;
s%:8546%:${CELESTIA_PORT}546%g;
s%:6065%:${CELESTIA_PORT}065%g" $HOME/.celestia-app/config/app.toml
# set custom ports in config.toml file
sed -i.bak -e "s%:26658%:${CELESTIA_PORT}658%g;
s%:26657%:${CELESTIA_PORT}657%g;
s%:6060%:${CELESTIA_PORT}060%g;
s%:26656%:${CELESTIA_PORT}656%g;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${CELESTIA_PORT}656\"%;
s%:26660%:${CELESTIA_PORT}660%g" $HOME/.celestia-app/config/config.toml
# config pruning
sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/.celestia-app/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/.celestia-app/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"19\"/" $HOME/.celestia-app/config/app.toml
# set minimum gas price, enable prometheus and disable indexing
sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "0.002utia"|g' $HOME/.celestia-app/config/app.toml
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.celestia-app/config/config.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.celestia-app/config/config.toml
# create service file
sudo tee /etc/systemd/system/celestia-appd.service > /dev/null <<EOF
[Unit]
Description=Celestia node
After=network-online.target
[Service]
User=$USER
WorkingDirectory=$HOME/.celestia-app
ExecStart=$(which celestia-appd) start --home $HOME/.celestia-app
Restart=on-failure
RestartSec=5
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
# reset and download snapshot
celestia-appd tendermint unsafe-reset-all --home $HOME/.celestia-app
curl https://server-4.itrocket.net/testnet/celestia/celestia_2025-02-22_4820756_snap.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.celestia-app
# enable and start service
sudo systemctl daemon-reload
sudo systemctl enable celestia-appd
sudo systemctl restart celestia-appd && sudo journalctl -u celestia-appd -fo cat

Create Wallet

Terminal window
# to create a new wallet, use the following command. don’t forget to save the mnemonic
celestia-appd keys add $WALLET
# to restore exexuting wallet, use the following command
celestia-appd keys add $WALLET --recover
# save wallet and validator address
WALLET_ADDRESS=$(celestia-appd keys show $WALLET -a)
VALOPER_ADDRESS=$(celestia-appd keys show $WALLET --bech val -a)
echo "export WALLET_ADDRESS="$WALLET_ADDRESS >> $HOME/.bash_profile
echo "export VALOPER_ADDRESS="$VALOPER_ADDRESS >> $HOME/.bash_profile
source $HOME/.bash_profile
# check sync status, once your node is fully synced, the output from above will print "false"
celestia-appd status 2>&1 | jq
# before creating a validator, you need to fund your wallet and check balance
celestia-appd query bank balances $WALLET_ADDRESS

Create Validator

Terminal window
celestia-appd tx staking create-validator \
--amount 1000000utia \
--from $WALLET \
--commission-rate 0.1 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--pubkey $(celestia-appd tendermint show-validator) \
--moniker "test" \
--identity "" \
--website "" \
--details "" \
--chain-id mocha-4 \
--gas auto --gas-adjustment 1.5 --gas-prices 0.005utia \
-y