# Light Node

### [Docs](https://docs.celestia.org/nodes/full-storage-node)

## [EXPLORER](https://explorer.stavr.tech/Celestia-Testnet/staking)

* **Hardware requirements**:

| Node Type  | CPU | RAM | Storage |
| ---------- | --- | --- | ------- |
| Light node | 2   | 2GB | 100GB   |

## 1) Auto\_install script

```bash
source <(curl -s https://raw.githubusercontent.com/111STAVR111/props/main/Celestia/Testnet/Light/lightt)
```

## 2) Manual installation

#### Preparing the server

```bash
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
```

### GO 1.23.1

```bash
ver="1.23.1"
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
```

## Build 22.09.25

```bash
cd $HOME && mkdir -p go/bin/
git clone https://github.com/celestiaorg/celestia-node.git
cd celestia-node/
git checkout tags/v0.26.2-mocha
make build 
sudo make install 
make cel-key
mv $HOME/celestia-node/cel-key /usr/local/bin/

```

`celestia version`

* version: v0.26.2-mocha
* commit:&#x20;

### Create/recover wallet

```bash
cel-key add light-wallet --keyring-backend test --node.type light --p2p.network mocha
           OR
cel-key add light-wallet --keyring-backend test --node.type light --p2p.network mocha --recover
```

## Initiation

```python
celestia light init --p2p.network mocha
```

## Create a service file

```bash
CORE_IP="<PUT_CONSENSUS_NODE_IP>"
CORE_RPC_PORT="<PUT_CONSENSUS_NODE_RPC_PORT>"
CORE_GRPC_PORT="<PUT_CONSENSUS_NODE_GRPC_PORT>"
KEY_NAME="light-wallet"
```

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

[Service]
User=$USER
Environment=GODEBUG="asynctimerchan=1"
ExecStart=$(which celestia) light start \
--core.ip $CORE_IP \
--core.rpc.port $CORE_RPC_PORT \
--core.grpc.port $CORE_GRPC_PORT \
--keyring.keyname $KEY_NAME \
--p2p.network mocha \
--metrics.tls=true \
--metrics --metrics.endpoint otel.mocha.celestia.observer
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF
```

## SnapShot Light Testnet | Archive (updated every 24 hours)

{% hint style="success" %} <mark style="color:orange;">**You can check the size and time of snapshot creation with this command**</mark>\
`curl -sI https://celestia.light-archive.snap-t.stavr.tech/light-t-snap.tar.lz4 | grep "last" && curl -sI https://celestia.light-archive.snap-t.stavr.tech/light-t-snap.tar.lz4 | grep content-length | awk '{printf "%.2f GB\n", $2/1024/1024/1024}'`
{% endhint %}

```bash
cd $HOME
snap install lz4
sudo systemctl stop celestia-light
rm -rf $HOME/.celestia-light-mocha-4/data
curl -o - -L https://celestia.light-archive.snap-t.stavr.tech/light-t-snap.tar.lz4 | lz4 -c -d - | tar -x -C $HOME/.celestia-light-mocha-4/
sudo systemctl restart celestia-light && sudo journalctl -fu celestia-light -ocat
```

### Start

```bash
sudo systemctl daemon-reload
sudo systemctl enable celestia-light
sudo systemctl restart celestia-light && sudo journalctl -fu celestia-light -ocat
```

## [🧩Services and Tools🧩](https://stavr-team.gitbook.io/nodes-guides/testnets/celestia/light-node/snapshot)

## Monitoring

You can set up your node status alarm here - [Monitoring](https://stavr-team.gitbook.io/nodes-guides/monitoring)

## Security

You can create secure management of your wallet and your node by following this links.

[TMKMS](https://stavr-team.gitbook.io/nodes-guides/tmkms)               [Wallet Security](https://stavr-team.gitbook.io/nodes-guides/wallet-security)

### Delete node

```bash
systemctl stop celestia-light
systemctl disable celestia-light
rm /etc/systemd/system/celestia-light.service
systemctl daemon-reload
cd $HOME
rm -rf .celestia-light-mocha-4
rm -rf celestia-node
rm -rf /usr/local/bin/cel-key
rm -rf $(which celestia)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://stavr-team.gitbook.io/nodes-guides/testnets/celestia/light-node.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
