Christophe CasalegnoAutoimmune warrior, Entrepreneur & Bio/Hacker

SxSSL: automatic Let’s Encrypt TLS/SSL certificate generation for Apache in Bash

SxSSL: StackX SSL

SxSSL is a GPL-licensed Bash script for automatically generating Let’s Encrypt SSL certificates for one or more domain names (FQDNs).
Designed to run locally on the target server, it provides quick, reliable configuration suited to StackX environments, but can easily be adapted and/or used in other setups.

Main features

– Automatic SSL certificate generation through Let’s Encrypt (Certbot).
– Native support for multiple domains (comma-separated).
– Runs locally on the target server (no bastion host needed).
– Configurable permitted IPs (IPv4, IPv6 or both).
– Checks domain name formatting.
– Tested on Debian 10, 11 and 12.

Usage

After downloading the script:

cp sxssl.sh /usr/local/bin/sxssl
chmod +x /usr/local/bin/sxssl

Run the script with one or more domains:

sxssl domaine.tld
sxssl domaine1.tld,domaine2.tld,domaine3.tld

Note: remember to configure the email and ip variables in the script before using it.

Variables to configure

email="votre@email.tld"  # Adresse utilisée par Certbot pour les notifications
ip="192.168.0.1"         # IP ou liste d'IPs autorisées, séparées par des virgules

These IPs must match the addresses where the certificate is allowed to apply. You can include IPv4 addresses, IPv6 addresses, or a mixture of both.

Todo list

– Add a debug/verbose mode for advanced diagnostics.

Resources

– Script: sxssl.sh

—
Christophe Casalegno
You can follow me on: Telegram | Facebook | LinkedIn | X | YouTube | Twitch

Christophe Casalegno Brain 0verride

Keep it simple
and direct!