As a follow-up to an earlier post, if using Unit as web server, add --standalone parameter to acme.sh commands. For example,

sudo su
curl https://get.acme.sh | sh -s email=<email>
/root/.acme.sh/acme.sh --set-default-ca --server letsencrypt
/root/.acme.sh/acme.sh --issue --standalone -d <domain>

/root/.acme.sh/acme.sh --revoke --standalone --domain <domain>
/root/.acme.sh/acme.sh --renew --standalone --domain <domain>