Use the following commands to install certbot including it's dependencies. Use the first command if you are using nginx and the second for apache
nginx and apache server
To run certbot and create the SSL certificate for your application, use the command shown below to create the certificate for an application running under a nginx server. Use the second command if your application is running apache
Run cerbot for nginx or apache
Enter the email address when prompted. After which you will be asked if you would like to share your email address and force http connections to be redirected through https.
If your certificate does not automatically renew, you can do so manually. Use the following command to renew the ssl certificate. The command below will renew all ssl certificates. Keep in mind you will only be allowed to renew a certificate that has less then 30 days to expire.
Renew certificate
If you have multiple certificates for different domains, but you only want to renew a certificate for a specific domain, use the following command. For multiple domains, use the second command, separating each domain by a comma.
Renew a single certificate or multiple
To verify the certificate was renewed, use the following command. If the command returns no errors, the renewal was successful.
Confirm the renewal was successfull
Before preceeding, ensure the certificate has been renewed without any errors.
Update certificate
Use the command below to update the certificate as changes have been made to the applications configuration.
If you have multiple certificates to update, use the command below. Each domain name will require the -d flag and are seporated by a single space.
Update certificates
Use the command below to update the certificate for multiple domains if changes have been made to the applications configurations.
the --force-renewal option is not required, but considered to be a saftey measure. This will force certbot to issue a new certificate even if the current one is still valid.