1

Self-Signed Certificates

Some quick commands for creating self-signed certificates

Last updated: 2/25/2026

Create a self-signed keypair in the current directory

Creates a self-signed keypair in the current directory for the common name "localhost" that expires in 10 years.

openssl req -x509 -newkey rsa:2048 -keyout ssl.key -out ssl.crt -days 36500 -nodes -subj "/CN=localhost"