# Lensencrypt Certs name change

**URL:** https://forum.syncthing.net/t/lensencrypt-certs-name-change/17566
**Category:** Support
**Created:** [November 5, 2021, 5:07pm UTC](https://forum.syncthing.net/t/lensencrypt-certs-name-change/17566 "2021-11-05T17:07:09Z")
**Posts on this page:** 1
**Showing post:** 38

<div class="post-metadata">

### Author: ![acolomb](https://forum.syncthing.net/user_avatar/forum.syncthing.net/acolomb/32/11343_2.png) [@acolomb](https://forum.syncthing.net/u/acolomb)
#### Post date: [January 6, 2022, 1:41pm UTC](https://forum.syncthing.net/t/lensencrypt-certs-name-change/17566/38 "2022-01-06T13:41:19Z")

</div>

In my experience, it’s easiest to save the script in your admin user’s `$HOME` directory. Just enter the `cat` command right after logging in through SSH, then you are already in the correct directory. No need to use `sudo` for becoming root before saving or executing the script. The relevant commands already have `sudo` prepended so all you have to do is enter your admin password when asked during execution.

Here is a new script version, with correct formatting:

```
SYSTEM_CERT_DIR=/usr/syno/etc/certificate/system/default
SYNCTHING_CONF_DIR=/var/packages/syncthing/var
# Before DSM 7.0, use the following instead:
#SYNCTHING_CONF_DIR=/var/packages/syncthing/target/var

SYNCTHING_USER=sc-syncthing
SYNCTHING_GROUP=syncthing

API_KEY=InsertYourAPIKeyHere

sudo cp -v --preserve=timestamps ${SYSTEM_CERT_DIR}/cert.pem ${SYNCTHING_CONF_DIR}/https-cert.pem
sudo cp -v --preserve=timestamps ${SYSTEM_CERT_DIR}/privkey.pem ${SYNCTHING_CONF_DIR}/https-key.pem
sudo chmod 664 ${SYNCTHING_CONF_DIR}/https-cert.pem
sudo chmod 600 ${SYNCTHING_CONF_DIR}/https-key.pem
sudo chown ${SYNCTHING_USER}:${SYNCTHING_GROUP} ${SYNCTHING_CONF_DIR}/https-cert.pem
sudo chown ${SYNCTHING_USER}:${SYNCTHING_GROUP} ${SYNCTHING_CONF_DIR}/https-key.pem

sudo ls -l ${SYNCTHING_CONF_DIR}

curl -k -X POST -H "X-API-Key: ${API_KEY}" https://localhost:8384/rest/system/restart

```

@halteach could you please try to use code formatting when pasting scripts or commands? Discourse almost certainly breaks the content otherwise, so it won’t work when copy-pasted.

---

_[View the full topic](https://forum.syncthing.net/t/lensencrypt-certs-name-change/17566)._
