Installation
Current Version | Port Prefix | |
---|---|---|
v2.3.1-mocha | 116 |
Minimum hardware Requirements #
CPU : 4x CPUs
Ram : 8GB RAM
Storage: 100GB of storage (SSD or NVME)
Setting Variables
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="116"" >> $HOME/.bash_profile
echo "export DAEMON_NAME="celestia-appd"" >> $HOME/.bash_profile
echo "export DAEMON_HOME=$HOME/.celestia-app"" >> $HOME/.bash_profile
source $HOME/.bash_profile
Install dependencies
sudo apt update && sudo apt upgrade -y && sudo apt-get install make build-essential gcc git jq chrony lz4 tmux unzip bc -y && sudo apt install -y curl git jq lz4 build-essential unzip
INSTALL GO
ver="1.22.3" && \
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 version
# Adding Go's location to profile
cat <<'EOF' >>$HOME/.profile
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
EOF
source $HOME/.profile
go version
Download and build binary
# Clone project repository
cd $HOME
rm -rf celestia-app
git clone https://github.com/celestiaorg/celestia-app.git
cd celestia-app
git checkout v2.3.1-mocha
# Build binaries
make install
# Prepare binaries for Cosmovisor
mkdir -p $HOME/.celestia-app/cosmovisor/genesis/bin
mv $HOME/go/bin/celestia-appd $HOME/.celestia-app/cosmovisor/genesis/bin/
# Create application symlinks
sudo ln -s $HOME/.celestia-app/cosmovisor/genesis $HOME/.celestia-app/cosmovisor/current -f
sudo ln -s $HOME/.celestia-app/cosmovisor/current/bin/celestia-appd /usr/local/bin/celestia-appd -f
Installing Cosmovisor
# Download and install Cosmovisor
go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@latest
# Create service
sudo tee /etc/systemd/system/celestia.service > /dev/null << EOF
[Unit]
Description=CELESTIA node service
After=network-online.target
[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.celestia-app"
Environment="DAEMON_NAME=celestia-appd"
Environment="UNSAFE_SKIP_BACKUP=true"
[Install]
WantedBy=multi-user.target
EOF
# Reload Daemon
sudo systemctl daemon-reload
sudo systemctl enable celestia.service
Initialize Node & Configuring Node Port
# Set node configuration
celestia-appd init $MONIKER --chain-id $CELESTIA_CHAIN_ID
celestia-appd config node tcp://localhost:$CELESTIA_PORT57
celestia-appd config keyring-backend os
# Set custom ports in client.toml
sed -i.bak -e "s%:26457%:${CELESTIA_PORT}57%g" $HOME/.celestia-app/config/client.toml
# Set custom ports in app.toml
sed -i.bak -e "s%:1317%:${CELESTIA_PORT}17%g;
s%:8080%:${CELESTIA_PORT}80%g;
s%:9090%:${CELESTIA_PORT}90%g;
s%:9091%:${CELESTIA_PORT}91%g;
s%:8545%:${CELESTIA_PORT}45%g;
s%:8546%:${CELESTIA_PORT}46%g;
s%:6065%:${CELESTIA_PORT}65%g" $HOME/.celestia-app/config/app.toml
# Set custom ports in config.toml file
sed -i.bak -e "s%:26658%:${CELESTIA_PORT}58%g;
s%:26657%:${CELESTIA_PORT}57%g;
s%:6060%:${CELESTIA_PORT}60%g;
s%:26656%:${CELESTIA_PORT}56%g;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${CELESTIA_PORT}56\"%;
s%:26660%:${CELESTIA_PORT}60%g" $HOME/.celestia-app/config/config.toml
# Download genesis and addrbook
wget -O $HOME/.celestia-app/config/genesis.json https://files.nodeshub.online/mainnet/celestia/genesis.json
wget -O $HOME/.celestia-app/config/addrbook.json https://files.nodeshub.online/mainnet/celestia/addrbook.json
# Add Seeds and Peers
SEEDS="6f6a3a908634b79b6fe7c4988efec2553f188234@celestia.test.seed.nodeshub.online:11656"
PEERS="daf2cecee2bd7f1b3bf94839f993f807c6b15fbf@celestia-testnet-peer.itrocket.net:11656,bdbb36bb9afd57400635623268e93a6ea629a3dd@141.94.138.48:26679,8467ece74c4e62832898d350334e77da9eb0808a@57.128.54.105:26656,e726816f42831689eab9378d5d577f1d06d25716@164.152.163.148:36656,c17c0cbf05e98656fee5f60fad469fc528f6d6de@65.109.25.113:11656,1e712ae1de51b0173170117813d0cbb54ab1eb78@91.121.55.152:26656,ff008cf921bb01cb4ea762a9c301521b1e7005b8@14.140.57.92:11656,c3d4e9daef6db3c1646ad7c4198b064361485299@65.109.126.24:26630,837134836acf3a5c8c27d155afdc268cc85267f5@65.21.136.101:26656,f07813ee16dabdeb370c7ffbdbbc73d9f4db48d5@139.45.205.58:28656,8194b4f9c4d558a0a4d4242bce9274892cbfb386@20.250.38.245:26656,85aef6d15d0197baff696b6e31c88e0f21073c59@162.55.245.144:2400,16c5b4463706f49d2db19d3288516efc50582000@65.21.233.188:11656,269d63adbe022d956fdd6735b93fc8e5b2fad5a8@93.190.143.6:26656,ac4df0b6796aed28a3fae0e95f7828c88a341da4@217.160.102.31:26656,d468354f164a374f9560d6ad46572668020a222e@195.14.6.178:26656,36c18ca2aae40a8143ce84809092a64f99edb502@162.250.127.226:36656,8f282e0237ec45dd0a959bd3e2872f088133a58a@31.7.196.17:26656,d1b54cbb969c57ed74b10b69c318e42689beb0bb@141.95.35.218:26656,c8a8e1882a4a8a977fc7e030b93cc7aaec3180b6@211.219.19.78:26656,6ed983017167d96c62b166725250940deb783563@65.108.142.147:27656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.celestia-app/config/config.toml
# Set minimum gas price, Enable prometheus and disable indexing
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0.002utia\"|" $HOME/.celestia-app/config/app.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.celestia-app/config/config.toml
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.celestia-app/config/config.toml
# Set pruning and indexer to Null
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 = \"50\"/" $HOME/.celestia-app/config/app.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.celestia-app/config/config.toml
Download Snapshot
# Back up priv_validator_state.json if needed
cp ~/.celestia-app/data/priv_validator_state.json ~/.celestia-app/priv_validator_state.json
# On some tendermint chains
celestia-appd unsafe-reset-all --home $HOME/.celestia-app --keep-addr-book
# On other tendermint chains
celestia-appd tendermint unsafe-reset-all --home $HOME/.celestia-app --keep-addr-book
curl https://files.nodeshub.online/testnet/celestia/snapshot/celestia-app/pruned/celestia-testnet.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.celestia-app
mv $HOME/.celestia-app/priv_validator_state.json.backup $HOME/.celestia-app/data/priv_validator_state.json
sudo systemctl restart celestia && sudo journalctl -u celestia -f -o cat
Start service and check the logs
sudo systemctl start celestia.service && sudo journalctl -u celestia -f -o cat
Last updated