Caddy in Docker on Synology NAS

I’ve played around with a few caddyfiles, and even re-created the caddy container and tried different ports, none have worked, using the caddyfile above I am getting the below now though:

C:\Users\USER>curl -v https://mydomain.ddns.net
* Rebuilt URL to: https://mydomain.ddns.net/
*   Trying MY IP...
* TCP_NODELAY set
* Connected to mydomain.ddns.net (MY IP) port 443 (#0)
* schannel: SSL/TLS connection with mydomain.ddns.net port 443 (step 1/3)
* schannel: checking server certificate revocation
* schannel: sending initial handshake data: sending 189 bytes...
* schannel: sent initial handshake data: sent 189 bytes
* schannel: SSL/TLS connection with mydomain.ddns.net port 443 (step 2/3)
* schannel: failed to receive handshake, SSL/TLS connection failed
* Closing connection 0
* schannel: shutting down SSL/TLS connection with mydomain.ddns.net port 443
* Send failure: Connection was aborted
* schannel: failed to send close msg: Failed sending data to the peer (bytes written: -1)
* schannel: clear security context handle
curl: (35) schannel: failed to receive handshake, SSL/TLS connection failed

C:\Users\USER>curl -v https://mydomain.ddns.net:80
* Rebuilt URL to: https://mydomain.ddns.net:80/
*   Trying MY IP...
* TCP_NODELAY set
* Connected to mydomain.ddns.net (MY IP) port 80 (#0)
* schannel: SSL/TLS connection with mydomain.ddns.net port 80 (step 1/3)
* schannel: checking server certificate revocation
* schannel: sending initial handshake data: sending 189 bytes...
* schannel: sent initial handshake data: sent 189 bytes
* schannel: SSL/TLS connection with mydomain.ddns.net port 80 (step 2/3)
* schannel: failed to receive handshake, need more data
* schannel: SSL/TLS connection with mydomain.ddns.net port 80 (step 2/3)
* schannel: encrypted data got 103
* schannel: encrypted data buffer: offset 103 length 4096
* schannel: next InitializeSecurityContext failed: SEC_E_INVALID_TOKEN (0x80090308) - The token supplied to the function is invalid
* Closing connection 0
* schannel: shutting down SSL/TLS connection with mydomain.ddns.net port 80
* schannel: clear security context handle
curl: (35) schannel: next InitializeSecurityContext failed: SEC_E_INVALID_TOKEN (0x80090308) - The token supplied to the function is invalid

C:\Users\USER>curl -v https://mydomain.ddns.net:443
* Rebuilt URL to: https://mydomain.ddns.net:443/
*   Trying MY IP...
* TCP_NODELAY set
* Connected to mydomain.ddns.net (MY IP) port 443 (#0)
* schannel: SSL/TLS connection with mydomain.ddns.net port 443 (step 1/3)
* schannel: checking server certificate revocation
* schannel: sending initial handshake data: sending 189 bytes...
* schannel: sent initial handshake data: sent 189 bytes
* schannel: SSL/TLS connection with mydomain.ddns.net port 443 (step 2/3)
* schannel: failed to receive handshake, SSL/TLS connection failed
* Closing connection 0
* schannel: shutting down SSL/TLS connection with mydomain.ddns.net port 443
* Send failure: Connection was aborted
* schannel: failed to send close msg: Failed sending data to the peer (bytes written: -1)
* schannel: clear security context handle
curl: (35) schannel: failed to receive handshake, SSL/TLS connection failed

I’ve cleaned up all the other ports I used for my working Windows 10 reverse proxy so it is just this now:

And the logs in the Caddy container are giving me this:

2021/07/04 11:34:21.558	ERROR	tls.issuance.acme	looking up info for HTTP challenge	{"host": "mydomain.ddns.net", "error": "no information found to solve challenge for identifier: mydomain.ddns.net"}

My container has these ports also, not sure if having this means I don’t need to set the http/s port in the file though: