If you haven’t installed the acme.sh tools on your Synology yet, check out this post first.
If you have, then the next part might be of interest to you!
On DSM 6.x it’s not possible to use cron tasks, so you’ll have to use the DSM’s Task Scheduler, which does essentially the same.
Open your Control Panel and go to the Task Scheduler item under System.
Create a new User-defined task:
Configuring General task settings:
Enter an identifiable Task name, leave the User as root:
Configuring the task Schedule:
I let the task run weekly, because I think that will cause the certificate to renew on time, but the default setting is to run the task daily.
Configure it to your own preference (keep in mind though that Let’s Encrypt certificates need to be renewed every 3 months.
Configuring the actual command to run:
The last tab contains the actual command to run. You can choose to be notified by email on every execution of the task, or when it terminates abnormally.
In which case you might need to do this manually for some reason.
Assuming you installed acme.sh as root, the following command will renew the certificate when needed:
/usr/local/share/acme.sh/acme.sh --cron --home /usr/local/share/acme.sh
Note that the path in the screenshot is incorrect.
This script will also restart the DSM webserver, so if everything goes well you should never have to look at this again!
Enjoy your free SSL certificate.