Can't open Nextcloud and can't get certificate


I installed the Nextcloud-docker-AIO on my raspberry pi 4, everything went fine.
But when I try to open Nextcloud I get the error

Fehler: Gesicherte Verbindung fehlgeschlagen

Beim Verbinden mit trat ein Fehler auf. Die Gegenstelle meldet, dass sie auf einen internen Fehler gestoßen ist.


I configured my DynDNS correctly and opened all relevant ports and pointed them to the raspberry pi.

In the Apache log it says:

{"level":"error","ts":1656931103.9644682,"logger":"tls.issuance.acme.acme_client","msg":"challenge failed","identifier":"","challenge_type":"tls-alpn-01","problem":{"type":"urn:ietf:params:acme:error:connection","title":"","detail":"2003:e4:9fff:1e91:6e3:1aff:feb1:7b9d: Timeout during connect (likely firewall problem)","instance":"","subproblems":[]}}
{"level":"error","ts":1656931103.9646246,"logger":"tls.issuance.acme.acme_client","msg":"validating authorization","identifier":"","problem":{"type":"urn:ietf:params:acme:error:connection","title":"","detail":"2003:e4:9fff:1e91:6e3:1aff:feb1:7b9d: Timeout during connect (likely firewall problem)","instance":"","subproblems":[]},"order":"","attempt":1,"max_attempts":3}
{"level":"error","ts":1656931103.9647973,"logger":"tls.obtain","msg":"could not get certificate from issuer","identifier":"","issuer":"","error":"HTTP 400 urn:ietf:params:acme:error:connection - 2003:e4:9fff:1e91:6e3:1aff:feb1:7b9d: Timeout during connect (likely firewall problem)"}
{"level":"error","ts":1656931103.9648912,"logger":"tls.obtain","msg":"will retry","error":"[] Obtain: [] solving challenge: [] authorization failed: HTTP 400 urn:ietf:params:acme:error:connection - 2003:e4:9fff:1e91:6e3:1aff:feb1:7b9d: Timeout during connect (likely firewall problem) (ca=","attempt":1,"retrying_in":60,"elapsed":12.094173184,"max_duration":2592000}

Can anyone help, please?

I checked it with SSL Server Test (Powered by Qualys SSL Labs) . There are different possibilities. First maybe you have configured IPv4 and IPv6. Maybe you first deactivate IPv6. However, the error is probably not related to this.

How have you configured TLS/SSL. Please post your installation guide and your settings.

From inspection of your server header response, it seems you are using Caddy web server…

I’ve never used that server. However, it looks like it’s pre-packaged with an automated TLS cert acquisition and renewal process.

The documentation indicates an ordered list of challenges. It’s probably best to configure the DNS challenge since you are using DynDNS. That way the certificate should be issued no matter how complexly configured your proxy:

Of course, you might want to try a less automated server, which may have a larger support/documentation pool…

Here’s the Caddy TLS documentation for further reading:

Are you running the AIO master container or just some of the other containers from the AIO project? It makes a difference in how SSL needs to be handled.

I use the AIO master container.
I Just followed the instructions on the AIO GitHub page