Skip to main content

Installation

Official docs

https://docs.celestia.org/how-to-guides/consensus-node

System Requirements

CategoryRequirements
CPU8 cores
RAM24 GB
Storage3 TiB NVME
Bandwidth1 Gbps

Install dependencies

sudo apt update -y && sudo apt upgrade -y && \
sudo apt install curl tar wget clang pkg-config libssl-dev libleveldb-dev jq build-essential git make lz4 screen unzip -y

Install go

sudo rm -r /usr/local/go
curl https://dl.google.com/go/go1.23.1.linux-amd64.tar.gz | sudo tar -C/usr/local -zxvf - ;
cat <<'EOF' >>$HOME/.bashrc
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/.bashrc

Set vars

EDIT YOUR MONIKER & YOUR PREFERRED PORT NUMBER

echo "export CHAIN_ID="celestia"" >> $HOME/.bashrc
source $HOME/.bashrc

Install binaries

cd $HOME
rm -rf celestia-app
git clone https://github.com/celestiaorg/celestia-app.git
cd celestia-app
git checkout v3.3.1
make install

Init node

celestia-appd init node --chain-id=$CHAIN_ID

Download genesis

curl -Ls https://snapshot.silentvalidator.com/celestia/genesis/genesis.json > $HOME/.celestia-app/config/genesis.json 

Set peers

peers=$(curl -sS https://rpc.celestia.silentvalidator.com/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr)"' | awk -F ':' '{print $1":"$(NF)}' | paste -sd, -)
sed -i -e "s|^persistent_peers *=.*|persistent_peers = \"$peers\"|" $HOME/.celestia-app/config/config.toml
echo $peers

Enable indexer (optional)

sed -i -e 's/^indexer = "null"/indexer = "kv"/' $HOME/.celestia-app/config/config.toml

Set up cosmovisor

go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.0.0
cat <<'EOF' >>$HOME/.bashrc
export DAEMON_NAME=celestia-appd
export DAEMON_HOME==$HOME/.celestia-app
EOF
source ~/.bashrc
mkdir -p $DAEMON_HOME/cosmovisor/genesis/bin
mkdir -p $DAEMON_HOME/cosmovisor/upgrades
cp $(which $DAEMON_NAME) $DAEMON_HOME/cosmovisor/genesis/bin

Set up services

sudo tee /etc/systemd/system/celestia.service > /dev/null <<EOF
[Unit]
Description=celestia
After=network.target

[Service]
User=$USER
Type=simple
WorkingDirectory=$HOME/.celestia-app
ExecStart=$HOME/go/bin/cosmovisor run run
Restart=on-failure
LimitNOFILE=65535
Environment="DAEMON_NAME=${DAEMON_NAME}"
Environment="DAEMON_HOME=${DAEMON_HOME}"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
Environment="DAEMON_LOG_BUFFER_SIZE=512"
Environment="UNSAFE_SKIP_BACKUP=true"

[Install]
WantedBy=multi-user.target
EOF

Download snapshots

cd 
wget -O celestia_snapshot.tar.lz4 https://snapshot.silentvalidator.com/celestia/snapshot/celestia_latest.tar.lz4

Decompress snapshots

lz4 -c -d celestia_snapshot.tar.lz4  | tar -xv -C $HOME/.celestia-app

Start the node

sudo systemctl daemon-reload && \
sudo systemctl enable celestia && \
sudo systemctl restart celestia && \
sudo journalctl -u celestia -fn 100

Check sync status

curl -s http://localhost:26657/status | jq .result.sync_info

if "catching_up": false then the node is synced