
Lets encrypt! How to create free SSL certificates on Ubunto
Luigi Laezza
- cd /usr/local/sbin
- sudo wget https://dl.eff.org/certbot-auto
We should have a copy in the /usr/local/sbin directory.
- sudo chmod a+x /usr/local/sbin/certbot-auto
CREATE THE SSL CERTIFICATE
- certbot-auto --apache -d example.com
- certbot-auto --apache -d example.com -d www.example.com
https://www.ssllabs.com/ssltest/analyze.html?d=example.com&latest
You should now be able to access your website using a https prefix.
certbot-auto renew
Because we recently installed the certificate, the command will only check for the expiration date and print a message informing us that the certificate is not due to renewal yet. The output should look similar to this:
Checking for new version... Requesting root privileges to run letsencrypt... /home/sammy/.local/share/letsencrypt/bin/letsencrypt renew Processing /etc/letsencrypt/renewal/example.com.conf The following certs are not due for renewal yet: /etc/letsencrypt/live/example.com/fullchain.pem (skipped) No renewals were attempted.
Notice that if you created a bundled certificate with multiple domains, only the base domain name will be shown in the output, but the renewal should be valid for all domains included in this certificate.
- sudo crontab -e
30 2 * * 1 /usr/local/sbin/certbot-auto renew >> /var/log/le-renew.log
Save and exit. This will create a new cron job that will execute the letsencrypt-auto-renew command every Monday at 2:30 am. The output produced by the command will be piped to a log file located at /var/log/le-renewal.log.
Related Articles

Filtering User Input: Safeguarding Your Textbox from Unwanted Characters framework
By Luigi Laezza

Unlocking the Potential of No-Code and Low-Code Platforms for Entrepreneurs framework
By Luigi Laezza

Mastering Laravel Email: Configuration and Command-Line Testing
By Luigi Laezza

Unlocking the Potential of AI with No-Code and Low-Code Platforms framework
By Luigi Laezza

Integrating Facebook and Instagram APIs with Meta: A Guide to Enhance Your Brand's Social Media Strategy framework
By Luigi Laezza

Selbstbedienungskassen: Die Zukunft des Einkaufens mit maßgeschneiderter Software framework
By Luigi Laezza

Mastering Laravel: Your Comprehensive Guide to Web Development framework
By Luigi Laezza

Introduction to Laravel framework
By Luigi Laezza