MatijaL

MatijaL

Hello,

I’m building an app where user can host their dashboard pages on app subdomain - username.myapp.com. App is hosted on Fly.io, I’ve set everything up and subdomains work just fine. The problem is when users want to connect their custom domain to point to their subdomain. I use cloudflare in front and users are getting Cloudflare Error 525 - SSL Handshake Failed.

The thing is, I’ve never built something like this and I don’t really understand how to setup SSL properly. I know I could create certificates on Fly for each user custom domain but is there a better way?

As I said, I don’t have experience with this so I would really appreciate some overview and pointers how something like this should be done.

Thanks

Showing Posts 1 to 7

D4no0

D4no0

From your post, it’s really hard to understand what is your deploy topology, are you using cloudflare tunneling or managing your dns records? Also, from where you are serving your https certificates and do you use separate certificates for each subdomain or a wildcard certificate?

MatijaL

MatijaL OP

I use wildcard certificate for all subdomains, *.myapp.com. Currently I have two of them on Fly, *.myapp.com and myapp.com. I use Cloudflare for dns records and have SSL protection set to full. I don’t know if this is the best way but this is what I have so far.

D4no0

D4no0

What for? If you are using fly to terminate ssl, then cloudflare should have only the A record set to point to your server IP, nothing more as it cannot decrypt the traffic. If you are using something like captcha provided by cloudflare, then you most probably need to terminate ssl at cloudflare level.

MatijaL

MatijaL OP

As I said, I don’t have experience with this so I’m probably doing things wrong, that’s why I’m asking here.

So, my DNS settings are:
CNAME www my.app.com
CNAME * my.app.com
CNAME @ my.app.com

I don’t use captca, I just use Cloudflare for DNS.

All I want to build really is the ability for users to connect their custom domains to their subdomains on my app. And to be honest, I have no clue how to set it up correctly.

This is just a test app so no real users here so I can change everything, and I just want to learn this thing and I’m completely lost.

garrison

garrison

From a cursory search it sounds like Cloudflare returns error 525 if there are SSL issues between the Cloudflare proxy and your server.

If you are only using Cloudflare for DNS, why is it connecting to your server? Where are you seeing this error?

D4no0

D4no0

Cloudflare has a tunnel checkbox enabled by default when creating new records, make sure that it’s disabled for all the records.

MatijaL

MatijaL OP

Ooook… this “magically” fixed the problem… :grinning_face: this is why AI won’t replace developers so soon… thanks a lot!

— All posts loaded —

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
apz
I’m new to elixir and just tried to install the elixirLS extension for VScode(ium) and it is throwing some errors that I would like help ...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews