mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-26 01:45:54 +03:00
[GH-ISSUE #3138] DNS challenge with DuckDNS does not work #2130
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#2130
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Rihan9 on GitHub (Aug 16, 2023).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3138
Checklist
jc21/nginx-proxy-manager:latestdocker image?Describe the bug
This isseus is some sort of "reopening" of #2092. We can't request a SSL certificate for a domain hosted on DuckDNS.
In the log we found the following message:
"The DNS response does not contain an answer to the question: mydomain.duckdns.org. IN TXT"Nginx Proxy Manager Version
v2.10.3
To Reproduce
Steps to reproduce the behavior:
Screenshots
@holocronology commented on GitHub (Aug 17, 2023):
Did you delete a cert prior to this? I think there is an error in NPM that the database is not updating when certs are deleted. So NPM starting looking for the folder of the deleted cert, but it is not there. SO it ends up in an error loop looking for these deleted files.
@Rihan9 commented on GitHub (Aug 18, 2023):
I don't think so. The only think that come to my mind is the renew certifica process. Can it cause the deletion of the old certificate?
@devedse commented on GitHub (Aug 24, 2023):
I'm running into exactly the same issue. I've tried to clean everything up an recreate the certificate but no matter what I tried I keep having this issue.
@devedse commented on GitHub (Aug 24, 2023):
Ok I hacked the solution to work.
I found out here:
https://github.com/infinityofspace/certbot_dns_duckdns/issues/21
That apparently you need to add
--dns-duckdns-no-txt-restoreto the certbot commandSo I added that in the certificate.js file.
To fix it on your local docker instance:
Download this file: https://gist.github.com/devedse/b63f79851c44aac27892c95009090325
And mount it in the docker container as a volume:
My full compose file:
@devedse commented on GitHub (Aug 24, 2023):
I'm honestly not sure why and how this works but I would advice the maintainers of nginx-proxy-manager to take a look at this and possibly include this fix in the solution.
@jc21 :)
@devedse commented on GitHub (Aug 24, 2023):
For renewing certificates you need to update the renewal config. In my case here (only required if they were generated before you applied this fix):
Then add this line:
The complete file should look like this:
After this renewal's should work again for DuckDNS
@Rihan9 commented on GitHub (Aug 24, 2023):
@devedse please, let me bow to you.
I can confirm that the fix work like a charm. (I didn't use the binding volumes: i direclty used curl on the container's console to download the new file and replaced the old).
Do I need to touch the config of my cert if it was created after your change? Because if it is needed, I think we need an additional change on the code to avoid it.
@devedse commented on GitHub (Aug 24, 2023):
Nope then you don't need to change it as far as I understand.
The disadvantage of your way is that if you restart/update the container you need to re-apply the change.
@Rihan9 commented on GitHub (Aug 24, 2023):
Yeah, I know, but I'm lazy and I didn't want to access throght ssh, so I used the console via Portainer.
I also don't see why your fix should be posponed in an update other than the next, given that we have 2 different positive response and your fix seems to me quite clean. So I'm positive that there will be no need to re-apply the fix
@devedse commented on GitHub (Aug 24, 2023):
The main thing is that I don't understand "why" my fix is needed. I don't understand DNS well enough for that. The setting we've added should keep the TXT on duckdns after we've proven that we are the owner of said domain. However I don't understand why it needs to remain there. It would make sense to only need to remain there for the duration of the certbot renew.
@Rihan9 commented on GitHub (Aug 24, 2023):
I don't have an answer for you. I know almost nothing about it. My knowledge as a developer is related to CRM software and atomation systems thought python, I'm not a network manager. I'm using this software because is the most efficent and easy solution that I have found to manage my services related to my smart home.
@kruechten commented on GitHub (Jan 4, 2024):
I can confirm this bug is still present and the fix to the container.js from devedse above works. To fix without mounting the file inside your container, you can also just overwrite /app/internal/certificate.js with the contents of his version. Did that through a shell in portainer and now renewal and new certificates work again via DuckDNS challenge.
@Dark-Noir commented on GitHub (Jun 22, 2024):
Hmm, i can't get it to work, i used @devedse solution here: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3138#issuecomment-1691447683
The file is correctly linked in to the container.
@Rihan9 commented on GitHub (Sep 25, 2024):
Hi all,
we are still without a solution? I can't update my container until this issue is resolved, so I'm probably missing some security patch here.
@Dark-Noir commented on GitHub (Sep 25, 2024):
It seems to be a DuckDNS issue, check here.
I changed to my own DNS and it works fine.
@Rihan9 commented on GitHub (Oct 23, 2024):
Hi,
I'm going to close this issue due to a 1 year+ waiting for nothing. Due to other problems I've switched to another reverse proxy, so I lost interest to a possible fix to this. Have a nice day!
@Icakis commented on GitHub (Nov 11, 2024):
Hello,
I had the same problem but i'm using it with LXC container in proxmox and I have to install newer version of certbot.
sudo pip install certbot-dns-duckdnsCurrently it's working with versions:
certbot==2.1.0
certbot-dns-cloudflare==2.0.0
certbot-dns-multi==4.18.0
certbot_dns_duckdns==1.4
Also you should use 120 value for progation in seconds, because default it's not enough.
I now this issue is for docker container, but I found only this which is close to mine and can help someone to save some time.