How did you install discourse? If you do a standard installation, you’ll get a certificate from let’s encrypt by default. It won’t work with cloudflare in front, however.
You might be able to look at the let’s encrypt template and modify it to do what you suggest.
Correct, i’m working on this, but unfortunately i don’t have much experiance in programming or bash script to achive this issue… but i didn’t find any module with cerbot with let’s encrypts to do this… only this line maybe we add our code there
# Try to issue the cert again if something goes wrong
issue_cert "4096" "--force"
fi
LE_WORKING_DIR="${LETSENCRYPT_DIR}" $$ENV_LETSENCRYPT_DIR/acme.sh \
--installcert \
-d $$ENV_DISCOURSE_HOSTNAME \
--fullchainpath /shared/ssl/$$ENV_DISCOURSE_HOSTNAME.cer \
--keypath /shared/ssl/$$ENV_DISCOURSE_HOSTNAME.key \
--reloadcmd "sv reload nginx"