SSL

Learn how to configure SSL certificates for secure HTTPS connections.

Overview

Piglet Run supports multiple SSL certificate options:

  • Let’s Encrypt: Free automatic certificates
  • Self-Signed: For development and testing
  • Custom: Bring your own certificates

Quick SSL Setup

Enable SSL with Let’s Encrypt:

pig ssl enable --domain example.com

Let’s Encrypt Certificates

Enable for Domain

pig ssl letsencrypt --domain example.com --email [email protected]

Multiple Domains

pig ssl letsencrypt --domain example.com --domain www.example.com

Wildcard Certificate

pig ssl letsencrypt --domain "*.example.com" --dns cloudflare

Self-Signed Certificates

Generate Self-Signed

pig ssl self-signed --domain localhost

For Development

pig ssl self-signed --domain dev.local --days 365

Custom Certificates

Install Custom Certificate

pig ssl install --cert /path/to/cert.pem --key /path/to/key.pem

With Certificate Chain

pig ssl install \
  --cert /path/to/cert.pem \
  --key /path/to/key.pem \
  --chain /path/to/chain.pem

Certificate Management

View Certificates

pig ssl list

Check Expiration

pig ssl status

Renew Certificates

pig ssl renew

Configuration

SSL settings in /etc/piglet/ssl.yml:

ssl:
  provider: letsencrypt
  email: [email protected]
  auto_renew: true
  renew_days: 30

Next Steps