How to set-up cloudflare with fly.io without fly certificates?

Hi, how to set-up cloudflare(their ssl) to work with fly.io?

I have added A and AAAA records. I enabled full-ssl mode in cloudflare.

But when i try to access my domain i got error:
via http

Error code 520 
There is an unknown connection issue between Cloudflare and the origin web server. As a result, the web page can not be displayed.

via https:

error 525
SSL handshake failed
Cloudflare is unable to establish an SSL connection to the origin server.

IDK what to do and how to investigate what really is the problem. I did not set up any certificates on fly or did not manually generate them

You have to disable full ssl-mode(the orange cloud) and use fly ssl certificates.

1 Like

For now i did this will full ssl mode and fly certs create {mydomain}. Now it’s working, but idk if such certificates are paid feature

I think if you’re using fly certs create {domain} then it’s best to disable cloudfalre full ssl mode, not sure tho cos i’m not an expert. You can use fly certs show {domain} to see if it’s using cf ssl or fly’s.

You have to disable the proxy so it’s dns only (gray cloud), then use the fly CLI to create the cert. Wait a few minutes and then turn on the proxy (orange cloud)

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