Full Storage Node Setup for Celestia Mainnet — celestia
Official documentation
Setting up a full storage node
Update packages and Install dependencies:
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 -y
Install :
cd ~
! [ -x "$(command -v go)" ] && {
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 ~/.bash_profile
}
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
go version
Install Celestia-node:
cd $HOME
rm -rf celestia-node
git clone https://github.com/celestiaorg/celestia-node.git
cd celestia-node/
git checkout tags/v0.20.3
make build
sudo make install
make cel-key
Create wallet:
./cel-key add my_celes_key --keyring-backend test --node.type full
(Optional) Restore an existing cel_key:
cd ~/celestia-node
./cel-key add my_celes_key --keyring-backend test --node.type full --recover
You 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
Config and init app:
celestia full init --core.ip $CORE_IP
Add Consensus node RPC and gRPC ports:
CORE_IP="<PUT_CONSENSUS_NODE_IP>"
CORE_RPC_PORT="<PUT_CONSENSUS_NODE_RPC_PORT>"
CORE_GRPC_PORT="<PUT_CONSENSUS_NODE_GRPC_PORT>"
KEY_NAME="my_celes_key"
Create 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 \
--core.ip $CORE_IP \
--core.rpc.port $CORE_RPC_PORT \
--core.grpc.port $CORE_GRPC_PORT \
--keyring.accname $KEY_NAME \
--metrics.tls=true --metrics --metrics.endpoint otel.celestia.observer
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
Enable and start service:
sudo systemctl daemon-reload
sudo systemctl enable celestia-full
sudo systemctl restart celestia-full && sudo journalctl -u celestia-full -fo cat
Get your node's peerId information:
NODE_TYPE=full
AUTH_TOKEN=$(celestia $NODE_TYPE auth admin)
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:26658
Cheat sheet
Check full node wallet balance:
celestia state balance --node.store ~/.celestia-full/
Get wallet address:
cd $HOME/celestia-node
./cel-key list --node.type full --keyring-backend test
Restore an existing cel_key:
KEY_NAME="my_celes_key"
cd ~/celestia-node
./cel-key add $KEY_NAME --keyring-backend test --node.type full --recover
Check Full node status:
celestia header sync-state --node.store ~/.celestia-full/
Get Node ID:
celestia p2p info --node.store ~/.celestia-full/
(Optional) Add permissions for transferring keys to another server:
chmod -R 700 ~/.celestia-full
Reset node:
celestia full unsafe-reset-store
Upgrade
Stop Full Storage node:
sudo systemctl stop celestia-full
Download binary:
cd $HOME
rm -rf celestia-node
git clone https://github.com/celestiaorg/celestia-node.git
cd celestia-node/
git checkout tags/v0.20.3
make build
sudo make install
make cel-key
Update:
celestia full config-update
Start full storage node:
sudo systemctl restart celestia-full && sudo journalctl -u celestia-full -fo cat
Delete Full Storage node
sudo systemctl stop celestia-full
sudo systemctl disable celestia-full
sudo rm /etc/systemd/system/celestia-full*
rm -rf $HOME/celestia-node $HOME/.celestia-app $HOME/.celestia-full