Updated Synology NAS Guide (markdown)

master
Scruel Tao 2024-02-26 06:44:43 +08:00
parent 1730640ceb
commit 3991cce921
1 changed files with 5 additions and 6 deletions

@ -63,12 +63,12 @@ We will use the [Synology DSM deployhook](https://github.com/acmesh-official/acm
If you installed `acme.sh` in DSM, we recommend you to try automatic temp user auth method to deploy (DSM should already have required built-in tools, we will let you know if not):
```sh
export SYNO_USE_TEMP_ADMIN=1
export SYNO_UseTempAdmin=1
./acme.sh --deploy --home . -d "$CERT_DOMAIN" --deploy-hook synology_dsm
```
Notice: the temp admin user should be automatically deleted after execution, if the script unexpectedly stopped while running (e.g., abort by pressing "Ctrl+C"), it may remain if it has already been created, in this case, you can safely delete it via Control panel.
#### (Default) Deploy with existing admin user
#### Deploy with existing admin user
If you prefer to deploy with existing admin user or if the above way is not available (e.g., installed in docker), you need to provide your own credentials:
```sh
# Single quotes prevents some escaping issues if your password or username contains certain special characters
@ -77,10 +77,10 @@ export SYNO_Password='Admin_Password!123'
./acme.sh --deploy --home . -d "$CERT_DOMAIN" --deploy-hook synology_dsm
```
Note that if the user entered for `SYNO_Username` has enabled two-factor authentication (2FA), the script will ask you to manually input the TOTP code just like you were logging in on the Web UI, and obtain to store necessary info to omit the TOTP in the future.
> BTW, as you may know if you used to use this script to deploy, the necessary info here now is so-called parameter "Device ID", if you are a pro user and want to obtain it manually, you still can, method in short: log into your DSM via its website, making sure you've ticked `Remember this device` when asked for your OTP, get the `did` cookie's value and set the environment variable `SYNO_DEVICE_ID`:
Note that if the user entered for `SYNO_Username` has enabled two-factor authentication (2FA), the script will require you to manually input the TOTP code just like you were logging in on the Web UI (if you didn't provide the code via `export SYNO_OTPCode=XXXXXX`), it will also require you to input the device name for verification (also can be provided via like `export SYNO_DeviceName=CertRenewal`), then obtain to store necessary info which can be used to omit the TOTP, so you won't need to do manually input again in the future.
> BTW, as you may know if you used to use this script to deploy, the necessary info here now is so-called parameter "Device ID", if you are a pro user and want to obtain it manually, you still can, method in short: log into your DSM via its website, making sure you've ticked `Remember this device` when asked for your OTP, get the `did` cookie's value and set the environment variable `SYNO_DeviceID`:
```sh
export SYNO_DEVICE_ID='YOUR VALUE'
export SYNO_DeviceID='YOUR VALUE'
./acme.sh --deploy --home . -d "$CERT_DOMAIN" --deploy-hook synology_dsm
```
@ -101,7 +101,6 @@ By specifying a different `SYNO_Certificate` (and set `SYNO_Create=1` for creati
```sh
# SYNO_Certificate is the description shown under Security -> Certificates in the DSM Control Panel
export SYNO_Certificate="A different certificate description"
export SYNO_Create=1 # Says to create the certificate if it doesn't exist
./acme.sh --deploy --home . -d "subdomain.$CERT_DOMAIN" --deploy-hook synology_dsm
```