ubuntu:certificates:let_s_encrypt_certificates
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
ubuntu:certificates:let_s_encrypt_certificates [2020/05/19 09:33] – [Config Files] peter | ubuntu:certificates:let_s_encrypt_certificates [2021/07/05 08:52] (current) – peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Ubuntu - Certificates - Let's Encrypt Certificates ====== | ====== Ubuntu - Certificates - Let's Encrypt Certificates ====== | ||
+ | |||
+ | ---- | ||
+ | |||
+ | [[Ubuntu: | ||
+ | |||
+ | ---- | ||
Install the Let's Encrypt client, certbot: | Install the Let's Encrypt client, certbot: | ||
Line 14: | Line 20: | ||
</ | </ | ||
+ | * This command will obtain a single cert for example.com, | ||
<WRAP info> | <WRAP info> | ||
Line 25: | Line 32: | ||
</ | </ | ||
- | |||
- | This command will obtain a single cert for example.com, | ||
<WRAP info> | <WRAP info> | ||
Line 35: | Line 40: | ||
- | + | <WRAP info> | |
- | + | **NOTE: | |
- | To obtain a cert using a built-in “standalone” webserver (you may need to temporarily stop your existing webserver, if any) for example.com and www.example.com: | + | |
<code bash> | <code bash> | ||
Line 43: | Line 47: | ||
</ | </ | ||
+ | </ | ||
+ | |||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | </ | ||
- | The Let's Encrypt client creates a temporary file in webroot-path/ | ||
---- | ---- | ||
Line 85: | Line 94: | ||
</ | </ | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Generate your first cert ===== | ||
+ | |||
+ | To generate your first cert, open a shell and execute the letsencrypt-auto script | ||
+ | |||
+ | <code bash> | ||
+ | # cd / | ||
+ | # ./ | ||
+ | Updating letsencrypt and virtual environment dependencies....... | ||
+ | Running with virtualenv: / | ||
+ | |||
+ | IMPORTANT NOTES: | ||
+ | - Congratulations! Your certificate and chain have been saved at | ||
+ | / | ||
+ | | ||
+ | the future, simply run Let's Encrypt again. | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
</ | </ | ||
Line 144: | Line 176: | ||
===== Automating renewal ===== | ===== Automating renewal ===== | ||
- | The Certbot packages on your system come with a cron job that will renew your certificates automatically before they expire. Since Let's Encrypt certificates last for 90 days, it's highly advisable to take advantage of this feature. | + | The Certbot packages on your system come with a cron job that will renew your certificates automatically before they expire. |
+ | |||
+ | Since Let's Encrypt certificates last for 90 days, it's highly advisable to take advantage of this feature. | ||
+ | |||
+ | You can test automatic renewal for your certificates by running this command: | ||
<code bash> | <code bash> | ||
Line 164: | Line 200: | ||
done | done | ||
- | **TODO:** Check if letsencrypt-auto is now certbot-auto. | + | <WRAP todo> |
+ | **TODO:** Check if letsencrypt-auto is now certbot-auto. | ||
+ | </ | ||
+ | |||
# make sure nginx picks them up | # make sure nginx picks them up | ||
Line 237: | Line 276: | ||
IMPORTANT: | IMPORTANT: | ||
</ | </ | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== To Renew manually ===== | ||
+ | |||
+ | |||
+ | <code bash> | ||
+ | letsencrypt certonly --webroot -w / | ||
+ | </ | ||
ubuntu/certificates/let_s_encrypt_certificates.1589880780.txt.gz · Last modified: 2020/07/15 09:30 (external edit)