Getting certificate for server in subdomain with dynamic IP possible?

I thought that letsencrypt automatically configures Apache to do that?

Accessing the server from local lan works correctly - therfore I assume
the certificate is used. But when accessing the server from outside world
(via router) it is not!