Celestia Node Installation
This guide will walk you through installing a Celestia Light Node.
System Requirements
System Requirements
Minimum Requirements
- CPU: 1 core
- RAM: 2 GB
- Storage: 25 GB SSD
- Network: 100 Mbps
Recommended Requirements
- CPU: 2 cores
- RAM: 4 GB
- Storage: 50 GB SSD
- Network: 100 Mbps
Prerequisites
- Ubuntu 20.04 LTS or later
- Root or sudo access
- Stable internet connection
Installation Steps
Step 1: Install Go
Install Go 1.20.3
# Install dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install -y curl tar wget clang pkg-config libssl-dev build-essential git make ncdu
# Install Go 1.20.3
cd $HOME
wget "https://golang.org/dl/go1.20.3.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go1.20.3.linux-amd64.tar.gz"
rm "go1.20.3.linux-amd64.tar.gz"
# Set up Go environment
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
# Verify installation
go version
Note: This script installs Go 1.20.3 and sets up the environment. You may need to restart your terminal or run source ~/.profile
for changes to take effect.
Step 2: Clone and Build Celestia Node
cd $HOME
rm -rf celestia-node
git clone https://github.com/celestiaorg/celestia-node.git
cd celestia-node/
git checkout tags/v0.9.5
make build
make install
make cel-key
Verify the installation:
celestia version
Expected output:
Semantic version: v0.9.5
Commit: 2fa72c7199e5b93772a2c7e25141cfbd28f16a8e
Build Date: Tue 16 May 2023 06:52:10 PM CEST
System version: amd64/linux
Golang version: go1.20.3
Step 3: Initialize the Node
This command will create a new wallet named my_celes_key
.
Remember to save the address and mnemonics of this wallet!
celestia light init --p2p.network blockspacerace
- When the above command is entered, it should give a result like the following.
2023-03-27T21:05:40.875Z INFO node nodebuilder/init.go:29 Initializing Light Node Store over '/root/.celestia-light-blockspacerace-0'
2023-03-27T21:05:40.876Z INFO node nodebuilder/init.go:61 Saved config {"path": "/root/.celestia-light-blockspacerace-0/config.toml"}
2023-03-27T21:05:40.876Z INFO node nodebuilder/init.go:63 Accessing keyring...
2023-03-27T21:05:40.881Z WARN node nodebuilder/init.go:135 Detected plaintext keyring backend. For elevated security properties, consider using the `file` keyring backend.
2023-03-27T21:05:40.882Z INFO node nodebuilder/init.go:150 NO KEY FOUND IN STORE, GENERATING NEW KEY... {"path": "/root/.celestia-light-blockspacerace-0/keys"}
2023-03-27T21:05:40.901Z INFO node nodebuilder/init.go:155 NEW KEY GENERATED...
NAME: my_celes_key
ADDRESS: celestia1xxxxxxxxxxxxxxxx
MNEMONIC (save this mnemonic) 12 words
xxxxxxxxxxxxxxxxxx........................
NOTE: The core ip, rpc port, grpc port in the ExecStart command are taken from the endpoints provided in the Celestia documentation (https://docs.celestia.org/nodes/blockspace-race/#rpc-endpoints) and there are alternatives. If you want, you can change here and use different endpoints.
Start Node
- Enter the following code while on the Tmux screen.
celestia light start --core.ip https://rpc-blockspacerace.pops.one --core.rpc.port 26657 --core.grpc.port 9090 --keyring.accname my_celes_key --metrics.tls=false --metrics --metrics.endpoint otel.celestia.tools:4318 --gateway --gateway.addr localhost --gateway.port 26659 --p2p.network blockspacerace
Step 4: Create Systemd Service
sudo tee <<EOF >/dev/null /etc/systemd/system/celestia-lightd.service
[Unit]
Description=celestia-lightd Light Node
After=network-online.target
[Service]
User=$USER
ExecStart=/usr/local/bin/celestia light start --core.ip https://rpc-blockspacerace.pops.one --core.rpc.port 26657 --core.grpc.port 9090 --keyring.accname my_celes_key --metrics.tls=false --metrics --metrics.endpoint otel.celestia.tools:4318 --gateway --gateway.addr localhost --gateway.port 26659 --p2p.network blockspacerace
Restart=on-failure
RestartSec=3
LimitNOFILE=4096
[Install]
WantedBy=multi-user.target
EOF
Step 5: Start the Node
Service Management Commands
- Basic Commands
- Auto-start
- Logs
sudo systemctl start celestia-lightd
sudo systemctl stop celestia-lightd
sudo systemctl restart celestia-lightd
sudo systemctl status celestia-lightd
sudo systemctl enable celestia-lightd
sudo systemctl disable celestia-lightd
sudo journalctl -u celestia-lightd -f --no-hostname -o cat
sudo journalctl -u celestia-lightd -n 100 --no-hostname -o cat
Verify Node Sync
Once synchronized, the logs should look similar to:
INFO header/store store/store.go:349 new head {"height": 106151, "hash": "CD084A85460978EC8C9E4BA23EE3847B28A90A879245E46F68B8133E413EA7A3"}
INFO das das/subscriber.go:34 new header received via subscription {"height": 106151}
INFO das das/worker.go:79 finished sampling headers {"from": 106151, "to": 106151, "errors": 0, "finished (s)": 0.000060704}
WARN header/sync sync/sync_head.go:140 received known network header {"current_height": 106151, "header_height": 106151, "header_hash": "CD084A85460978EC8C9E4BA23EE3847B28A90A879245E46F68B8133E413EA7A3"}
INFO header/store store/store.go:349 new head {"height": 106152, "hash": "C0FA44EF29FDE75ECD069A2031CC0A8BE94996F775FC106F76B88CCA514B1EF9"}
INFO das das/subscriber.go:34 new header received via subscription {"height": 106152}
INFO das das/worker.go:79 finished sampling headers {"from": 106152, "to": 106152, "errors": 0, "finished (s)": 0.00005358}
Monitor Your Node
Check Node ID
Get your Node ID to monitor on Tiascan:
celestia p2p info
Your Node ID will be displayed as ID="12D....."
. You can search this on https://tiascan.com/light-nodes to see uptime and other details.
Important Backup
Backup your keys directory at /root/.celestia-light-blockspacerace-0/keys
. This contains your wallet keys!
Configuration
Port Configuration
Default ports used by Celestia Light Node:
Service | Port | Protocol | Description |
---|---|---|---|
Gateway | 26659 | TCP | API Gateway |
P2P | Various | TCP | Peer connections |
Network Endpoints
You can use alternative RPC endpoints from the official documentation.