How to install Let’s Encrypt on Ubuntu

Installing Lets Encrypt on your apache web server will add the https to your connection to your webserver.

NOTE: Before you install Lets Encrpyt, you need to have valid hostnames.  So yourowndomain.com or your.domain.com. When you ordered your VPS it may have asked you for a hostname.  If you typed in a valid hostname you can skip this steps below.  If not, you need to get a domain and then update your server and use your desired hostname.

sudo nano /etc/hostname
sudo nano /etc/hosts
systemctl restart systemd-logind.service

You can skip the steps above and log into your VPS control panel, and update the hostname here.  Then rebuild/reinstall Ubuntu an your hostname will get update.  Only rebuild if you have no data, or any data you do not need as it will wipe your server install.

To quickly install it,  log into your linix VPS amd copy/paste command bellow.

cd /home && wget https://tradingbot.ca/scripts/apache/letsencrypt && sh letsencrypt

If you want to manually install it copy/paste the comands below one at a time and press enter after each one

apt install software-properties-common python-software-properties -y
add-apt-repository ppa:certbot/certbot -y
apt update && apt upgrade -y
apt install python-certbot-apache -y
certbot –apache –register-unsafely-without-email -d $(hostname -f)
echo 0 0 1 * * ‘/usr/bin/letsencrypt renew /var/log/letsencrypt-renew.log’ >> /etc/crontab
service cron restart