Skip to content

Commit 971df0f

Browse files
authored
Enhance SSL certificate renewal instructions
Added instructions for configuring automatic renewal of SSL certificates using certbot and systemd timer to replace outdated crontab instructions
1 parent 8aaca2d commit 971df0f

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

tutorials/creating_ssl_certificates.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,17 @@ certbot -d example.com --manual --preferred-challenges dns certonly
5353

5454
### Auto Renewal
5555

56-
You'll also probably want to configure the automatic renewal of certificates to prevent unexpected certificate expirations.
57-
You can open crontab with `sudo crontab -e` and add the line from below to the bottom of it for attempting renewal every day at 23 (11 PM).
56+
Certbot installs a systemd timer (certbot.timer) by default.
57+
Verify it is enabled:
5858

59-
Deploy hook would restart the Nginx service to apply a new certificate when it's renewed successfully. Change `nginx` in the restart command to suit your own needs, such as to `apache` or `wings`.
59+
```bash
60+
systemctl status certbot.timer
61+
```
6062

61-
For advanced users, we suggest installing and using [acme.sh](https://acme.sh)
62-
which provides more options, and is much more powerful than certbot.
63+
If it is not enabled:
6364

64-
``` text
65-
0 23 * * * certbot renew --quiet --deploy-hook "systemctl restart nginx"
65+
```bash
66+
systemctl enable --now certbot.timer
6667
```
6768

6869
### Troubleshooting

0 commit comments

Comments
 (0)