Setting up a Trusted, Self-signed SSL/TLS Certificate Authority in Linux

TLDR: Set up a self-signed SSL/TLS certificate authority (CA) in Linux using OpenSSL. Generate a CA key and certificate, create a private key for the target domain (e.g., localhost), configure a certificate signing request (CSR), sign the certificate with the CA, and install the CA certificate to your OS or browsers. Follow specific commands for Ubuntu and Arch Linux.

https://previnder.com/tls-ca-linux/