Certgen
Certgen is a Ruby CLI tool to generate free SSL certificates from Let's Encrypt using DNS-01 verification. Perfect for developers and site owners who use cPanel or manually managed servers and need to upload certificates themselves.
✨ Features
- ✅ Generate valid SSL certificates via Let's Encrypt
- 🌐 Supports both base domains and
www.
subdomains automatically - 🔐 Uses DNS-01 challenge (great for wildcard and shared hosting)
- 📁 Outputs
.crt
,.pem
, and zipped bundles for easy upload - 🔄 Stores reusable Let's Encrypt account key
- 🖥️ CLI interface for quick and easy usage
📦 Installation
gem install certgen
🚀 Usage
Run the CLI tool from your terminal:
certgen --domain example.com --email [email protected]
This will:
- Generate or reuse your Let's Encrypt account key
- Create DNS-01 challenge instructions
- Wait for your confirmation after DNS is set
- Generate the certificate files
- Zip them for upload to cPanel or any hosting service
🔄 Example Output Files
After running, your certs will be saved in:
~/.ssl_output/example.com/
✍️ DNS Setup
You'll be prompted to create a DNS TXT record:
Record Name: _acme-challenge.example.com
Record Type: TXT
Record Value: abc123...
Use https://dnschecker.org to confirm propagation before continuing.
🔧 Development
Clone and run locally:
git clone https://github.com/cdrrazan/certgen
cd certgen
bundle install
Run the CLI locally:
bin/certgen --domain example.com --email [email protected]
✅ Requirements
- Ruby >= 3
- DNS management access to create TXT records
- cPanel or similar manual SSL upload support
📄 License
This project is licensed under the MIT License. See the LICENSE file for details.
🙌 Author
Rajan Bhattarai
GitHub • Email
🛠 Contributions and issues are welcome — feel free to open a PR or issue on GitHub!