[GH-ISSUE #321] 签发证书时能否增加DNS记录的检测时间? #177

Closed
opened 2026-02-26 12:07:32 +03:00 by kerem · 8 comments
Owner

Originally created by @jearton on GitHub (Feb 28, 2024).
Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/321

签发证书的成功率有点低,50%都不到,全都是因为DNS记录检测超时导致的。我用的阿里云DNS凭证

Originally created by @jearton on GitHub (Feb 28, 2024). Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/321 签发证书的成功率有点低,50%都不到,全都是因为DNS记录检测超时导致的。我用的阿里云DNS凭证
kerem 2026-02-26 12:07:32 +03:00
Author
Owner

@0xJacky commented on GitHub (Feb 28, 2024):

可以试下配置一下环境变量

image
<!-- gh-comment-id:1968184409 --> @0xJacky commented on GitHub (Feb 28, 2024): 可以试下配置一下环境变量 <img width="632" alt="image" src="https://github.com/0xJacky/nginx-ui/assets/13096985/968909da-be6f-443f-949f-94bcd2e3bacb">
Author
Owner

@0xJacky commented on GitHub (Feb 28, 2024):

对应 UI 里的几个值,我看 lego 的代码是会读取这个 env 的,这个我没法控制,实在不行建议给宿主机换个 DNS。我 CF 还没遇到失败的.

<!-- gh-comment-id:1968185080 --> @0xJacky commented on GitHub (Feb 28, 2024): 对应 UI 里的几个值,我看 lego 的代码是会读取这个 env 的,这个我没法控制,实在不行建议给宿主机换个 DNS。我 CF 还没遇到失败的.
Author
Owner

@jearton commented on GitHub (Feb 28, 2024):

可以,有配置能自己控制时间就行

<!-- gh-comment-id:1968187524 --> @jearton commented on GitHub (Feb 28, 2024): 可以,有配置能自己控制时间就行
Author
Owner

@jearton commented on GitHub (Feb 28, 2024):

@0xJacky 顺便请教一下,这个证书多久会自动续期?

<!-- gh-comment-id:1968189038 --> @jearton commented on GitHub (Feb 28, 2024): @0xJacky 顺便请教一下,这个证书多久会自动续期?
Author
Owner

@0xJacky commented on GitHub (Feb 28, 2024):

目前是每7天重签,不过看起来在证书多的情况下会有问题 #319

<!-- gh-comment-id:1968189917 --> @0xJacky commented on GitHub (Feb 28, 2024): 目前是每7天重签,不过看起来在证书多的情况下会有问题 #319
Author
Owner

@jearton commented on GitHub (Feb 28, 2024):

感觉有点频繁了,毕竟有3个月有效期呢,在过期前几天签就足够了吧。acme.sh 这个项目里是每2个月自动续签,而且续签万一失败,最好能发个机器人消息通知出来,通知到飞书,钉钉,slack这类办公软件里,不然感知不到

<!-- gh-comment-id:1968198958 --> @jearton commented on GitHub (Feb 28, 2024): 感觉有点频繁了,毕竟有3个月有效期呢,在过期前几天签就足够了吧。acme.sh 这个项目里是每2个月自动续签,而且续签万一失败,最好能发个机器人消息通知出来,通知到飞书,钉钉,slack这类办公软件里,不然感知不到
Author
Owner

@0xJacky commented on GitHub (Feb 28, 2024):

目前,如果还剩半个月没能正常续签 let's encrypted 会给你发邮件的

<!-- gh-comment-id:1968208498 --> @0xJacky commented on GitHub (Feb 28, 2024): 目前,如果还剩半个月没能正常续签 let's encrypted 会给你发邮件的
Author
Owner

@sofusskovgaard commented on GitHub (Feb 28, 2024):

Currently, if there is half a month left and the renewal fails, Let's Encrypt will send you an email.

@0xJacky as I mentioned in #319, you're never actually renewing the same certificate. Meaning the original certificate will run out every time and the user will receive an email every time no matter what. This also means you could receive up to 52 ish emails a year about certificates.

It feels a bit frequent. After all, it is valid for 3 months. It is enough to sign a few days before expiration. The acme.sh project automatically renews every 2 months, and if the renewal fails, it is best to send a robot message to notify it and notify it in office software such as Feishu, DingTalk, and Slack, otherwise, it will not be detected.

I agree with @jearton. Start trying to renew the certificate when it has 30 days left to live. If it fails the user should be notified by nginx-ui about the failing renewal. Retry for n days, if it fails or succeeds notify the user so they're informed and have a long time to take action.

I hope Google Translate didn't butcher your comments 🙏

<!-- gh-comment-id:1968556355 --> @sofusskovgaard commented on GitHub (Feb 28, 2024): > Currently, if there is half a month left and the renewal fails, Let's Encrypt will send you an email. @0xJacky as I mentioned in #319, you're never actually renewing the same certificate. Meaning the original certificate will run out every time and the user will receive an email every time no matter what. This also means you could receive up to 52 ish emails a year about certificates. > It feels a bit frequent. After all, it is valid for 3 months. It is enough to sign a few days before expiration. The acme.sh project automatically renews every 2 months, and if the renewal fails, it is best to send a robot message to notify it and notify it in office software such as Feishu, DingTalk, and Slack, otherwise, it will not be detected. I agree with @jearton. Start trying to renew the certificate when it has 30 days left to live. If it fails the user should be notified by nginx-ui about the failing renewal. Retry for `n` days, if it fails or succeeds notify the user so they're informed and have a long time to take action. *I hope Google Translate didn't butcher your comments 🙏*
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-ui#177
No description provided.