Synology DSM
DSM's certificate wizard only knows Let's Encrypt and requires the NAS to be reachable from the Internet. acme.sh, installed on the NAS, obtains the certificate from local-cert and installs it in DSM with its synology_dsm hook.
| Value | Where to find it | In this guide |
|---|---|---|
| ACME directory | fixed for each instance | https://certs.example.com/acme/directory |
| Key ID (kid) | Keys & access → EAB credentials | eab_XXXXXXXXXXXXXXXX |
| HMAC key | shown only once, at creation | CLE_HMAC |
1. Prepare the NAS
- Control Panel → Terminal & SNMP → enable SSH.
- Connect over SSH with an administrator account, then
sudo -i.
install acme.sh outside the system volume
mkdir -p /usr/local/share/acme.sh/webroot
cd /tmp && wget -O acme.sh.tar.gz https://github.com/acmesh-official/acme.sh/archive/master.tar.gz
tar xzf acme.sh.tar.gz && cd acme.sh-master
./acme.sh --install --nocron --home /usr/local/share/acme.sh -m ops@example.com
cd /usr/local/share/acme.sh2. Account and issuance
acme.sh
./acme.sh --register-account --server https://certs.example.com/acme/directory \
--eab-kid eab_XXXXXXXXXXXXXXXX --eab-hmac-key CLE_HMAC
./acme.sh --issue --server https://certs.example.com/acme/directory \
-d nas.home.example.com -w /usr/local/share/acme.sh/webrootThe webroot folder stays empty and is served by nothing: local-cert never reads the challenge. The NAS needs no open port.
3. Install in DSM
acme.sh — synology_dsm hook
export SYNO_SCHEME=http
export SYNO_HOSTNAME=localhost
export SYNO_PORT=5000
export SYNO_USERNAME='an-admin-account'
export SYNO_PASSWORD='its-password'
export SYNO_CERTIFICATE='local-cert' # certificate description in DSM
export SYNO_CREATE=1 # create it if it doesn't exist
./acme.sh --deploy -d nas.home.example.com --deploy-hook synology_dsmThe certificate appears in Control Panel → Security → Certificate. Assign it to the services you want with Settings.
4. Renewal
Control Panel → Task Scheduler → Create → Scheduled Task → User-defined script, user root, every day:
script
/usr/local/share/acme.sh/acme.sh --cron --home /usr/local/share/acme.shacme.sh only renews as expiry approaches, then replays the deployment into DSM with the remembered settings.