Self-Signed SSL/TLS with Subject Alternative Names for Local Networks
This guide covers creating self-signed SSL certificates with Subject Alternative Names (SAN) for secure HTTPS communication on your local network. Perfect for homelab environments, development servers, and internal infrastructure.
cerberus-ai.local) without certificate warnings.
Create a configuration file that includes Subject Alternative Names:
cerberus-ai.local with your hostname and 192.168.1.32 with your server's IP.
Add/modify these lines inside the <VirtualHost *:443> section:
On your client machine, copy the certificate:
Updating certificates in /etc/ssl/certs...
1 added, 0 removed; done.
Firefox doesn't use the system certificate store, so you need to import manually:
~/cerberus-ai.local.crtChrome uses the system certificate store on Linux, so it should work automatically after step 3.2.
chrome://settings/security â Clear browsing data â Cached images and filesEdit your default site configuration:
Add inside the <VirtualHost *:80> section:
http://cerberus-ai.local will automatically redirect to https://cerberus-ai.local
sudo openssl x509 -in /etc/ssl/cerberus/cerberus-ai.local.crt -noout -datesWhat you've achieved:
To add the certificate to other Ubuntu machines on your network:
Self-signed certificates last 10 years (3650 days). When it expires:
For advanced setups with multiple servers, create your own Certificate Authority:
.key fileschmod 600 on private keys