नमस्ते 🙏
Free free free 🤩 🥳
Run following command to install free certificate on apache2 server.
Run this command to update existing packages.
sudo apt update
Run this command to install certbot, which provides free certificate for 1 year.
sudo apt install certbot python3-certbot-apache
After successfully installation run this command to get free ssl
sudo certbot --apache
After, enter an email address to get notification when your ssl is about to expire.
Agree to their terms and condition.
Enter your domain where you wants to install ssl.
Congratulations! You have successfully installed free certificate on your domain.
Verifying Certbot Auto-Renewal
To auto renewal run following commands:
sudo systemctl status certbot.timer
Your output will be similar to the following:
Output
● certbot.timer - Run certbot twice daily
Loaded: loaded (/lib/systemd/system/certbot.timer; enabled; vendor preset:>
Active: active (waiting) since Mon 2022-04-11 20:52:46 UTC; 4min 3s ago
Trigger: Tue 2022-04-12 00:56:55 UTC; 4h 0min left
Triggers: ● certbot.service
Apr 11 20:52:46 jammy-encrypt systemd[1]: Started Run certbot twice daily.
To test the renewal process, you can do a dry run with certbot:
sudo certbot renew --dry-run
Output
Saving debug log to /var/log/letsencrypt/letsencrypt.log
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Processing /etc/letsencrypt/renewal/your_domain.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Account registered.
Simulating renewal of an existing certificate for your_domain and www.your_domain.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations, all simulated renewals succeeded:
/etc/letsencrypt/live/your_domain/fullchain.pem (success)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you don’t receive any errors, you’re all set. When necessary, Certbot will renew your certificates and reload Apache to pick up the changes. If the automated renewal process ever fails, Let’s Encrypt will send a message to the email you specified, warning you when your certificate is about to expire.
Top comments (1)
Thanks a lot for sharing. Useful.