Skip to content

Instantly share code, notes, and snippets.

@blueal
Last active June 5, 2023 20:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blueal/344be53580280dd9099009aebbac7901 to your computer and use it in GitHub Desktop.
Save blueal/344be53580280dd9099009aebbac7901 to your computer and use it in GitHub Desktop.
Commands to enter into SSH to create files with the correct permissions and request and deploy initial certs
cd /volume1/docker
sudo mkdir acme
cd acme
sudo touch account.conf
sudo cat << EOF > account.conf
#Cloudflare Configuration
export CF_Token="TOKEN"
export CF_Account_ID="ACCOUNTID"
#Synology Main and Wild Deploy
export SYNO_Username='acme'
export SYNO_Password='SYNOPASS'
export SYNO_Certificate="acme.sh wild certificate"
export SYNO_Scheme="https"
export SYNO_Port="5001"
export SYNO_Hostname="server.name.tld"
export SYNO_Create=1
EOF
sudo docker exec neilpang-acme.sh1 acme.sh --set-default-ca --server letsencrypt
sudo docker exec neilpang-acme.sh1 acme.sh --issue --dns dns_cf -d server.name.tld -d *.server.name.tld
sudo docker exec neilpang-acme.sh1 acme.sh --deploy -d server.name.tld -d *.server.name.tld --deploy-hook synology_dsm --insecure
#Task Schedule once per month
#docker exec neilpang-acme.sh1 acme.sh --renew --dns dns_cf -d server.name.tld -d *.server.name.tld --debug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment