Secure your NAS with SSL using LetsEncrypt

Create a user in Synology DSM.
Log into your Synology device, click Control Panel, click User & Group, and click Create. I used certadmin as the username and give the user a good description. Make sure the user is a member of the administrators group (this is required for SSH access that we will be using in a moment) and the http group (this is required for the process to authenticate to DSM in the SSH session).

The certadmin user only needs Read/Write access to the homes folder and you can deny access to all applications. NOTE: some other guides do not specify adding the user to the administrators and http groups, this is required! Once the user has been created go back to the Control Panel home and click Terminal & SNMP. Check Enable SSH service and click apply.

Type the following commands:

ssh certadmin@YOURHOSTorIPADDRESS

To create a certificate:

wget -O /tmp/acme.sh.zip https://github.com/acmesh-official/acme.sh/archive/master.zip

sudo 7z x -o/usr/local/share /tmp/acme.sh.zip

sudo mv /usr/local/share/acme.sh-master/ /usr/local/share/acme.sh

sudo chown -R certadmin /usr/local/share/acme.sh/

cd /usr/local/share/acme.sh

Add this if using cloudflare:

export CF_Key="763eac4f1bcebd8b5c95e9fc50d010b4"
export CF_Email="[email protected]"

Add account to ZeroSSL:

./acme.sh --register-account -m [email protected]

Now issue the certificate

./acme.sh --issue --dns dns_cf -d domain.com -d '*.domain.com'

https://github.com/acmesh-official/acme.sh/wiki/Synology-NAS-Guide