Troubleshooting SSL Issues with CapRover and Cloudflare Integration
Why enabling SSL on a CapRover app behind Cloudflare fails with error 1107, and the Cloudflare setting that fixes it.

TL;DR
Tip for users trying to deploy with Cloudflare: it took me a loooong time of
trial and error to find out that you have to disable Always Use HTTPS under
SSL/TLS > Edge Certificates in Cloudflare to be able to enable SSL on a
CapRover app.
Introduction
Deploying applications using CapRover can greatly simplify the management of your NodeJS, Python, PHP, ASP.NET, Ruby, MySQL, MongoDB, Postgres, WordPress, and other applications. However, when integrating CapRover with Cloudflare for SSL/TLS certificates, you may encounter some issues that can prevent your apps from being accessible. In this blog, we will discuss a common problem and its solution when enabling SSL on CapRover apps with Cloudflare.
Problem
After migrating my Express projects to CapRover and configuring the necessary files and (GitHub) Actions, you might find that your app is not accessible. Instead, you encounter a “Nothing here yet :/” screen. If you try the “Enable SSL” button, you’ll see the error “1107: Verification Failed.” as seen in the image below.

Upon investigating, I discovered that the non-SSL version of my app responded
with an HTTP/1.1 301 Moved Permanently status. I did this using this cURL
command:
curl -I http://[project-url]
Note the http, as you’ll try the non-SSL version of your app.
The 301 was strange, because “Force HTTPS by redirecting all HTTP traffic to HTTPS” was not turned on in CapRover.
Furthermore, I noticed that the Server header of the response displayed
cloudflare. This revelation led me to believe that the issue lies within
Cloudflare.
Solution
To resolve the SSL issue with CapRover and Cloudflare, follow these steps:
- Access the Cloudflare dashboard. Log in to your Cloudflare account and navigate to your website’s dashboard.
- Go to SSL/TLS settings. In the Cloudflare dashboard, find the SSL/TLS option and click on it.
- Disable “Always Use HTTPS”. Under the “Edge Certificates” section, locate the “Always Use HTTPS” option and disable it.
- Save changes. After making these changes, save the settings and confirm any prompts that may appear.
After you’ve turned off this setting in the Cloudflare dashboard, you’ll be able to click “Enable SSL” in your CapRover instance immediately.
Explanation
The reason for these issues is that CapRover encounters a verification failure (error code 1107) when trying to enable SSL. With “Always Use HTTPS” on, Cloudflare redirects every HTTP request to HTTPS. This interferes with the verification process conducted by CapRover, or Let’s Encrypt specifically. Disabling this setting prevents the conflict and resolves the verification failure.
Conclusion
Configuring SSL on CapRover apps using Cloudflare integration can sometimes involve troubleshooting unexpected issues. When encountering the “1107: Verification Failed” error, look into your Cloudflare settings and disable “Always Use HTTPS” to resolve the problem.
By following the steps outlined above, you can overcome the SSL verification failure and enable SSL successfully for your CapRover applications. Remember, documenting your debugging process and sharing your solutions with the developer community helps others facing similar challenges.
Happy coding,
Sebastiaan