Closed p-baum closed 5 years ago
This happens most likely because Let's Encrypt cannot request records from your acme-dns
instance. The listen
configuration directive should be an address that a client can connect from the public internet.
If your server has the IP address that you pointed to with the NS record, you should use that for the listen
address, but in some environments the interfaces might be behind port forwarding firewall.
OK. Thankyou for the quick response.
I changed listen to my external IP address. Now I get this:
Creating network "acmedns_default" with the default driver
Creating acme-dns ... done
Attaching to acme-dns
acme-dns | time="2019-10-30T15:45:59Z" level=info msg="Using config file" file=/etc/acme-dns/config.cfg
acme-dns | time="2019-10-30T15:45:59Z" level=info msg="Connected to database"
acme-dns | time="2019-10-30T15:45:59Z" level=debug msg="Adding new record to domain" domain=auth.hauscloud.de. recordtype=A
acme-dns | time="2019-10-30T15:45:59Z" level=debug msg="Adding new record to domain" domain=auth.hauscloud.de. recordtype=NS
acme-dns | time="2019-10-30T15:45:59Z" level=debug msg="Adding new record to domain" domain=auth.hauscloud.de. recordtype=SOA
acme-dns | time="2019-10-30T15:45:59Z" level=info msg="Listening DNS" addr="78.46.189.59:53" proto=tcp4
acme-dns | time="2019-10-30T15:45:59Z" level=fatal msg="listen tcp4 78.46.189.59:53: bind: cannot assign requested address"
acme-dns exited with code 1
my docker-compose looks like this:
version: '3'
services:
acmedns:
image: joohoi/acme-dns:latest
container_name: "acme-dns"
ports:
- "78.46.189.59:53:53"
- "80:80"
volumes:
- "/root/acmedns/config:/etc/acme-dns:ro"
- "/root/acmedns/data:/var/lib/acme-dns"
The hosts netstat looks like this:
root@hc1:~# netstat -pant
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 18343/systemd-resol
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1122/sshd
tcp 0 0 78.46.189.59:22 101.51.149.248:61798 ESTABLISHED 29938/sshd: [accept
tcp 0 0 78.46.189.59:22 112.85.42.237:40244 ESTABLISHED 29935/sshd: [accept
tcp 0 340 78.46.189.59:22 81.171.75.163:46392 ESTABLISHED 29939/sshd: root@pt
tcp 0 1 78.46.189.59:22 112.85.42.237:22636 FIN_WAIT1 -
tcp6 0 0 :::22 :::* LISTEN 1122/sshd
tcp6 0 0 :::2376 :::* LISTEN 7280/dockerd
I finally got it running:
The working combination is:
docker-compose.yml
ports:
- "$EXTERNAL_HOST_IP:53:53/tcp"
- "$EXTERNAL_HOST_IP:53:53/udp"
- "80:80"
config.cng
[general]
listen = "0.0.0.0:53"
[api]
ip = "0.0.0.0"
Hi everyone,
I also struggled with this situation, only for me I wasn't using just docker-compose but also had a couple layers in between - like this: Router <-> keepalived <-> nginx <-> acme-dns
The answer that is in this thread still applies, but instead of $EXTERNAL_HOST_IP you can put in the docker host ip address - for example, if the host running docker has an ip address of 192.168.0.55 assigned to it by your network dhcp server and you are routing via port 5353 then you can use this in the ports section:
ports:
- "192.168.0.55:5353:53
Just a heads up!
I don't know what I'm doing wrong but I can't for life of me get this working with docker. The best I can get is:
At namecheap I have the following records:
A record: auth.hauscloud.de > 78.46.189.59 NS record: auth > auth.hauscloud.de (namecheap adds the domain)
my latest conf attempt looks like this:
It is unclear to me what IP addresses I should use for 'api' and 'general' section so i have tried all permutations i can think of.
Why does it never work?