If all is well (both at Fly’s end, and Let’s encrypt’s) it should be seconds/minutes
But … I recall adding Cloudflare in to the mix adding complexity because (naturally) it intercepts the requests and so does not return the expected A/AAAA values. As you describe, the solution should (in theory) be to add a sibling non-proxied (aka grey cloud) record which has the acme challenge value. That should be sufficient to pass the validation.
However it may be complicated if using an apex domain. I’m not sure if you mention mydomain.com for brevity or whether it’s an actual apex but there may be a difference between requesting a cert for:
example.com *.example.com (ie a wildcard one) www.example.com (specific subdomain).
… at least based on the numerous replies to this thread. I recall a while back that e.g www.example.com proxied (orange cloud) behind Cloudflare (with the sibling non-proxied acme challenge record) was near-instant … but using e.g example.com with the same setup wasn’t:
Perhaps someone who has done it more recently will have more knowledge
However, I don’t know if the cert will automatically renew with this setup. I might find that in 90 days my cert will expire and my site will break. Any thoughts on this?
Ah … ok … so yep that will solve it for now. Disabling Cloudflare and then requesting the certificate means it behaves as if it will never be there. Hence it all works and the certificate arrives.
However yep, you correctly point out the problem then moves to renewing it in X months. Since the same thing will happen then. Fly will check your apex domain, not get the expected response, and (I assume) would therefore once again fail the validation.
The question is what happens then .
Cloudflare would now be handling the client TLS bit, using its certificate. As you can see in your browser by clicking on the little icon to the left of the address bar. Fly not being able to re-validate its certificate would mean that one expires … but the Cloudflare one would still be ok. I don’t know what impact that has, if any, on the internal Cloudflare → Fly part.
I wonder if you would need its “Flexible” mode
It would need someone else who has done this to say definitively either way.