NodersUA Team
  • Intoduction
    • About NodersUA
    • Supported Networks
    • Our Comunity
  • Testnet
    • Gensyn
    • LayerEdge
    • Pipe
    • Multiple
    • Privasea
    • OpenLedger
    • Nexus
    • Cysic
    • Titan
      • Installation (Validator Node)
      • Update (Validator Node)
      • Installation (L1 Node Operation Tutorial)
      • Useful Commands
      • Delete
    • Hemi
      • Install
      • Update
    • Gaia
    • Rivalz
      • Install
      • Update
    • Allora
      • Install
      • Update
    • 0G Network
      • Installation (Validator Node)
      • Update (Validator Node)
      • Installation (Storage Node And DA Services)
      • Useful Commands
      • Delete
    • Shardeum
      • Installation
      • Update
      • Useful Commands
  • Mainnet
    • Forta
      • Installation
    • Gitopia
      • Installation
      • Update
      • Useful Commands
  • Archive
    • Midnight
      • Install
      • New Install
    • ICN
    • Cat Protcol
    • Morphl2
    • Elixir
      • Update to mainnet
    • Subspace / Gemini-3h (Advanced CLI)
      • Installation
      • Operators guide
      • Update
      • Useful commands
      • Delete
    • Dill
    • Aleo
      • Install
    • Union
      • Install
    • Analog
      • Install
    • Babylon
      • Installation
      • Useful Commands
      • Delete
    • Penumbra
      • Installation
      • Update
      • Useful Commands
      • Delete
    • Fleek (Lightning)
      • Installation
      • Update
      • Useful Commands
    • Farcastr
      • Install
    • 5ire
      • Installation
      • Useful Commands
    • Andromeda
      • Installation
      • Update
      • Snapshot/StateSync/AddrBook
      • Useful Commands
    • Avail
      • Installation (Validator)
      • Update (Validator)
      • Installation (Light node)
      • Update (Light node)
      • Useful Commands
      • Delete
    • Bundlr
      • Installation
      • Useful Commands
    • Cascadia
      • Installation
      • Update
      • Useful Commands
    • Composible
      • Installation
      • Useful Commands
    • DeFund
      • Installation
      • Update
      • StateSync/Snapshot/AddrBook
      • Useful Commands
      • Delete
    • Dymension
      • Installation
      • Update
      • Snapshot/StateSync/AddrBook
      • Useful Commands
    • EmpowerChain
      • Installation
      • Update
      • Useful Commands
      • Task
    • Fleek (Ursa)
      • Installation
      • Update
      • Delete
      • Useful Commands
    • Gear
      • Installation
      • Update
      • Useful Commands
      • Remove
    • Gitopia
      • Installation
      • Update
      • StateSync/Snapshot/AddrBook
      • Useful Commands
    • Holograph
      • Installation
      • Useful Commands
      • Delete
    • Iron Fish
      • Installation
      • Wallet
      • Update
      • Useful Commands
    • Lava
      • Installation (Lava-testnet)
      • Installation (Axelar-testnet+mainnet)
      • Provider
      • Useful Commands
    • Lava Network
      • Installation
      • Update
      • StateSync/Snapshot/AddrBook
      • Useful commands
    • Masa
      • Installation
      • Update
      • Delete
    • Namada
      • Installation
      • Update
      • Delete
    • Nibiru
      • Installation
      • Update
      • SnapShot/StateSync/AddrBook
      • Smart Contract Tasks
      • Useful Commands
    • Nolus
      • Installation
      • Update
      • SnapShot/StateSync/AddrBook
      • Useful Commands
    • OJO
      • Installation
      • Update
      • Snapshot/StateSync/AddrBook
      • Useful Commands
    • Realio
      • Installation
      • Update
      • StateSync/Snapshot/AddrBook
      • Useful Commands
      • Delete
    • SAO
      • Installation
      • Update
      • Snapshot/StateSync/AddrBook
      • Useful Commands
    • StarkNet
      • Installation
      • Update
      • Useful Commands
    • Streamr
      • Installation
    • Subspace / Gemini-3f (Pulsar)
      • Installation
      • Update
      • Useful commands
      • Delete
    • Taiko
      • Installation
      • Update
      • Enable an SGX prover
      • Delete
    • Tangle
      • Installation
      • Useful Commands
      • Delete
    • Sui (Devnet)
      • Installation (Linux)
      • Installation (Docker)
      • Update (Linux)
      • Useful commands
      • Delete (Linux)
      • Delete (Docker)
      • Wallets
    • Sui (Tesnet)
      • Installation (Linux)
      • Useful commands
      • Update (Linux)
      • Delete (Linux)
    • Story
    • Nubit
      • Install (Light Node)
      • Install (Validator Node)
      • Update (Light Node)
    • Waku
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. Archive
  2. Lava

