Skip to main content

Manual SSL

If you prefer not to use Let's Encrypt, or if you have an existing certificate, you can configure SSL manually.

Step 1: Obtain a Certificate

You can use:

  • A certificate from a commercial CA (DigiCert, Sectigo, etc.)
  • A self-signed certificate (for testing only)
  • A certificate from an internal CA

Step 2: Prepare Certificate Files

Place your certificate and private key in plugins/ZyveraWeb/ssl/<domain>/:

plugins/ZyveraWeb/ssl/
└── example.com/
    ├── fullchain.pem      # Certificate chain (PEM format)
    └── privkey.pem        # Private key (PEM format)

Certificate Requirements

  • Format: PEM (X.509)
  • Content: Full certificate chain including intermediate CAs
  • Private key: RSA key in PKCS#8 or OpenSSL PEM format

Example: Self-Signed Certificate (Testing Only)

# Generate a self-signed certificate and key
openssl req -x509 -nodes -days 365 -newkey rsa:4096 \
    -keyout plugins/ZyveraWeb/ssl/example.com/privkey.pem \
    -out plugins/ZyveraWeb/ssl/example.com/fullchain.pem \
    -subj "/CN=example.com"

Warning: Self-signed certificates will trigger browser security warnings. Use only for testing or internal networks.

Step 3: Configure ZyveraWeb

Add an ssl: block to the site definition in config.yml:

sites:
  - domain: "example.com"
    dir: "site/example"
    ssl:
      cert: fullchain.pem
      key: privkey.pem

The certificate files are resolved relative to ssl/<domain>/ inside the data folder.

Step 4: Restart the Server

/zyveraweb server restart

Your site should now be accessible over HTTPS.

Verifying the Setup

curl -v https://your-domain:port/

Or open https://your-domain:port/ in a browser.