6.5.34 Synology NAS

A DSM administrator without 2-factor, service names, and renewals in place

The Synology NAS (DSM) template imports the certificate through the DSM Web API, the same as adding it by hand under Control Panel > Security > Certificate, and assigns it to the services you choose. Each renewal replaces the same certificate, so every service using it moves to the renewal. DSM restarts those services itself.

Requirements

  • A Windows CertKit agent that can reach DSM over HTTPS, on port 5001 unless you changed it.
  • A DSM account in the administrators group that doesn’t use 2-factor authentication. The agent signs in on its own and can’t type a code. A separate account just for CertKit works best.
  • DSM 7.

The agent doesn’t validate the NAS’s own HTTPS certificate when it connects, because a NAS usually still serves its self-signed certificate on the first deployment. Keep the agent and the NAS on a network you trust.

Settings

Setting What to enter
NAS address The address you open DSM at, such as nas.example.com or 192.168.1.20. You can paste it from the browser’s address bar. Add the port if DSM’s HTTPS port isn’t 5001, for example nas.example.com:8443.
DSM username The administrator account for CertKit.
DSM password That account’s password.
Services all, or a comma-separated list of services as DSM names them under Control Panel > Security > Certificate > Settings, for example FTPS, System default, photos.example.com.

Choosing services

With all, the certificate becomes the NAS’s default certificate and takes over every service of the previous default: System default (the DSM web page), FTPS, Synology Drive Server, and the rest. That happens even when the previous default was another CertKit certificate. Once it’s the default, any assignments you change yourself under Certificate > Settings are kept on renewal.

With a list, every deployment assigns exactly those services to the certificate and leaves the other services and the default certificate alone. Names must match DSM’s list. A name that doesn’t match stops the deployment before anything changes, and the error lists the service names the NAS has. Reverse proxy rules appear in that list by hostname.

How renewals find the certificate

CertKit names the certificate in DSM CertKit <name> [<id>], where the part in square brackets is the certificate’s CertKit ID. Renewals find the certificate by that tag, so leave it at the end of the description.

Common problems

  • “Could not reach the DSM Web API”: check the address and port, and that the agent host can reach DSM over HTTPS.
  • “no such account or incorrect password”: check the username and password.
  • “the account has 2-factor authentication enabled”: use an administrator account without 2-factor authentication. If DSM enforces 2-factor for everyone, enforce it for specific users only and leave the CertKit account out.
  • “this IP address is blocked by DSM auto-block”: too many failed sign-ins from the agent host. Remove its address under Control Panel > Security > Protection > Allow/Block List.
  • “this NAS has no service named”: use the names exactly as the error lists them. Nothing was changed.
  • “More than one DSM certificate carries the CertKit tag”: delete the extra certificates in Control Panel > Security > Certificate, then deploy again.
  • “DSM did not assign these services to the certificate”: DSM took the certificate but not every assignment. The next deployment tries again.
  • Warning “No DSM service uses this certificate yet”: the certificate is installed but nothing uses it. Assign it under Certificate > Settings. Renewals keep that assignment.

For a product overview, see certificate automation for Synology NAS.