https://github.com/tiyee/autocert
云厂商https证书自动更新机器人(目前只适配阿里云和腾讯云的域名和cdn),可直接由github action运行,不需要单独服务器。
https://github.com/tiyee/autocert
aliyun-cdn aliyun-ssl automation certbot letsencrypt ssl
Last synced: about 1 month ago
JSON representation
云厂商https证书自动更新机器人(目前只适配阿里云和腾讯云的域名和cdn),可直接由github action运行,不需要单独服务器。
- Host: GitHub
- URL: https://github.com/tiyee/autocert
- Owner: tiyee
- License: mit
- Created: 2024-09-27T11:37:46.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2026-06-27T07:56:14.000Z (about 1 month ago)
- Last Synced: 2026-06-27T09:21:47.929Z (about 1 month ago)
- Topics: aliyun-cdn, aliyun-ssl, automation, certbot, letsencrypt, ssl
- Language: Go
- Homepage:
- Size: 91.8 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AutoCert
云厂商https证书自动更新机器人(目前适配阿里云cdn|腾讯云)
## 使用方法
> go run cmd/main.go --domain="xxx.xxx.com" --email=xxx@xxx.com --product=cdn --certonly --dns-access-key-id=xxxxx --dns-access-key-secret=xxxx --cdn-access-key-id=xxxx --cdn-access-key-secret=xxxx -platform=[aliyun|tencent]
如果只想申请,可以把命令改成:
> go run cmd/apply/main.go --domain="xxx.xxx.com" --email=xxx@xxx.com --product=cdn --certonly --dns-access-key-id=xxxxx --dns-access-key-secret=xxxx --cdn-access-key-id=xxxx --cdn-access-key-secret=xxxx -platform=[aliyun|tencent]
## 参数说明
| 名称 | 类型 | 说明 |
| ---------- | -------- |------------------------------------|
| platform | `string` | 平台,默认aliyun,支持aliyun和tencent |
| domain | `string` | 需要部署证书的域名 |
| email | `string` | 申请者(即你)的邮箱地址 |
| product | `string` | 产品,目前固定cdn |
| certonly | `boolean` | 是否新申请 |
| renew | `boolean` | 是否是更新域名 |
| dns-access-key-id | `string` | dns的AK(主要是申请证书的时候需要添加一条txt记录来验证域名所有权) |
| dns-access-key-secret | `string` | dns的SK |
| cdn-access-key-id | `string` | cdn的AK |
| cdn-access-key-secret | `string` | cdn的SK |
## 说明
dns的秘钥主要是申请证书的时候,let's encrypt需要验证所有权,会写入一条txt解析记录。因此秘钥需要相关的权限
cdn的秘钥是用来查询和部署证书的,也需要相关权限。
dns和cdn可以是相同的秘钥,只需要同时拥有对应权限即可。
申请的证书是RSA2048,目前没有加入配置项,后面可能会加入。
代码是开源的,可自行增加修改。也可以提issue我处理。
## github action 自动运行
直接参考本项目的设置,为了安全,可以把信息放到secret key里