Step1: Use ssh-keygen command or openssl toolkit (https://www.digicert.com/csr-ssl-installation/apache-openssl.htm) to create a key pair.
Step2: Apply free CA, letsencrypt , to generate digital certificate based on the keypair's public key. The generation follows this process https://letsencrypt.org/how-it-works/