# SSL CertBot with Lets Encrypt

This runs using "snap". You will need to install that first (if you don't have it already).

See if you have snap  
 ``snap`` or ``snap -v``

### **1. If you don't have snapd installed**  


Install it.   
if you can't, [go to this page. ](https://wiki.danicus.net/books/ssl/page/step-by-step-fix-for-installing-snapd-on-linux-mint "Step-by-Step Fix for Installing snapd on Linux Mint")

#### 1.5 Go here to follow a the process of installing certbot on your own. 

They keep this updated.

Install a certificate bot REPO for "lets encrypt"  
 Go to: [https://certbot.eff.org/lets-encrypt/](https://certbot.eff.org/lets-encrypt/)

### **2. Or... follow these steps.**

### Certbot : Auto SSL certifications. 

If, you are installing in linux dabian based.

Make sure Certbot is not installed first:

```bash
sudo apt-get remove certbot
```

##### Install Certbot

Run this command on the command line on the machine to install Certbot.

```bash
sudo snap install --classic certbot
```

##### Prepare the Certbot command

Execute the following instruction on the command line on the machine to ensure that the `certbot` command can be run.

```bash
sudo ln -s /snap/bin/certbot /usr/bin/certbot
```

##### Run Certbot

Run this command to get a certificate and have Certbot edit your nginx configuration automatically to serve it, turning on HTTPS access in a single step.

```bash
sudo certbot --nginx
```

##### Test automatic renewal

The Certbot packages on your system come with a cron job or systemd timer that will renew your certificates automatically before they expire. You will not need to run Certbot again, unless you change your configuration. You can test automatic renewal for your certificates by running this command:

```bash
sudo certbot renew --dry-run
```

If you get no errors... your done! Woot woot!

#####   
To renew certs you already have:

Run Auto Cert

```bash
sudo certbot --nginx
```

   
Test Automatic renewal

```bash
sudo certbot renew --dry-run
```