Skip to content

Using systemd units instead of cron

CharlieYu edited this page Jan 11, 2021 · 10 revisions

1. Create a systemd unit for


Description=Renew Let's Encrypt certificates using

# --home's argument should be where the script resides.
ExecStart=/path/to/ --cron --home /path/to/

SuccessExitStatus=0 2

2. Test that it works before creating the timer:

sudo systemctl daemon-reload
sudo systemctl start acme_letsencrypt

3. Create systemd timer unit for the service above:


Description=Daily renewal of Let's Encrypt's certificates



4. Enable timer:

sudo systemctl start acme_letsencrypt.timer
sudo systemctl enable acme_letsencrypt.timer