# Bridge Node

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

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

* **Hardware requirements**:

| Node Type   | CPU | RAM  | Storage |
| ----------- | --- | ---- | ------- |
| Bridge node | 6   | 16GB | 2TB     |

## 1) Auto\_install script

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

## 2) Manual installation

#### Preparing the server

```bash
sudo apt update && sudo apt upgrade -y
sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential bsdmainutils git make ncdu gcc git jq chrony liblz4-tool -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

<pre class="language-bash"><code class="lang-bash"><strong>cd $HOME &#x26;&#x26; mkdir -p go/bin/
</strong>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/

</code></pre>

`celestia version`

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

### Create/recover wallet

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

## Initiation

```python
#--core.ip - IP address RPC Node
#--p2p.network - chain id (mocha-4)
#--core.port - gRPC port from our RPC node
#--keyring.keyname -  our Wallet Name
celestia bridge init --core.ip <RPC_NODE_IP> --p2p.network mocha --core.port 9090 --keyring.keyname bridge-wallet --archival
```

## Create a service file

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

[Service]
User=$USER
ExecStart=$(which celestia) bridge start \
--p2p.network mocha \
--metrics.tls=true --metrics --metrics.endpoint otel.mocha.celestia.observer \
--keyring.keyname bridge-wallet
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

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

## SnapShot Bridge Testnet | Archive - updated every 3 days

{% hint style="success" %}
<https://celestia-tools.stavr.tech/bridge/>
{% endhint %}

```sh
cd $HOME
snap install aria2c lz4
aria2c -x 12 -s 12 https://celestia.bridge-archive.snap-t.stavr.tech/bridge-t-snap.tar.lz4
sudo systemctl stop celestia-bridge
rm -rf $HOME/.celestia-bridge-mocha-4/{blocks,data,index,inverted_index,transients,.lock}
tar -I lz4 -xvf bridge-t-snap.tar.lz4 -C $HOME/.celestia-bridge-mocha-4/
sudo systemctl restart celestia-bridge && sudo journalctl -fu celestia-bridge -ocat
```

## Useful Tools

### Start

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

**Bridge node Status:**

```bash
celestia header sync-state --node.store  ~/.celestia-bridge-mocha-4/
```

\
[🧩Services and Tools🧩](https://stavr-team.gitbook.io/nodes-guides/testnets/celestia/bridge-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-bridge
systemctl disable celestia-bridge
rm /etc/systemd/system/celestia-bridge.service
systemctl daemon-reload
cd $HOME
rm -rf .celestia-bridge-mocha-4
rm -rf celestia-node
rm -rf /usr/local/bin/cel-key
rm -rf $(which celestia)
```
