SSL Certificate from Lets encrypt

Hello, someone help me on how to get an ssl certificate from lets encrypt for cnmaestro. i tried and failed.

This is my sanitized command line way of doing this. change domain.com for your domain.

When you go to upgrade cnmaestro, you have to move the old certs back, then go through this process again otherwise the upgrade will fail.

root@cnmaestro:~# history
1 cd /srv/storage/nginx/
2 ls
3 cd ssl/
4 ls
5 l s-l
6 ls -l
7 apt-get install python-certbot-nginx
8 apt update
9 apt-get install python3-certbot-nginx
10 certbot --nginx -d cnmaestro.domain.com
11 ls
12 cd old/
13 mkdir …/certbot
14 mv …/nginx.* …/certbot/
15 cp -r nginx.* …/
16 ls
17 certbot --nginx -d cnmaestro.domain.com
18 ls
19 cd …
20 ls
21 ls old/
22 ls
23 rm -rf nginx.crt
24 rm -rf nginx.key
25 cp certbot/* ./
26 ls -l
27 rm -rf nginx.crt
28 rm -rf nginx.key
29 ln -s /etc/letsencrypt/live/cnmaestro.domain.com/cert.pem ./nginx.crt
30 ln -s /etc/letsencrypt/live/cnmaestro.domain.com/privkey.pem ./nginx.key
31 ls -l
32 reboot

3 Likes