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;
}
}
EOFLast updated