Edit this Page

GothPanda

Sometimes, I make things. Even rarer, I manage to write things down.


Let's Encrypt using Dreamhost DNS

Command

sudo certbot certonly --manual \
--manual-auth-hook dreamhost-dns.sh \
--manual-cleanup-hook dreamhost-cleanup.sh \
--preferred-challenges dns -d git.gothpanda.dev

dreamhost-dns.sh

#!/bin/bash

# This script used for updating the Dreamhost DNS records for a domain
API_KEY="YOUR_KEY_HERE"

CREATE_DOMAIN="_acme-challenge.$CERTBOT_DOMAIN"

curl -s "https://api.dreamhost.com/?key=$API_KEY&cmd=dns-add_record&record=$CREATE_DOMAIN&type=TXT&value=$CERTBOT_VALIDATION&comment=certbot"

# Sleep to make sure the change has time to propagate over to DNS
sleep 60

dreamhost-cleanup.sh

#!/bin/bash

# This script used for updating the Dreamhost DNS records for a domain
API_KEY="YOUR_KEY_HERE"

CREATE_DOMAIN="_acme-challenge.$CERTBOT_DOMAIN"

curl -s "https://api.dreamhost.com/?key=$API_KEY&cmd=dns-remove_record&record=$CREATE_DOMAIN&type=TXT&value=$CERTBOT_VALIDATION"

« Previous