Cloudflare 525 error randomly occurs

I guess after I set SSL_KEY in secrets, in my app i need a function to put the SSL_KEY into a file and place the file in the root? how you accomplish this?

I don’t think you need to save it to a file in order to use it.
You could directly read the env variable in your app code and use it from there.
Steps 2 & 3 from Use Cloudflare Certs to FlyIO - #8 by ignoramous shows you how.

Or the SSL_KEY env will be automatically detected by fly.io as cert key? and I do not need to do anything from my side?

I’m afraid you have to handle TLS in your app :slight_smile:
Fly won’t auto-detect that env as a cert and do anything.

2 Likes