Lava Provider Setup
Last updated
Last updated
All providers on lava-mainnet-1
must use a domain name and TLS (1.3). You must have a domain name to continue. If you have not already, please take a moment to purchase one! You can find cheap top-level domains here or here.
The first step of establishing your Provider is to modify some of the DNS settings on the domain you purchased. In specific, you'll need to change the A Records on your domain.
Generate Certificate
Use certbot
to create a certificate:
Note: ✅ your-site.com
refers to the Domain name that you purchased and configured.
Let's make sure your certificate successfully installed! ✅ Input the following command:
Keep track of your output. If your certificate generation was successful, it should look as following:
Found the following certs: Certificate Name: your-site.com Domains: your-site.com eth.your-site.com lava.your-site.com Expiry Date: 2023-11-07 14:37:29+00:00 (VALID: 84 days) Certificate Path: /etc/letsencrypt/live/your-site.com/fullchain.pem Private Key Path: /etc/letsencrypt/live/your-site.com/privkey.pem
You'll need both Certificate Path
and Private Key Path
for your next step.
Note: ✅ your-site.com
refers to the Domain name that you purchased and configured.
Lava recommends running each chain under a separate provider process. This will separate error logs and protect against complete provider failure in the case of a problematic provider process. The first step of this is to create different nginx routes for each chain.
For each chain that you want to support, you will need to create a separate nginx
config file. cd
into /etc/nginx/sites-available/
and create a server
file for each chain. You will need to select an open port for each chain. Nginx
will use these config files to create your routes.
Create the server file. For this guide, we will focus on lava_server
Copy and paste the text below. Save your lava_server
file.
In most cases, after creating a configuration file in accessible sites, you need to create a symbolic link to this file in the enabled sites directory. This can be done with a command like:
Now, ensure that your nginx
setup is working! ✅
🖳 Expected Output:
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
You will need to refresh the Nginx server:
Steps were taken here:
https://www.kamatera.com/knowledgebase/how-to-secure-nginx-with-lets-encrypt/
Run the following commands:
Test auto renewal
Visit your site on HTTPS to check. Open a browser and then type https://your-site.com
If it shows a padlock or something like this then you are good to go.
Since you are already running a node, you just need to configure the lavap
service.
This will install v3.1.0 of lavap.
Copy and run the following to generate a lava.yml file in your /config folder.
The port numbers will be automatically added based on your node configuration. The RPC port will use 26657. You can change this to any port. Just make sure you use the same port you have configured for your domain.
You can find the following port numbers on the config.toml
and app.toml
files located at ./lava/config
folder.
Tendermint RPC
GRPC
Rest (API)
Set the geolocation value depending on where your server is located.
To start the Lava provider process, run the following command
Test the Provider Process!
Run the following command:
🖳 Expected output:
❗ Make sure the tests are all passed before you stake your tokens.
Use a variation of the following command to stake on chain; the minimum stake is 5000000000ulava or 5,000 LAVA
Example:
lavap tx pairing stake-provider LAVA "5000000000ulava" "lava.z4ch.xyz:443,2" 2 lava@valoper1amkaaut9fs395v3vpuymp6zmggva32mkkvr7rq --from z4ch --provider-moniker "zwei node" --delegate-limit "1000000000000ulava" --gas-prices 0.1ulava --gas-adjustment 1.5 --gas auto -y
Some notes:
[validator]
you need to indicate a validator address, choose here: https://lava.explorers.guru/validators
[2]
replace this with the corresponding geolocation of your server
--from
should be followed by the key name of your funded account that you will use to stake your provider
--provider-moniker
will be the name of your provider
Since you are running lavap
without lavavisor
if there are updates necessary, you would have to manually run an update. Here are the steps to do so.
Close all running Provider process CTRL+C
Delete the current lava
folder and download the most recent version. Check the latest release available.
Build the lavap
binaries.
Check lavap
version
Run Test to confirm. Then if all test passed, run Provider process.
Modify Provider
Get Provider Details
Get Provider Rewards
❗ If you have any further issues, do not hesitate to venture to our discord where you can get better assistance!