Let's Encrypt
# Install Snap & Certbot
Install EPEL repository
sudo dnf install -y epel-releaseInstall Snap service
sudo dnf install -y snapdEnable and start Snap service
sudo systemctl enable --now snapd.socketCreate shortcut
sudo ln -s /var/lib/snapd/snap /snapInstall certbot
sudo snap install --classic certbotCreate shortcut
sudo ln -s /snap/bin/certbot /usr/bin/certbotInstall mod_ssl
sudo dnf install -y mod_sslGenerate SSL
sudo openssl req -new -x509 -days 365 -nodes -out /etc/pki/tls/certs/localhost.crt -keyout /etc/pki/tls/private/localhost.keyRun Certbot
sudo certbotRestart httpd service
sudo systemctl restart httpdAdd service to Firewall
sudo firewall-cmd --permanent --add-service=httpsReload Firewall service
sudo firewall-cmd --reload# Auto renew SSL
Create Crontab
sudo crontab -eCrontab content
# Run at 3AM on the 1st of every month
0 3 1 * * /usr/bin/certbot renew --quiet --deploy-hook "systemctl reload httpd && systemctl reload dovecot"