How to create a self-signed SSL certificate? Aug 23, 2018 Do this: $ openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365