But you still won’t be able to install, as let’s encrypt requires direct access to ports 80 an 443 to issue a certificate.
After you’ve got your certificate and Discourse is installed you can search for topics about how to make it work with cloudflare in the middle (which includes using the cloudflare template).