Skip to content

Instantly share code, notes, and snippets.

@scottsbaldwin
Created August 16, 2016 20:01
Show Gist options
  • Save scottsbaldwin/e69596dfb307f69d7661cf0eaf2cd28f to your computer and use it in GitHub Desktop.
Save scottsbaldwin/e69596dfb307f69d7661cf0eaf2cd28f to your computer and use it in GitHub Desktop.
Generating an SSL Certificate with Let's Encrypt

Generating an SSL Certificate with Let's Encrypt

curl -o acme.sh https://get.acme.sh
chmod a+x acme.sh
./acme.sh

Logout and log back into to get the alias that acme.sh installed.

DOMAIN=example.com
acme.sh --issue --dns -d registry.${DOMAIN}

# Create the necessary TXT record.
acme.sh --renew -d registry.${DOMAIN}

Cert is found in ~/.acme.sh/registry.${DOMAIN}/registry.${DOMAIN}.cer. Key is found in ~/.acme.sh/registry.${DOMAIN}/registry.${DOMAIN}.key. CA Cert is found in ~/.acme.sh/registry.${DOMAIN}/ca.cer.

The CA Cert will need to be copied to /etc/docker/certs.d/registry.${DOMAIN}/ca.crt on a host where a docker client runs so that it can trust the certificate authority.

Restart the docker daemon on the client machine.

Links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment