This is an old revision of the document!
wget supweb.synology.com/support_web/kc_tool/how_to_gen_cert_for_kmip_services/gen_kmip_certs.sh
bash gen_kmip_certs.sh kmip_certs
The second parameter kmip_certs is the name of a shared folder the script will create to store the certificates
/volume1/kmip_certs to your local computer you use to access your DSMs through your web browser, after which you can remove the shared folder and it's contentca-key.pem ca.pem client-fullchain.pem client-key.pem client.pem server-fullchain.pem server-key.pem server.pem
server-key.pemserver.pemclient.pemca.pemclient-key.pemclient.pemca.pem and click Next. Wait until you see the connection is successful.reboot shutdown -r now
sudo /usr/syno/sbin/synoencvolume --auto-unlock-get-keys
.rkey recovery file. The system will prompt you to enter a new vault password to recreate and repair the local key vault.sudo lvdisplay
LV Path /dev/vg1/volume_1sudo cryptsetup luksOpen /dev/vg1/volume_1 mapped_volume
.rkey file saved on a USB drive or transferred via SSH to /tmp/volume1.rkey, use:sudo cryptsetup luksOpen /dev/vg1/volume_1 mapped_volume --key-file /tmp/volume1.rkey
sudo mkdir -p /mnt/recovery mount /dev/mapper/mapped_volume /mnt/recovery
/mnt/recovery. You can use command-line tools like cp, rsync, or tar to copy your files off to an external drive or another server..rkey) will download automatically to your computer's default download folderrsync service on your target NAS in Control Panel –> File Services –> rsync on default port 22traceroute to find connectivity issues to your mail server from another computer:sudo traceroute -T -p 5001 your.mailserver.tld
#!/bin/sh # # Copy certificates from web server to NAS, must be run nas root # (c) Bernard Condrau, 2026-08-25: adapted to DSM 7.4 # SERVER="your_webserver_generating_certificates" PORT=22 IDENTITY="/volume1/homes/user/.ssh/id_rsa" # make sure your user can run rsync and cksum as root without password (check visudo) SERVER_RSYNC="sudo rsync" SERVER_CKSUM="sudo cksum" SERVER_CERTDIR="/etc/letsencrypt/live/cloud.condrau.com" # CERTDIR must be hardcoded and is different in every server instance CERTDIR="_archive/"$(sudo cat /usr/syno/etc/certificate/_archive/DEFAULT) CERTROOTDIR="/usr/syno/etc/certificate" PACKAGECERTROOTDIR="/usr/local/etc/certificate" # compare cksums first to decide whether certificates need to be copied REM_PRIV=$(ssh -i $IDENTITY -p $PORT user@$SERVER $SERVER_CKSUM $SERVER_CERTDIR/privkey.pem | cut -d' ' -f 1) LOC_PRIV=$(cksum $CERTROOTDIR/$CERTDIR/privkey.pem | cut -d' ' -f 1) if [[ $LOC_PRIV -ne $REM_PRIV ]]; then # copy certificates from web server sudo rsync -aPLe "ssh -i $IDENTITY -p $PORT" --rsync-path="$SERVER_RSYNC" user@$SERVER:$SERVER_CERTDIR/cert.pem $CERTROOTDIR/$CERTDIR/cert.pem sudo rsync -aPLe "ssh -i $IDENTITY -p $PORT" --rsync-path="$SERVER_RSYNC" user@$SERVER:$SERVER_CERTDIR/fullchain.pem $CERTROOTDIR/$CERTDIR/fullchain.pem sudo rsync -aPLe "ssh -i $IDENTITY -p $PORT" --rsync-path="$SERVER_RSYNC" user@$SERVER:$SERVER_CERTDIR/privkey.pem $CERTROOTDIR/$CERTDIR/privkey.pem sudo rsync -aPLe "ssh -i $IDENTITY -p $PORT" --rsync-path="$SERVER_RSYNC" user@$SERVER:$SERVER_CERTDIR/chain.pem $CERTROOTDIR/$CERTDIR/chain.pem # push the updated archive certificates to the system and restart web services sudo /usr/syno/bin/synow3tool --gen-all sudo /usr/syno/bin/synosystemctl restart nginx echo "certificates updated" else echo "nothing to update" fi exit 0