Provider

# Install nginx
sudo apt install nginx
# Install certbot 
sudo apt install certbot net-tools nginx python3-certbot-nginx -y
# Set the variables

# Come up with the name of your node and replace it instead <your_moniker>
DOMEN="<your_domen>"

echo 'export DOMEN='$DOMEN>> $HOME/.bash_profile
source $HOME/.bash_profile
# check whether the last command was executed
# Request a certificate
sudo certbot certonly --nginx -d $DOMEN -d $DOMEN
# Configuring nginx:
tee /etc/nginx/conf.d/lava.conf > /dev/null << EOF
server {
listen 443 ssl http2;
server_name $DOMEN;

    ssl_certificate "/etc/letsencrypt/live/$DOMEN/fullchain.pem";
    ssl_certificate_key "/etc/letsencrypt/live/$DOMEN/privkey.pem";
    error_log /var/log/nginx/debug.log debug;

    location / {
        proxy_pass http://127.0.0.1:2223;
        grpc_pass 127.0.0.1:2223;
    }
}
EOF
sudo systemctl restart nginx
# Create a provider config
LAVA_RPC=$(cat $HOME/.lava/config/config.toml | sed -n '/TCP or UNIX socket address for the RPC server to listen on/{n;p;}' | sed 's/.*://; s/".*//')
LAVA_GRPC=$(cat $HOME/.lava/config/app.toml | sed -n '/Address defines the gRPC server address to bind to/{n;p;}' | sed 's/.*://; s/".*//')
LAVA_API=$(cat $HOME/.lava/config/app.toml | sed -n '/Address defines the API server to listen on./{n;p;}' | sed 's/.*://; s/".*//')

AXELART_RPC=$(cat $HOME/.axelar_testnet/config/config.toml | sed -n '/TCP or UNIX socket address for the RPC server to listen on/{n;p;}' | sed 's/.*://; s/".*//')
AXELART_GRPC=$(cat $HOME/.axelar_testnet/config/app.toml | sed -n '/Address defines the gRPC server address to bind to/{n;p;}' | sed 's/.*://; s/".*//')
AXELART_API=$(cat $HOME/.axelar_testnet/config/app.toml | sed -n '/Address defines the API server to listen on./{n;p;}' | sed 's/.*://; s/".*//')

AXELAR_RPC=$(cat $HOME/.axelar_mainnet/config/config.toml | sed -n '/TCP or UNIX socket address for the RPC server to listen on/{n;p;}' | sed 's/.*://; s/".*//')
AXELAR_GRPC=$(cat $HOME/.axelar_mainnet/config/app.toml | sed -n '/Address defines the gRPC server address to bind to/{n;p;}' | sed 's/.*://; s/".*//')
AXELAR_API=$(cat $HOME/.axelar_mainnet/config/app.toml | sed -n '/Address defines the API server to listen on./{n;p;}' | sed 's/.*://; s/".*//')

