cat</etc/systemd/system/certbot-renew.service [Unit] Description=Renew Let's Encrypt certificates service [Service] Type=oneshot ExecStart=/usr/bin/certbot renew --post-hook "/usr/bin/systemctl reload nginx" --quiet #ExecStart=/usr/bin/certbot renew --standalone --pre-hook "/usr/bin/systemctl stop nginx" --post-hook "/usr/bin/systemctl start nginx" --quiet EOF cat</etc/systemd/system/certbot-renew.timer [Unit] Description=Renew Let's Encrypt certificates timer [Timer] #Every year, month and day at 18 and 4 OnCalendar=*-*-* 04,18:36:28 Persistent=true [Install] WantedBy=multi-user.target EOF systemctl enable certbot-renew.timer systemctl start certbot-renew.timer # To check: # systemctl list-timers