warning
We strongly recommend upgrading your PBX to the latest version rather than using this script method to renew certificates. This script will stop the PBX service for approximately 5-10 minutes during certificate generation and may cause service interruption for your users. Tested on Debian/Ubunutu 24.04
Vodia PBX Certificate Script - Quick Usage Guide
Prerequisites
- Root access - Script must be run with
sudo - Port 80 accessible - Must be reachable from internet for Let's Encrypt validation
- PBX API credentials - Admin username and password
- Valid domains - Domains must point to your server's IP address
- DNS resolution - Domains must resolve properly (unless using
--skip-dns)
Download the script
wget https://vodia.nyc3.cdn.digitaloceanspaces.com/builds/manual-cert.sh
chmod a+x ./manual-cert.sh
Basic Usage
sudo ./manual-cert.sh -u "https://PBX_ADMIN_URL" -l "admin" -p "password"
Command Line Options
Required Arguments
-u, --url- PBX API URL (e.g.,https://PBX_ADMIN_URL)-l, --login- PBX username-p, --password- PBX password
Optional Arguments
-e, --email- Email for Let's Encrypt notifications (default:admin@vodia-teams.com)-P, --port- HTTP server port (default:91, recommended:80)-d, --dir- Certificate base directory (default:/etc/letsencrypt-vodia)--skip-dns- Skip DNS validation (useful for testing)--skip-access- Skip accessibility tests--no-upload- Generate certificates only, don't upload to PBX-h, --help- Show help message
What the Script Does
- Fetches domains - Automatically retrieves tenant domains from PBX API
- Validates domains - Checks DNS resolution and accessibility
- Stops PBX service - Temporarily stops to avoid port conflicts
- Generates certificates - Uses Let's Encrypt with HTTP challenge
- Restarts PBX service - Brings PBX back online
- Uploads certificates - Pushes certificates to PBX via
/rest/system/certsAPI - Creates summary - Generates detailed report of all operations