Getting 404 error with linuxserver/letsencrypt using a IPv6 DNS record on an IPv4 only server

I’m attempting to set up a letsencrypt container that will allow me to reverse proxy. So I was really happy that the linuxserver/letsencrypt exists.

When running the container for the first time after configuration, i get the error that the http-01 challenges have failed and the response was a 404 message.

when i run the linuxserver/nginx container using the same domain, I do manage to get a response on port 80. that tells me that DNS and firewall have been configured correctly, and the error is presumably with the letsencrypt configuration.
I have pasted my docker-compose.yaml below. I would like to know what steps I can take to troubleshoot the issue.

Ps, seems the latest update was aimed at fixing some issues with ssl.conf. Could this be related?

version: "2.1"
services:
  letsencrypt:
    image: linuxserver/letsencrypt
    container_name: letsencrypt
    cap_add:
      - NET_ADMIN
     environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Amsterdam
      - URL=<mydomain>.nl
      - SUBDOMAINS=www,
      - VALIDATION=http
      - PROPAGATION= #optional
      - EMAIL= <user>@gmail.com 
      - ONLY_SUBDOMAINS=false #optional
      - EXTRA_DOMAINS= #optional
    volumes:
      - /home/<usr>/docker-config-files/nginx_and_letsencrypt/config:/config
    ports:
      - 80:80
      - 443:443
    restart: unless-stopped

Quick update, this is the HTTP error I’m recieving. It appears that the domain is pointing to an ipv6 adress. It was a setting default for my provider. I dont have ipv6 set up and I’m not routing to that adress. Is it safe to delete the AAAA record, or will that land me in hot water?

http://<my-domain>.nl/.well-known/acme-challenge/3Cxedzkd22wgxTB1pACnneEn7Mvk0G1kLwkUL9LLxfE
[2a06:2ec0:1::ffed]: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML
2.0//EN\">\n<html><head>\n<title>404 Not
Found</title>\n</head><body>\n<h1>Not Found</h1>\n<p>"

When you set up nginx, are you accessing from a cell phone with wifi turned off, using the domain with http (over port 80)?

to be honest, I wasn’t. however, I just checked it and the nginx container it does in fact work though a cell phone over 4G with both the bare my-domain.nl and www.my-domain.nl

Quick update, this is the HTTP error I’m recieving. It appears that the domain is pointing to an ipv6 adress. It was a setting default for my provider. I dont have ipv6 set up and I’m not routing to that adress. Is it safe to delete the AAAA record, or will that land me in hot water?

http://<my-domain>.nl/.well-known/acme-challenge/3Cxedzkd22wgxTB1pACnneEn7Mvk0G1kLwkUL9LLxfE
[2a06:2ec0:1::ffed]: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML
2.0//EN\">\n<html><head>\n<title>404 Not
Found</title>\n</head><body>\n<h1>Not Found</h1>\n<p>"

with both http://domain.url and http://www.domain.url?

sorry, I clarified that above. I tried both.

If you’re not using ipv6, you have a dns record that’s pointing to a random ip that is not your server and that’s why letsencrypt servers can’t reach your server. Delete that

I just did. that solved my problem. thank you very much

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.