Learn how to create a free, self-signed certificate for local development.
.p12
format. You can either purchase one or create a free self-signed certificate.
Follow the steps below to create a free, self-signed certificate for local development.
openssl genrsa -out private.key 2048
openssl req -new -x509 -key private.key -out certificate.crt -days 365
—days
parameter specifies the certificate’s validity period.p12
Certificate.p12
certificate. Use the following command:openssl pkcs12 -export -out certificate.p12 -inkey private.key -in certificate.crt -legacy
p12
Certificate Password.p12
certificate, you will be prompted to enter a password. Enter a strong password and keep it secure. Remember this password, as it will be required when using the certificate.NEXT_PRIVATE_SIGNING_LOCAL_FILE_PATH
environment variable to point at the certificate you created.