/install acme-ssl-automation-for-alibaba-cloud-esa-dns
ESA DNS + ACME Certificate Automation
Design Decision (Important)
This skill combines acme.sh + ESA DNS into a single integrated flow, not split into two skills.
Reasons:
- The two steps are tightly coupled: ACME challenge tokens must be written to ESA DNS immediately.
- The most common user errors are "validation failed / record written to the wrong panel" — an integrated flow minimizes mistakes.
- Wildcard scenarios often produce multiple TXT values for the same FQDN; splitting would increase manual synchronization cost.
If there is significant demand for "DNS-only operations" in the future, a separate
esa-dns-recordshelper skill can be extracted.
When to Trigger
Trigger when any of the following apply:
- Domain NS records are on
*.atrustdns.com(ESA-hosted DNS) - User says "issue certificate with acme.sh", "Let's Encrypt", "DNS-01"
- Error:
No TXT record found at _acme-challenge... - Need to issue
example.com + *.example.comtogether - Need to auto-write ESA DNS records and install to Nginx
Supported Environment
- Linux hosts (recommended: Ubuntu tested)
- System-level Nginx (LNMP tested)
- Docker/containerized environments are not supported
- Not tested on Windows/macOS
Prerequisites
Install acme.sh from the official project before using this skill, and review the installation method you choose instead of piping remote scripts directly to a shell:
This skill expects acme.sh to be available on PATH. The script also falls back to ~/.acme.sh/acme.sh if present.
Requirements:
- Credentials via
ALIYUN_AK/ALIYUN_SKorALIBABACLOUD_ACCESS_KEY_ID/ALIBABACLOUD_ACCESS_KEY_SECRET - Optional ESA region hint via
ALIYUN_ESA_REGION/ALIBABACLOUD_ESA_REGION/ESA_REGIONor--region - STS token is supported via
ALIYUN_SECURITY_TOKEN,ALIBABACLOUD_SECURITY_TOKEN, or--sts-token - If the user provides credentials directly in OpenClaw chat/TUI as plain
id/secret/tokenvalues without env names, treat them as generic Alibaba CloudAccessKeyId/AccessKeySecret/SecurityTokenand pass them to--ak/--sk/--sts-token. Do not block on whether the user saidAliyunorAlibaba Cloud; let the script auto-detect the ESA region/site.
Running the Script
Script path: scripts/esa_acme_issue.py
Default behavior (optimized):
- Certificate installation to Nginx is disabled by default; opt in with
--install-cert --dns-timeoutdefaults to 600 seconds- Region auto-discovery is best-effort; if ESA does not expose
DescribeRegions, pass--regionto seed site discovery and the script will probe a fallback region list - Optional IPv4/IPv6 record management:
--ensure-a-record host=ip(with authoritative NS propagation check) - Overwrite protection: existing A value is NOT overwritten unless
--confirm-overwriteis passed --langselects output language (default:en; available languages auto-discovered fromscripts/i18n/)- If
--install-certis used, run on a controlled Linux host with permission to write the target cert paths and reload Nginx
Installing automatic renewal cron
Use scripts/install_cron.sh when the user wants this workflow to keep renewing automatically on the host.
What it installs:
- a root-owned env file containing AK/SK (and optional STS token / region hint)
- a wrapper script under
/usr/local/sbin/ - a cron entry that runs the wrapper on the requested schedule and logs to
/var/log/
Example:
sudo bash scripts/install_cron.sh \
--wrapper-name dogeow \
--domains "dogeow.com,*.dogeow.com" \
--ak YOUR_AK \
--sk YOUR_SK \
--region cn-hangzhou \
--with-nginx-reload
Important:
- This is the recommended way to automate renewal for ESA zones, because default
acme.sh --crondoes not know how to create ESA DNS TXT records by itself. - If the user wants installed nginx cert paths, also pass
--cert-path/--key-pathand optionally--reload-cmd.
Single domain
export ALIYUN_AK='YOUR_AK'
export ALIYUN_SK='YOUR_SK'
export ALIYUN_SECURITY_TOKEN='YOUR_STS_TOKEN' # optional but recommended
python3 scripts/esa_acme_issue.py \
-d test.example.com
Equivalent Alibaba Cloud env names are also accepted:
export ALIBABACLOUD_ACCESS_KEY_ID='YOUR_AK'
export ALIBABACLOUD_ACCESS_KEY_SECRET='YOUR_SK'
export ALIBABACLOUD_SECURITY_TOKEN='YOUR_STS_TOKEN' # optional
Apex + wildcard (recommended order)
export ALIYUN_AK='YOUR_AK'
export ALIYUN_SK='YOUR_SK'
python3 scripts/esa_acme_issue.py \
-d example.com \
-d '*.example.com'
Wildcard only
python3 scripts/esa_acme_issue.py \
-d '*.example.com'
Correct Nginx Configuration
ssl_certificate /etc/nginx/ssl/example.com.crt;
ssl_certificate_key /etc/nginx/ssl/example.com.key;
Completion Criteria (Anti False-Positive)
Before reporting "record created / DNS ready", both conditions must be met:
ListRecordsreturns the targetRecordName + Type + Value;- Authoritative NS
dig @ns TXTreturns the expected token.
If only the CreateRecord API returned success (RequestId/RecordId only) without passing both checks above, report "request accepted", not "completed".
Troubleshooting Quick Reference
-
InvalidRecordNameSuffix- Domain suffix does not belong to the current ESA site (common typo).
-
No TXT record found at _acme-challenge...- TXT not yet propagated to all authoritative NS; increase
--dns-timeoutto 300–600.
- TXT not yet propagated to all authoritative NS; increase
-
Permission / signature errors after setting AccessKey IP whitelist
- Check current public egress IP:
curl -s ifconfig.me - Whitelist the actual egress NAT IP (not LAN IP)
- If behind proxy/gateway, whitelist the proxy egress IP
- Wait briefly after whitelist update before retrying
- Check current public egress IP:
Security Guidelines
Before each execution, remind the user:
- Use a RAM sub-account with minimal permissions. Do NOT use the primary account long-term AK.
- Prefer STS temporary credentials to reduce leak risk.
- Enable AccessKey IP whitelist, allowing only the actual egress NAT IP.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install acme-ssl-automation-for-alibaba-cloud-esa-dns - 安装完成后,直接呼叫该 Skill 的名称或使用
/acme-ssl-automation-for-alibaba-cloud-esa-dns触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
ACME SSL automation for Alibaba Cloud ESA DNS 是什么?
Automatically issue/renew HTTPS certificates using Alibaba Cloud ESA DNS + acme.sh (including wildcard *.example.com + example.com), with optional installati... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 370 次。
如何安装 ACME SSL automation for Alibaba Cloud ESA DNS?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install acme-ssl-automation-for-alibaba-cloud-esa-dns」即可一键安装,无需额外配置。
ACME SSL automation for Alibaba Cloud ESA DNS 是免费的吗?
是的,ACME SSL automation for Alibaba Cloud ESA DNS 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
ACME SSL automation for Alibaba Cloud ESA DNS 支持哪些平台?
ACME SSL automation for Alibaba Cloud ESA DNS 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(linux)。
谁开发了 ACME SSL automation for Alibaba Cloud ESA DNS?
由 dogeow(@dogeow)开发并维护,当前版本 v0.1.4。