echo "LAVA_RPC:"$LAVA_RPC "LAVA_GRPC:"$LAVA_GRPC "LAVA_API:"$LAVA_API
echo "AXELART_RPC:"$AXELART_RPC "AXELART_GRPC:"$AXELART_GRPC "AXELART_API:"$AXELART_API
echo "AXELAR_RPC:"$AXELAR_RPC "AXELAR_GRPC:"$AXELAR_GRPC "AXELAR_API:"$AXELAR_API
mkdir $HOME/config
sudo tee << EOF >/dev/null $HOME/config/lavaprovider.yml
endpoints:
  - api-interface: tendermintrpc
    chain-id: LAV1
    network-address:
      address: 0.0.0.0:2223
      disable-tls: true
    node-urls:
      - url: ws://127.0.0.1:$LAVA_RPC/websocket
      - url: http://127.0.0.1:$LAVA_RPC
  - api-interface: grpc
    chain-id: LAV1
    network-address:
      address: 0.0.0.0:2223
      disable-tls: true
    node-urls:
      url: 127.0.0.1:$LAVA_GRPC
  - api-interface: rest
    chain-id: LAV1
    network-address:
      address: 0.0.0.0:2223
      disable-tls: true
    node-urls:
      url: http://127.0.0.1:$LAVA_API
  - api-interface: tendermintrpc
    chain-id: AXELAR
    network-address:
      address: 0.0.0.0:2223
      disable-tls: true
    node-urls:
      - url: ws://127.0.0.1:$AXELAR_RPC/websocket
      - url: http://127.0.0.1:$AXELAR_RPC
  - api-interface: grpc
    chain-id: AXELAR
    network-address:
      address: 0.0.0.0:2223
      disable-tls: true
    node-urls:
      url: 127.0.0.1:$AXELAR_GRPC
  - api-interface: rest
    chain-id: AXELAR
    network-address:
      address: 0.0.0.0:2223
      disable-tls: true
    node-urls:
      url: http://127.0.0.1:$AXELAR_API
  - api-interface: tendermintrpc
    chain-id: AXELART
    network-address:
      address: 0.0.0.0:2223
      disable-tls: true
    node-urls:
      - url: ws://127.0.0.1:$AXELART_RPC/websocket
      - url: http://127.0.0.1:$AXELART_RPC
  - api-interface: grpc
    chain-id: AXELART
    network-address:
      address: 0.0.0.0:2223
      disable-tls: true
    node-urls:
      url: 127.0.0.1:$AXELART_GRPC
  - api-interface: rest
    chain-id: AXELART
    network-address:
      address: 0.0.0.0:2223
      disable-tls: true
    node-urls:
      url: http://127.0.0.1:$AXELART_API
EOF
# Open ports
ufw allow $LAVA_RPC
ufw allow $LAVA_GRPC
ufw allow $LAVA_API

ufw allow $AXELAR_RPC
ufw allow $AXELAR_GRPC
ufw allow $AXELAR_API

ufw allow $AXELART_RPC
ufw allow $AXELART_GRPC
ufw allow $AXELART_API
# Create a service
tee /etc/systemd/system/lavap.service > /dev/null << EOF
[Unit]
Description=Lava provider
After=network-online.target

[Service]
User=$USER
WorkingDirectory=$HOME/config
ExecStart=$(which lavap) rpcprovider lavaprovider.yml --geolocation 2 --from wallet --chain-id lava-testnet-2 --keyring-backend test
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF
# Start service
sudo systemctl daemon-reload
systemctl enable lavap
sudo systemctl restart lavap && sudo journalctl -u lavap -f --no-hostname -o cat
# Stake
lavap tx pairing stake-provider LAV1 "1000000000ulava" "$DOMEN:443,2" 2 -y --from wallet --provider-moniker "$MONIKER" --gas-prices 0.1ulava --gas-adjustment 1.5 --gas auto -y
lavap tx pairing stake-provider AXELAR "50000000000ulava" "$DOMEN:443,2" 2 -y --from wallet --provider-moniker "$MONIKER" --gas-prices 0.1ulava --gas-adjustment 1.5 --gas auto -y
lavap tx pairing stake-provider AXELART "50000000000ulava" "$DOMEN:443,2" 2 -y --from wallet --provider-moniker "$MONIKER" --gas-prices 0.1ulava --gas-adjustment 1.5 --gas auto -y
# Check provider
lavap test rpcprovider --from wallet
PreviousInstallation (Axelar-testnet+mainnet)NextUseful Commands

Last updated 1 year ago

Was this helpful?