Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

letsencrypt: Add Namecheap DNS challenge support #3162

Merged
merged 7 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.4

- Add Namecheap DNS challenge support

## 5.0.3

- Add deSEC DNS challenge support
Expand Down
25 changes: 25 additions & 0 deletions letsencrypt/DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ aws_access_key_id: ''
aws_secret_access_key: ''
sakuracloud_api_token: ''
sakuracloud_api_secret: ''
namecheap_username: ''
namecheap_api_key: ''
netcup_customer_id: ''
netcup_api_key: ''
netcup_api_password: ''
Expand Down Expand Up @@ -358,6 +360,28 @@ on the DNS zone to be used for authentication.

</details>

<details>
<summary>Namecheap</summary>

To use this addon with Namecheap, you must first enable API access on your account. See "Enabling API Access" and "Whitelisting IP" [here](https://www.namecheap.com/support/api/intro/) for details and requirements.

Example configuration:

```yaml
email: [email protected]
domains:
- ha.yourdomain.com
certfile: fullchain.pem
keyfile: privkey.pem
challenge: dns
dns:
provider: dns-namecheap
namecheap_username: your-namecheap-username
namecheap_api_key: 0123456789abcdef0123456789abcdef01234567
```

</details>

<details>
<summary>Njalla</summary>

Expand Down Expand Up @@ -542,6 +566,7 @@ dns-ovh
dns-rfc2136
dns-route53
dns-sakuracloud
dns-namecheap
dns-netcup
dns-gandi
dns-transip
Expand Down
2 changes: 2 additions & 0 deletions letsencrypt/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ ARG \
CERTBOT_DNS_GOOGLE_DOMAINS_VERSION \
CERTBOT_DNS_HETZNER_VERSION \
CERTBOT_DNS_INWX_VERSION \
CERTBOT_DNS_NAMECHEAP_VERSION \
CERTBOT_DNS_TRANSIP_VERSION \
CERTBOT_NETCUP_VERSION \
CERTBOT_NJALLA_VERSION \
Expand Down Expand Up @@ -55,6 +56,7 @@ RUN \
certbot-dns-rfc2136==${CERTBOT_VERSION} \
certbot-dns-route53==${CERTBOT_VERSION} \
certbot-dns-sakuracloud==${CERTBOT_VERSION} \
certbot-dns-namecheap==${CERTBOT_DNS_NAMECHEAP_VERSION} \
certbot-dns-netcup==${CERTBOT_NETCUP_VERSION} \
certbot-plugin-gandi==${CERTBOT_GANDI_VERSION} \
certbot-dns-transip==${CERTBOT_DNS_TRANSIP_VERSION} \
Expand Down
1 change: 1 addition & 0 deletions letsencrypt/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ args:
CERTBOT_DNS_DUCKDNS_VERSION: 1.3
CERTBOT_DNS_HETZNER_VERSION: 2.0.0
CERTBOT_DNS_INWX_VERSION: 2.2.0
CERTBOT_DNS_NAMECHEAP_VERSION: 1.0.0
CERTBOT_DNS_GOOGLE_DOMAINS_VERSION: 0.1.11
CERTBOT_DNS_TRANSIP_VERSION: 0.5.2
CERTBOT_GANDI_VERSION: 1.5.0
Expand Down
8 changes: 5 additions & 3 deletions letsencrypt/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
version: 5.0.3
version: 5.0.4
slug: letsencrypt
name: Let's Encrypt
description: Manage certificate from Let's Encrypt
Expand Down Expand Up @@ -63,6 +63,8 @@ schema:
linode_version: str?
luadns_email: email?
luadns_token: str?
namecheap_username: str?
namecheap_api_key: str?
netcup_api_key: str?
netcup_api_password: str?
netcup_customer_id: str?
Expand All @@ -77,8 +79,8 @@ schema:
dns-directadmin|dns-dnsimple|dns-dnsmadeeasy|dns-duckdns|\
dns-gehirn|dns-google|dns-google-domains|\
dns-hetzner|dns-linode|dns-luadns|dns-njalla|dns-nsone|dns-ovh|\
dns-rfc2136|dns-route53|dns-sakuracloud|dns-netcup|dns-gandi|\
dns-transip|dns-inwx)?"
dns-rfc2136|dns-route53|dns-sakuracloud|dns-namecheap|dns-netcup|\
dns-gandi|dns-transip|dns-inwx)?"
rfc2136_algorithm: str?
rfc2136_name: str?
rfc2136_port: str?
Expand Down
2 changes: 2 additions & 0 deletions letsencrypt/rootfs/etc/cont-init.d/file-structure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ echo -e "dns_desec_token = $(bashio::config 'dns.desec_token')\n" \
"dns_linode_version = $(bashio::config 'dns.linode_version')\n" \
"dns_luadns_email = $(bashio::config 'dns.luadns_email')\n" \
"dns_luadns_token = $(bashio::config 'dns.luadns_token')\n" \
"dns_namecheap_username = $(bashio::config 'dns.namecheap_username')\n" \
"dns_namecheap_api_key = $(bashio::config 'dns.namecheap_api_key')\n" \
"dns_netcup_customer_id = $(bashio::config 'dns.netcup_customer_id')\n" \
"dns_netcup_api_key = $(bashio::config 'dns.netcup_api_key')\n" \
"dns_netcup_api_password = $(bashio::config 'dns.netcup_api_password')\n" \
Expand Down
5 changes: 5 additions & 0 deletions letsencrypt/rootfs/etc/services.d/lets-encrypt/run
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ elif [ "${CHALLENGE}" == "dns" ] && [ "${DNS_PROVIDER}" == "dns-google" ]; then
elif [ "${CHALLENGE}" == "dns" ] && [ "${DNS_PROVIDER}" == "dns-google-domains" ]; then
bashio::config.require 'dns.google_domains_access_token'
PROVIDER_ARGUMENTS+=("--authenticator" "${DNS_PROVIDER}" "--${DNS_PROVIDER}-credentials" "/data/dnsapikey" "--${DNS_PROVIDER}-propagation-seconds" "${PROPAGATION_SECONDS}")
#Namecheap
elif [ "${CHALLENGE}" == "dns" ] && [ "${DNS_PROVIDER}" == "dns-namecheap" ]; then
bashio::config.require 'dns.namecheap_username'
bashio::config.require 'dns.namecheap_api_key'
PROVIDER_ARGUMENTS+=("--authenticator" "${DNS_PROVIDER}" "--${DNS_PROVIDER}-credentials" "/data/dnsapikey" "--${DNS_PROVIDER}-propagation-seconds" "${PROPAGATION_SECONDS}")
#Netcup
elif [ "${CHALLENGE}" == "dns" ] && [ "${DNS_PROVIDER}" == "dns-netcup" ]; then
bashio::config.require 'dns.netcup_customer_id'
Expand Down
Loading