A Ruby script that automates the generation and deployment of Let's Encrypt SSL certificates to Ferozo hosting accounts via DonWeb's reseller API.
- Automatic certificate generation using Let's Encrypt ACME protocol
- Support for wildcard certificates (DNS-01 challenge)
- Interactive account selection
- Batch processing of multiple accounts
- Automatic handling of DNS records for validation
- Session management and error handling
- Ruby 3.1+ (tested with 3.4)
- Bundler
- A DonWeb reseller account with Ferozo hosting accounts
bundle installCreate a .env file in the project root:
cp .env.example .envThen edit .env and add your DonWeb session:
- Log in to
donweb.comin your browser - Open Developer Tools (F12) → Application/Storage → Cookies
- Copy the value of the
sitiocookie - Add it to
.env:PHPSESSID=your_session_id_here
Generate a private key for your ACME account:
openssl genrsa 4096 > private.pemRun the script with your contact email:
ruby lib/ferocrypt.rb your@email.comThe script will:
- Fetch all your Ferozo hosting accounts
- Display them with their domains
- Prompt you to select which accounts to process
Initializing...
Fetching accounts...
Available accounts:
1. tunin.com.ar
2. wprocesos.com.ar
3. granjacastelli.com.ar
4. [Error: CSRF token retrieval failed] [UNAVAILABLE]
Select accounts to process (e.g., 1,3,5 or 'all'): 1,2
- Specific accounts:
1,3,5- Process only accounts 1, 3, and 5 - All accounts:
all- Process all available accounts - Single account:
2- Process only account 2
- Authenticates with DonWeb using the PHPSESSID from
.env - Retrieves all hosting accounts under your reseller account
- For each selected account:
- Fetches all domains (excluding *.ferozo.com)
- Creates Let's Encrypt order for wildcard + apex domains
- Adds DNS TXT records for ACME validation
- Waits for validation to complete
- Generates certificate and private key
- Installs certificate via Ferozo API
- Cleans up DNS records
Some hosting accounts may not have API access enabled. These will be skipped automatically.
Accounts marked as unavailable couldn't retrieve their domain list. This usually means:
- The Ferozo session expired (try re-running the script)
- The account has API access issues
- Network connectivity problems
These accounts are automatically filtered out when you make a selection.
Your DonWeb PHPSESSID has expired. Update the .env file with a fresh cookie value:
- Log in to donweb.com again
- Copy the new
sitiocookie value - Update
.envwith the new PHPSESSID
.env- DonWeb session ID (gitignored)private.pem- ACME account key (gitignored, auto-generated)status.txt- Tracks processed accounts to avoid duplicates (gitignored)
- Tests
- Automatic PHPSESSID refresh
- Support for custom certificate expiry checks
For educational purposes only