Adds automation for http-01 (.well-known) and dns-01 (wildcard) challenges for TransIP.
- PHP 8.1
- Composer
- certbot
- No pre-existing
_acme-challenge
TXT record in your DNS
- Clone repo
composer install
cp .env.example .env
- Fill in blank fields in .env file
- Run following command:
sudo certbot certonly --manual -d yourdomain.com -d *.yourdomain.com \
--manual-auth-hook "/usr/bin/php /path/to/project/index.php" \
--manual-cleanup-hook "/usr/bin/php /path/to/project/index.php cleanup"
- Wait ~2 minutes if you are doing a dns-01 challenge, otherwise ~10 seconds
- Certbot will setup a scheduled task to automatically renew your certificate
- (Recommended) Edit
/etc/letsencrypt/cli.ini
and adddeploy-hook = nginx -s reload
Setting LOGGING_LEVEL
to Debug
will print your $_SERVER
global array to letsencrypt.log
.
This means that it will also print your TRANSIP_KEY
. By default, the logging level is set to Info
however.
To clarify, if this happens, GENERATE A NEW KEY.
The code for this is very simple, so please have a look through it and give me any feedback you might have.