Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Generate and install SSL certificate with letsencrypt (for nginx)
export DOMAIN="mydomain.com"
curl https://get.acme.sh | sh
bash --login
mkdir -p /etc/nginx/certs/$DOMAIN/
acme.sh --issue -d $DOMAIN -w /var/www/$DOMAIN/public/
acme.sh --install-cert -d $DOMAIN \
--certpath /etc/nginx/certs/$DOMAIN/cert.pem \
--keypath /etc/nginx/certs/$DOMAIN/key.pem \
--fullchainpath /etc/nginx/certs/$DOMAIN/fullchain.pem \
--reloadcmd "nginx -s reload"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment