Lava Provider Setup
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.
Setup Domain
Modify DNS settings
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.
Configure Nginx
Install dependencies
Generate Certificate
Use certbot
to create a certificate:
Validate 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.
Add an Nginx Config for Each Domain
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:
Test Nginx Configuration
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
Restart Nginx
You will need to refresh the Nginx server:
Secure NGINX With Let’s Encrypt
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.
Install Lavap
Since you are already running a node, you just need to configure the lavap
service.
This will install v2.2.2 of lavap.
Create the Provider Configuration
Copy and run the following to generate a lavaprovider.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.
Where to find ports?
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)
Create Lavap Service
Note:
Set the geolocation value depending on where your server is located.
Start the Provider
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.
Stake the Provider on Chain
Use a variation of the following command to stake on chain; the minimum stake is 5000000000ulava or 5,000 LAVA
Some notes:
[validator]
you need to indicate a validator address, choose here: https://lava.explorers.guru/validators--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
Congratulations, your LAVA Provider is now up and running.
Updating Lava 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.
Addtiional Commands
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!
Last updated