Help creating certificate for nextcloud with Duckdns and Nging

Hi,
new to DietPi but used to Raspbian,
I’m trying to get a certificate for my nextcloud server. As dynDns I’m using Duckdns because I always used it without many problems.
I setup Nextcloud with nginx.
I’m trying to get a certificate with letsencrypt using the built-in command but it always fail at the secondary validation.
Here’s the log:



Certbot failed to authenticate some domains (authenticator: nginx). The Certificate Authority reported these problems:
  Domain: tomms.duckdns.org
  Type:   connection
  Detail: During secondary validation: 79.22.168.21: Fetching http://tomms.duckdns.org/.well-known/acme-challenge/5ZcAr6iI6Rx-QThWh3ei9vnvS8-zsVkxDDjVqds1QaY: Timeout during connect (likely firewall problem)

Hint: The Certificate Authority failed to verify the temporary nginx configuration changes made by Certbot. Ensure the listed domains point to this nginx server and that it is accessible from the internet.

I never had problems with Duckdns so I’m assuming it’s not the case, it could be nginx but idk. However the port forwarding it’s working right so it’s not the case.