Skip to main content

Lava

Run the node

image

Before start install Lava provider, you must ensure you have:

  • Your own domain (If yet buy one: namecheap
  • Lava node running
  • Lavap binaries installed

Step 1: Setup A record for your domain

Go to DNS setting:
  • Create A record: Host = LAVA; Value = Your server public IP. image

Step 2: Install Required Dependencies

sudo apt update
sudo apt install certbot net-tools nginx python3-certbot-nginx -y

Step 3: Generate Certificate

sudo certbot certonly -d yourdomain.com -d LAVA.yourdomain.com

Select 1 for Nginx Web Server Plugin

Enter your valid email

Step 4: Validate Certificate

sudo certbot certificates

image

Step 5: Create Nginx server

cd /etc/nginx/sites-available/
sudo nano lava_server

Copy & Paste

server {
listen 443 ssl http2;
server_name lava.your-domain.com;

ssl_certificate /etc/letsencrypt/live/your-domain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/your-domain.com/privkey.pem;
error_log /var/log/nginx/debug.log debug;

location / {
proxy_pass http://127.0.0.1:2224;
grpc_pass 127.0.0.1:2224;
}
}
sudo ln -s /etc/nginx/sites-available/lava_server /etc/nginx/sites-enabled/lava_server

Step 7: Test Nginx Configuration

sudo nginx -t

Expected result

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

Step 8: Run Nginx

sudo systemctl restart nginx

Step 9: Create Docker file

cd ~/lava/config
nano lava-provider.yml

Copy & Paste

endpoints:
- api-interface: tendermintrpc
chain-id: LAV1
network-address:
address: 127.0.0.1:2224
disable-tls: true
node-urls:
- url: ws://127.0.0.1:26657/websocket
- url: http://127.0.0.1:26657
- api-interface: grpc
chain-id: LAV1
network-address:
address: 127.0.0.1:2224
disable-tls: true
node-urls:
url: 127.0.0.1:9090
- api-interface: rest
chain-id: LAV1
network-address:
address: 127.0.0.1:2224
disable-tls: true
node-urls:
url: http://127.0.0.1:1317

Step 10: Create reward storage

mkdir /root/.lava/config/reward/ 

Step 10: Run Docker

screen -S lava-provider
lavap rpcprovider lava-provider.yml --from Adam_VNBnode  --geolocation 1 --chain-id lava-testnet-2 --reward-server-storage /root/.lava/config/reward/ --log_level debug

Expected result image

Step 11: Test RPC provider

lavap test rpcprovider --from $MONIKER  --endpoints "lava.your-domain.com:443,LAV1"

Expected result image

Step 12: Stake the Provider on Chain

Make sure your wallet have enough token lava

lavap tx pairing stake-provider LAV1 "50000000000ulava" "lava.your-domain.com:443,1" 1 --from $MONIKER --provider-moniker $MONIKER --keyring-backend "test" --chain-id "lava-testnet-2" --gas="auto" --gas-adjustment "1.5" --gas "auto" --gas-prices "0.0001ulava"

Step 13: Test RPC provider again

lavap test rpcprovider --from $MONIKER  --endpoints "lava.your-domain.com:443,LAV1"

Step 14: Check the status of RPC provider

https://info.lavanet.xyz/provider/ Enter your wallet address & Enjoy

Thank to support VNBnode.

Visit us at: