Looking for a way to get a Let's Encrypt (wildcard) certificate for the domain(s) that you registered with TransIP?
This script automates the process of completing a DNS-01 challenge for domains using the TransIP DNS service.
The auth script is invoked by Certbot's --manual-auth-hook
, which then creates the required challenge record using the TransIP API. After validation the --manual-cleanup-hook
is invoked and the challenge record is removed again.
This describes how to use the script via Docker. If you want to use the script on a system with Certbot & PHP installed follow these instructions.
.env
file with the following content:
TRANSIP_LOGIN=YOUR-LOGIN
TRANSIP_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----XXXXX-----END PRIVATE KEY-----"
docker run -it --rm \
--env-file /path/to/.env \
-v "/etc/letsencrypt:/etc/letsencrypt" \
-v "/var/lib/letsencrypt:/var/lib/letsencrypt" \
fransik/certbot-dns-transip
After validation succeeds (this can take up to 10 minutes) you can find the certificate here: /etc/letsencrypt/live
.
Make sure the following command runs daily (via cron for example):
docker run --rm \
--env-file /path/to/.env \
-v "/etc/letsencrypt:/etc/letsencrypt" \
-v "/var/lib/letsencrypt:/var/lib/letsencrypt" \
fransik/certbot-dns-transip renew
To request a test certificate run:
docker run -it --rm \
--env-file /path/to/.env \
-v "/etc/letsencrypt:/etc/letsencrypt" \
-v "/var/lib/letsencrypt:/var/lib/letsencrypt" \
fransik/certbot-dns-transip certonly \
--test-cert \
--preferred-challenges=dns \
--manual \
--manual-auth-hook bin/auth \
--manual-cleanup-hook bin/cleanup
composer install --no-dev
config.php.dist
to config.php
config.php
with your TransIP login name and private keycertbot certonly \
--preferred-challenges=dns \
--manual \
--manual-auth-hook /path/to/certbot-dns-transip/bin/auth \
--manual-cleanup-hook /path/to/certbot-dns-transip/bin/cleanup \
-d example.com -d "*.example.com"
After validation succeeds (this can take up to 10 minutes) you can find the certificate here: /etc/letsencrypt/live
.
Should be automatic on most systems that have the certbot package installed. See certbot docs.
To request a test certificate run:
certbot certonly \
--test-cert \
--preferred-challenges=dns \
--manual \
--manual-auth-hook /path/to/certbot-dns-transip/bin/auth \
--manual-cleanup-hook /path/to/certbot-dns-transip/bin/cleanup \
-d example.com -d "*.example.com"