How to create self signed certificate: openssl genrsa -des3 -passout pass:x -out keypair.key 2048 openssl rsa -passin pass:x -in keypair.key -out .key openssl req -new -key .key -out .csr openssl x509 -req -days 365 -in .csr -signkey .key -out .crt e.g.: https://www.rosehosting.com/blog/how-to-generate-a-self-signed-ssl-certificate-on-linux/