HTTPS using localhost To generate a local certiticate and using it, please follow these steps (note: replace MY_DOMAIN, MY_FILENAME and MY_PASSPHRASE based on your choice): Step 1: Generate private key openssl genrsa -out MY_FILENAME.key 4096