Managing SSL certs is the bane of my existance. I was also caught out by this unwelcome requirement to expose ports and happen not to be able to workaround it at the moment. So I came up with an alternative. This is heavily inspired by this article.
Note these instructions for the manual DNS method. For the automatic method, which requires that you DNS provider has a compatible API, see the article above or the official references here.
First ssh into the NAS. Any user will do but I think they must be part of the Administrators and HTTP groups. Then run the following, replacing the "your..." placeholders with your own details:
curl https://get.acme.sh | sh -s email=your@email.address --install --force # force to allow install without crontab
cd .acme.sh
./acme.sh --issue -d your.domain.name --dns --yes-I-know-dns-manual-mode-enough-go-ahead-please
Add the TXT record to your DNS records exactly as instructed, make sure it has propogated (eg, try running `dig -t txt _acme-challenge.your.domain.name`), and then run:
./acme.sh --renew -d your.domain.name --yes-I-know-dns-manual-mode-enough-go-ahead-please
export SYNO_Username="your_nas_username"
./acme.sh --deploy -d your.domain.name --deploy-hook synology_dsm
When prompted for the "OTP code" just enter the Synology account password (unless you have 2FA setup, and then I guess do something else?).
Finally, delete the existing "your.domain.name" entry in DSM-->Control Panel-->Security-->Certificate and configure the new one that appears instead.
From then on you should just be able to renew with `./acme.sh --renew -d your.domain.name --server letsencrypt`