Do not install on the same server with Bridge!

LINKS

**Website**
[<https://celestia.org/>](<https://celestia.org/>)

**Docs**
[<https://docs.celestia.org/>](<https://docs.celestia.org/>)

**Explorers**
[<https://celestia.explorers.guru/>](<https://celestia.explorers.guru/>)

**Github**
[<https://github.com/celestiaorg>](<https://github.com/celestiaorg>)

Install Light Node

Install dependencies

# Update if needed
sudo apt update && sudo apt upgrade -y

# Insall packages
sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential bsdmainutils git make ncdu -y

# Install go
cd $HOME
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 celestia-node

cd $HOME 
rm -rf celestia-node 
git clone <https://github.com/celestiaorg/celestia-node.git> 
cd celestia-node/ 
git checkout tags/v0.16.0
make build

sudo mv $HOME/celestia-node/build/celestia /usr/local/bin/

make cel-key

sudo mv $HOME/celestia-node/cel-key /usr/local/bin/

celestia version

Generate light node wallet

CELESTIA_CHAIN=mocha-4
CELESTIA_LIGHT_WALLET=LIGHT_WALLET

cel-key add $CELESTIA_LIGHT_WALLET --keyring-backend test --node.type light --p2p.network $CELESTIA_CHAIN

FUND LIGHT ADDR

Set CORE RPC endpoints (not mandatory, only needed to submit rpc queries)

# set vars
CORE_IP=http://IP            # your validator node IP addr OR rpc node from <https://docs.celestia.org/nodes/mocha-testnet/#rpc-endpoints>
CORE_IP_PORT=26657           # your validator node RPC PORT
CORE_GRPC_PORT=9090          # your validator node gRPC PORT

Init and config bridge

# Set LIGHT RPC listen address and port
LIGHT_RPC_ADDR="0.0.0.0"
LIGHT_RPC_PORT="26658"      # default is 26658

GATEWAY_ADDR="0.0.0.0"
GATEWAY_PORT="26659"        # default is 26659

# check vars
echo $CELESTIA_CHAIN,$CORE_IP,$CORE_IP_PORT,$CORE_GRPC_PORT,$LIGHT_RPC_ADDR,$LIGHT_RPC_PORT,$GATEWAY_ADDR,$GATEWAY_PORT,$CELESTIA_BRIDGE_WALLET | tr "," "\\n" | nl 
# output 9 lines

# init
celestia light init \\
  --p2p.network $CELESTIA_CHAIN \\
  --core.ip $CORE_IP \\
  --core.rpc.port $CORE_IP_PORT \\
  --core.grpc.port $CORE_GRPC_PORT \\
  --gateway \\
  --gateway.addr $GATEWAY_ADDR \\
  --gateway.port $GATEWAY_PORT \\
  --rpc.addr $LIGHT_RPC_ADDR \\
  --rpc.port $LIGHT_RPC_PORT \\
  --keyring.keyname $CELESTIA_LIGHT_WALLET

Create and run service

tee $HOME/celestia-light.service > /dev/null <<EOF
[Unit]
  Description=celestia-bridge
  After=network-online.target
[Service]
  User=$USER
  ExecStart=$(which celestia) light start --gateway --gateway.addr $GATEWAY_ADDR --gateway.port $GATEWAY_PORT --p2p.network $CELESTIA_CHAIN
  Restart=on-failure
  RestartSec=10
  LimitNOFILE=65535
[Install]
  WantedBy=multi-user.target
EOF

sudo mv $HOME/celestia-light.service /etc/systemd/system/

sudo systemctl daemon-reload

sudo systemctl start celestia-light && journalctl -u celestia-light -o cat -f