# Bridge Node

[Official documentation](https://docs.celestia.org/how-to-guides/bridge-node)

<details>

<summary>Hardware Requirement</summary>

* Memory: 64 GB
* CPU: 8 cores
* Disk: 8 TB NVME Storage

</details>

#### Server preparation

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

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

***

#### **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.30.2 
make build 
sudo make install 
make cel-key
```

***

#### **Config and init app**

```
celestia bridge init --core.ip <RPC_NODE_IP>
```

{% hint style="info" %}
Once you start the Bridge Node, a wallet key will be generated for you. You will need to fund that address with Mainnet tokens to pay for PayForBlob transactions. You can find the address by running the following command:
{% endhint %}

```
cd $HOME/celestia-node
./cel-key list --node.type bridge --keyring-backend test
```

***

#### **Create Service file**

```
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 --archival \
--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-bridge
sudo systemctl restart celestia-bridge && sudo journalctl -u celestia-bridge -fo cat
```

***

#### **Get your node's peerId information**

{% hint style="danger" %}
NOTE: You can only generate an auth token after initializing and starting your celestia-node.
{% endhint %}

```
NODE_TYPE=bridge
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
```


---

# 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://service.block-pro.net/mainnet/celestia/bridge-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.
