mirror of
https://github.com/acme-dns/acme-dns.git
synced 2026-04-27 04:45:48 +03:00
[GH-ISSUE #176] How to use acme-dns with Traefik in a docker container? #71
Labels
No labels
Documentation
Documentation
bug
enhancement
feature request
feature request
help wanted
pull-request
question
security
security
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/acme-dns#71
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 @fairwood136 on GitHub (Aug 28, 2019).
Original GitHub issue: https://github.com/acme-dns/acme-dns/issues/176
Do you have an example of using Traefik (v2.0) using acme-dns in a docker container? I've used acme-dns in a container by itself, and it works great. When I add Traefik to the mix, I run into issues. Either I get a 504 Bad Gateway error or it can't talk to port 53.
Any ideas?
@joohoi commented on GitHub (Sep 3, 2019):
Unfortunately I haven't personally tested such scenario.
@mrybak-ng commented on GitHub (Sep 27, 2019):
@fairwood136 do you have any solution to this issue?
@sbocinec commented on GitHub (Nov 7, 2019):
@fairwood136 / @mrybak-ng Traefik v1 is only a L7/HTTP load balancer/proxy, it can not handle TCP/UDP traffic so it was technically not possible to have neither tcp/53 not udp/53 working behind the proxy. Traefik v2 that has been released recently (mid Sept 2019) can now handle also TCP traffic, however, for the DNS server to work properly and securely, you need the proxy to handle the udp/53 port, what neither the traefik v2 can do.
You can still use traefik to handle the API HTTP requests for acme-dns but to have the DNS working you need to look elsewhere.
@justinvoelker commented on GitHub (Feb 11, 2020):
Though I'm slightly clueless about the technical details of how this needs to be implemented to work for us (using Traefik v2), might this just-merged PR be the ticket to getting this working?Maybe not. I just built the traefik container from source and am still receiving the 502 gateway error.
@justinvoelker commented on GitHub (Feb 13, 2020):
After three nights of effort, I have acme-dns working with Traefik v2. Not sure about your setup, but under v1 I had Traefik handle the HTTP traffic and simple exposed ports for the DNS portion (both TCP and UDP). When that didn't work with v2, I tried building Traefik from source to try the very recent updates that included UDP routing.
When nothing worked, I started over. Why didn't the same basic setup from v1 (Traefik for HTTP, exposed ports for DNS) work for v2? I don't know why, but it turns out that the typical "traefik.port=80" from v1 for the HTTP traffic does not work in this situation (I believe it has to do with the image exposing multiple ports). Something I found when trying to work with TCP/UDP was that you can directly assign ports to a router via a service. In the config below, I added the last two lines which tell the router to use a new service and define that service along with the port it should use.
With this config I was able to successfully pull a new wildcard certificate just a few minutes ago.
@totti777 commented on GitHub (Mar 6, 2020):
Hi @justinvoelker ,
Could you paste your docker-compose.yml and how you configure config of acme-dns? Please it's impossible for me configure acme-dns and traefik, I need to validate certificates with dns-challange.
Regards,
@justinvoelker commented on GitHub (Mar 8, 2020):
@totti777 If you walk through the README document of this project it has a thorough walk through of setting up acme-dns that is easy to adapt to Traefik v1. Not sure if you are trying v1 or v2 but our problems here were using Traefik v2 and the small change to the labels I posted above are all that is necessary to move from Traefik v1 to v2.
@fairwood136 or @joohoi this issue can be closed since the addition of the Traefik v2 service config with loadbalancer port produces a working result.
@Kugelschieber commented on GitHub (Dec 5, 2020):
In case anyone is looking for this, here is my working configuration. It also runs an additional container for a docker registry (not included here), so you should be able to add more services without interfering with acme-dns. I had to look up the service name for acme-dns on the Traefik dashboard. The server is called "utility" and therefore the service is acmedns-utility. This might be different for you. Notice that I have removed the domain name, paths to volumes, and my mail address. You should adjust them to your needs.
@kadaan commented on GitHub (Jun 14, 2021):
@Kugelschieber Thanks for the docker-compose config. What does the config file for acme-dns look like?
@Kugelschieber commented on GitHub (Jun 14, 2021):
That should look something like this:
@kadaan commented on GitHub (Jun 14, 2021):
@Kugelschieber Did you configure any of the acme-dns specific options in the config.cfg file (this one: https://github.com/joohoi/acme-dns/blob/master/config.cfg)
I'm wondering about how those two config (docker-compose.yml and config.cfg) interact.
@Kugelschieber commented on GitHub (Jun 14, 2021):
Hmm, I didn't make any special changes to that file. You just need to make sure the ports are open.