Skip to content

Instantly share code, notes, and snippets.

@catchdave
Last active July 12, 2025 17:11
Show Gist options
  • Select an option

  • Save catchdave/69854624a21ac75194706ec20ca61327 to your computer and use it in GitHub Desktop.

Select an option

Save catchdave/69854624a21ac75194706ec20ca61327 to your computer and use it in GitHub Desktop.
CLI script to programmatically replace SSL certs on Synology NAS
# MOVED to public repo: https://github.com/catchdave/ssl-certs/blob/main/replace_synology_ssl_certs.sh
@xlionjuan
Copy link

It is such a pain to restart Nginx on my NAS, because it also restarted so many packages including Container manager, I have massive containers, so it will took 10+ minutes to perform all the things, hope there is a way to only let Nginx reload the certs just like you manually updated a certificate and the procedure that it said "Restarting web server".

@telnetdoogie
Copy link

It is such a pain to restart Nginx on my NAS, because it also restarted so many packages including Container manager, I have massive containers, so it will took 10+ minutes to perform all the things, hope there is a way to only let Nginx reload the certs just like you manually updated a certificate and the procedure that it said "Restarting web server".

/usr/syno/bin/synow3tool --nginx=reload will reload NGINX and take care of most things, and it's very fast.

However, depending on packages you have installed, it won't always regenerate new certs where they're needed. YMMV.

@xlionjuan
Copy link

/usr/syno/bin/synow3tool --nginx=reload will reload NGINX and take care of most things, and it's very fast.

It do nothing for me unfortunately, I went to Lego ACME + custom script just for better ACME supports like ARI or profiles

Now I have to went back to use acme.sh again, because its deploy hook is using Syno's API to replace the certificates, which will make system reload the certificate without any problem or downtimes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment