# Using Let's Encrypt with Cloudflare

**URL:** <https://forum.hestiacp.com/t/using-lets-encrypt-with-cloudflare/20698>\
**Category:** DNS\
**Created:** [December 3, 2025, 7:44pm UTC](https://forum.hestiacp.com/t/using-lets-encrypt-with-cloudflare/20698 "2025-12-03T19:44:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wonder](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/w/a587f6/32.png) [@Wonder](https://forum.hestiacp.com/u/Wonder)\
**Post date:** [December 3, 2025, 7:44pm UTC](https://forum.hestiacp.com/t/using-lets-encrypt-with-cloudflare/20698/1 "2025-12-03T19:44:00Z")

</div>

Hello,  
As you can see, I’m new here. I’m starting to try out Hetsia and see if I can move my websites/VPSs to it.

Before posting this question, I searched, but I didn’t find anything helpful, so please excuse me if this has already been addressed, but I missed it.

I’ve seen threads like these:

> [@Cloudflare SSL certificate](https://forum.hestiacp.com/t/cloudflare-ssl-certificate/2433):
>
> Hello, and happy holidays How can use SSL certificate from Cloudflare? PEM, I tried different variations but no luck,

> [@Trying to configure test.domain.com with Let's Encrypt SSL support](https://forum.hestiacp.com/t/trying-to-configure-test-domain-com-with-lets-encrypt-ssl-support/6207):
>
> I’m trying to add a test version of my site with Let’s Encrypt SSL support. I’m using CloudFlare for the root domain, and the subdomain is proxied through CloudFlare. In Hestia, I have a Web Domain for the main site ([domain.com](http://domain.com)), and a second Web Domain for [test.domain.com](http://test.domain.com). In the Edit Web Domain settings for the test subdomain, if I try to tick ‘Use Lets Encrypt to obtain SSL certificate’ and Save, it tells me ‘DNS record for [test.domain.com](http://test.domain.com) doesn’t exist’ I…

But as I mentioned, either they’re not helpful, or the links they have, while leading to the official Hetsia documentation, are no longer available.

The website I started with is hosted on Cloudflare, so even if I select Let’s Encrypt, it doesn’t generate the certificate.

I’ve seen threads like these:

> [@Cloudflare SSL certificate](https://forum.hestiacp.com/t/cloudflare-ssl-certificate/2433):
>
> Hello, and happy holidays How can use SSL certificate from Cloudflare? PEM, I tried different variations but no luck,

> [@Trying to configure test.domain.com with Let's Encrypt SSL support](https://forum.hestiacp.com/t/trying-to-configure-test-domain-com-with-lets-encrypt-ssl-support/6207):
>
> I’m trying to add a test version of my site with Let’s Encrypt SSL support. I’m using CloudFlare for the root domain, and the subdomain is proxied through CloudFlare. In Hestia, I have a Web Domain for the main site ([domain.com](http://domain.com)), and a second Web Domain for [test.domain.com](http://test.domain.com). In the Edit Web Domain settings for the test subdomain, if I try to tick ‘Use Lets Encrypt to obtain SSL certificate’ and Save, it tells me ‘DNS record for [test.domain.com](http://test.domain.com) doesn’t exist’ I…

But as I mentioned, either they’re not helpful, or the links they contain, while leading to the official Hetsia documentation, are no longer available.

The website I started with is hosted on Cloudflare, so even if I select Let’s Encrypt, it doesn’t generate the certificate.

I understand that I need to set the A and AAAA records to gray (not proxyed) for it to generate, but if I do that, will the certificate be automatically renewed when the time comes?

Or is there another way?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![linkp](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/linkp/32/2863_2.png) [@linkp](https://forum.hestiacp.com/u/linkp)\
**Post date:** [December 3, 2025, 9:48pm UTC](https://forum.hestiacp.com/t/using-lets-encrypt-with-cloudflare/20698/2 "2025-12-03T21:48:42Z")

</div>

Welcome to the HestiaCP forum.

> [@Wonder](#):
>
> I understand that I need to set the A and AAAA records to gray (not proxyed) for it to generate

That understanding is incorrect. I use Let’s Encrypt certificates on my origins with the Cloudflare proxy always enabled. Make sure that you dont have any settings in your Cloudflare config that could disrupt the HTTP-01 challenge, such as _Always use HTTPS_.

I like to use Config Rules to force requests to the `/.well-known/acme-challenge` path to use HTTP among a few other settings. You can see a somewhat complete selection here:

> [@Error: Let’s Encrypt finalize bad status 403 - mail domain](https://forum.hestiacp.com/t/error-let-s-encrypt-finalize-bad-status-403-mail-domain/16274/6):
>
> I moved away from Page Rules for ACME challenge configs in Cloudflare. I use the Configuration and Cache Rules now. I don’t make any specific WAF changes, only the following: Configuration Rules: Name: ACME Challenge Expression: (starts\_with(http.request.uri.path, "/.well-known/acme-challenge/")) Automatic HTTPS Rewrites: Off Browser Integrity Check: Off Opportunistic Encryption: Off Security Level Essentially Off SSL: Off Cache Rules: Name: ACME Challenge Expression: (starts\_with(htt…

See if that helps. You should be able to use the native HestiaCP options to obtain Let’s Encrypt certificates once your Cloudflare is set up correctly.

Another option is to use [Cloudflare Origin CA certificates](https://developers.cloudflare.com/ssl/origin-configuration/origin-ca/), but they are incompatible with direct access, due to only being trusted by the Cloudflare edge. This limits them to use with only proxied HTTPS traffic.

---

<div class="post-metadata">

**Author:** ![Wonder](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/w/a587f6/32.png) [@Wonder](https://forum.hestiacp.com/u/Wonder)\
**Post date:** [December 3, 2025, 10:23pm UTC](https://forum.hestiacp.com/t/using-lets-encrypt-with-cloudflare/20698/3 "2025-12-03T22:23:35Z")

</div>

Well, I sincerely appreciate your response and the link.

When creating the domain in the Hestia panel, I specified Let’s Encrypt, but once I logged in with the user created for the domain, went to the domain, clicked edit, and all the SSL options were disabled. Therefore, I deduced that it couldn’t install any certificates because it’s behind Cloudflare.

In some links (as I mentioned, I’ve read quite a few on the subject) I read that it was necessary to disable something in Cloudflare (I’m saying this from memory, I might be mistaken about the name, something like “bot fight” and something related to Boots (I don’t remember the name), but I hadn’t seen what you mention in your link, disabling “Always use HTTPS”.

Indeed, I’ve never been a fan of using Cloudflare Origin CA certificates because they’ve always given me problems on my sites, issues with email (SANS, etc.) or similar.

I prefer to use the native options as you mentioned.

I understand that, in the domain, I have to enable SSL and the options “Enable automatic redirection to HTTPS” and “Enable HTTP Strict Transport Security (HSTS).”

I was surprised that they were disabled because when I created the domain I specified that it should use Let’s Encrypt.

Tomorrow (it got very late today, it’s very late at night here) I’ll try it. I’ve had Cloudflare configured for a long time, but if I currently have “Always use HTTPS” enabled, I’ll disable it tomorrow.

Thanks again for your reply and the link.

---

<div class="post-metadata">

**Author:** ![Wonder](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/w/a587f6/32.png) [@Wonder](https://forum.hestiacp.com/u/Wonder)\
**Post date:** [December 4, 2025, 8:49pm UTC](https://forum.hestiacp.com/t/using-lets-encrypt-with-cloudflare/20698/4 "2025-12-04T20:49:40Z")

</div>

> [@linkp](#):
>
> Welcome to the HestiaCP forum.
> 
> > [@Wonder](#):
> >
> > I understand that I need to set the A and AAAA records to gray (not proxyed) for it to generate
> 
> That understanding is incorrect. I use Let’s Encrypt certificates on my origins with the Cloudflare proxy always enabled. Make sure that you dont have any settings in your Cloudflare config that could disrupt the HTTP-01 challenge, such as _Always use HTTPS_.
> 
> I like to use Config Rules to force requests to the `/.well-known/acme-challenge` path to use HTTP among a few other settings. You can see a somewhat complete selection here:
> 
> [Error: Let’s Encrypt finalize bad status 403 - mail domain - #6 by linkp](https://forum.hestiacp.com/t/error-let-s-encrypt-finalize-bad-status-403-mail-domain/16274/6)
> 
> See if that helps. You should be able to use the native HestiaCP options to obtain Let’s Encrypt certificates once your Cloudflare is set up correctly.
> 
> Another option is to use [Cloudflare Origin CA certificates](https://developers.cloudflare.com/ssl/origin-configuration/origin-ca/), but they are incompatible with direct access, due to only being trusted by the Cloudflare edge. This limits them to use with only proxied HTTPS traffic.

I tried it today just like you said. First, I tried it with minimal changes in Cloudflare, and it worked perfectly on the first try… strange for me, but it worked flawlessly.  
I created a rule in page rules similar to the one you mentioned and disabled HTTPS rewrite, left the DNS entries proximized (in orange), and it generated the certificate on the first try.  
Thank you so much!

---

<div class="post-metadata">

**Author:** ![system](https://forum.hestiacp.com/uploads/default/original/1X/d9a5b68bf50ced83e880b56452e592b204761b19.png) [@system](https://forum.hestiacp.com/u/system)\
**Post date:** [January 3, 2026, 8:50pm UTC](https://forum.hestiacp.com/t/using-lets-encrypt-with-cloudflare/20698/5 "2026-01-03T20:50:20Z")

</div>

Closed on January 3, 2026, 8:50pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
