Skip to content

Commit

Permalink
Add support for dreamhost
Browse files Browse the repository at this point in the history
  • Loading branch information
glogiotatidis committed Dec 15, 2023
1 parent 9348869 commit 3f8e3fb
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 2 deletions.
4 changes: 4 additions & 0 deletions letsencrypt/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 5.0.8

- Add Dreamhost DNS challenge support

## 5.0.7

- Add Porkbun DNS challenge support
Expand Down
18 changes: 18 additions & 0 deletions letsencrypt/DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ inwx_password: ''
inwx_shared_secret: ''
porkbun_key: ''
porkbun_secret: ''
dreamhost_api_baseurl: ''
dreamhost_api_key: ''
```

## Advanced
Expand Down Expand Up @@ -583,7 +585,22 @@ dns:
porkbun_key: 0123456789abcdef0123456789abcdef01234
porkbun_secret: 0123456789abcdef0123456789abcdef01234
```
</details>
<details>
<summary>Dreamhost</summary>
```yaml
email: [email protected]
domains:
- your.domain.tld
certfile: fullchain.pem
keyfile: privkey.pem
challenge: dns
dns:
provider: dns-dreamhost
dreamhost_baseurl: https://api.dreamhost.com/
dreamhost_api_key: XXXXXX
```
</details>
## Certificate files
Expand All @@ -604,6 +621,7 @@ dns-directadmin
dns-dnsimple
dns-dnsmadeeasy
dns-duckdns
dns-dreamhost
dns-gehirn
dns-google
dns-hetzner
Expand Down
2 changes: 2 additions & 0 deletions letsencrypt/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ARG \
CERTBOT_DNS_AZURE_VERSION \
CERTBOT_DNS_DESEC_VERSION \
CERTBOT_DNS_DIRECTADMIN_VERSION \
CERTBOT_DNS_DREAMHOST_VERSION \
CERTBOT_DNS_DUCKDNS_VERSION \
CERTBOT_DNS_GOOGLE_DOMAINS_VERSION \
CERTBOT_DNS_HETZNER_VERSION \
Expand Down Expand Up @@ -65,6 +66,7 @@ RUN \
certbot-plugin-gandi==${CERTBOT_GANDI_VERSION} \
certbot-dns-transip==${CERTBOT_DNS_TRANSIP_VERSION} \
certbot-dns-inwx==${CERTBOT_DNS_INWX_VERSION} \
certbot-dns-dreamhost==${CERTBOT_DNS_DREAMHOST_VERSION} \
acme==${ACME_VERSION} \
&& apk del .build-dependencies

Expand Down
1 change: 1 addition & 0 deletions letsencrypt/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ args:
CERTBOT_NETCUP_VERSION: 1.4.3
CERTBOT_NJALLA_VERSION: 1.0.0
CERTBOT_VERSION: 2.7.4
CERTBOT_DNS_DREAMHOST_VERSION: 1.0
ACME_VERSION: 2.7.4
4 changes: 3 additions & 1 deletion letsencrypt/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ schema:
dns-gehirn|dns-google|dns-google-domains|\
dns-hetzner|dns-infomaniak|dns-linode|dns-luadns|dns-njalla|dns-nsone|\
dns-porkbun|dns-ovh|dns-rfc2136|dns-route53|dns-sakuracloud|dns-namecheap|\
dns-netcup|dns-gandi|dns-transip|dns-inwx)?"
dns-netcup|dns-gandi|dns-transip|dns-inwx|dns-dreamhost)?"
rfc2136_algorithm: str?
rfc2136_name: str?
rfc2136_port: str?
Expand All @@ -96,4 +96,6 @@ schema:
inwx_username: str?
inwx_password: str?
inwx_shared_secret: str?
dreamhost_api_key: str?
dreamhost_baseurl: str?
startup: once
4 changes: 3 additions & 1 deletion letsencrypt/rootfs/etc/cont-init.d/file-structure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ echo -e "dns_desec_token = $(bashio::config 'dns.desec_token')\n" \
"dns_inwx_username = $(bashio::config 'dns.inwx_username')\n" \
"dns_inwx_password = $(bashio::config 'dns.inwx_password')\n" \
"dns_inwx_shared_secret = $(bashio::config 'dns.inwx_shared_secret')\n" \
"dns_google_domains_access_token = $(bashio::config 'dns.google_domains_access_token')\n" > /data/dnsapikey
"dns_google_domains_access_token = $(bashio::config 'dns.google_domains_access_token')\n" \
"dns_dreamhost_baseurl = $(bashio::config 'dns.dreamhost_baseurl')\n" \
"dns_dreamhost_api_key = $(bashio::config 'dns.dreamhost_api_key')\n" > /data/dnsapikey

if bashio::config.exists 'dns.google_domains_zone'; then
echo -e "dns_google_domains_zone = $(bashio::config 'dns.google_domains_zone')\n" >> /data/dnsapikey
Expand Down
6 changes: 6 additions & 0 deletions letsencrypt/rootfs/etc/services.d/lets-encrypt/run
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,12 @@ elif [ "${CHALLENGE}" == "dns" ] && [ "${DNS_PROVIDER}" == "dns-porkbun" ]; the
bashio::config.require 'dns.porkbun_secret'
PROVIDER_ARGUMENTS+=("--authenticator" "${DNS_PROVIDER}" "--${DNS_PROVIDER}-credentials" "/data/dnsapikey" "--${DNS_PROVIDER}-propagation-seconds" "${PROPAGATION_SECONDS}")

# Dreamhost
elif [ "${CHALLENGE}" == "dns" ] && [ "${DNS_PROVIDER}" == "dns-dreamhost" ]; then
bashio::config.require 'dns.dreamhost_baseurl'
bashio::config.require 'dns.dreamhost_api_key'
PROVIDER_ARGUMENTS+=("--authenticator" "${DNS_PROVIDER}" "--dns-dreamhost-credentials" "/data/dnsapikey")

#All others
else
PROVIDER_ARGUMENTS+=("--${DNS_PROVIDER}" "--${DNS_PROVIDER}-credentials" "/data/dnsapikey")
Expand Down

0 comments on commit 3f8e3fb

Please sign in to comment.