fly.io CNAME setup

Tue, Jun 7, 2022 2-minute read

fly.io CNAME setup

I started using fly.io today and so far it is pretty awesome.

tl;dr share.danielms.site

I setup everything without much issue but coming from Render, setting up the CNAME was not as easy (in hindsight, its super simple).

After deploying my PicoShare app using the fantastic flyctl CLI, I could easily access it from its fly domain but I wanted to put it on my personal website as a subdomain.

Netlify is my DNS provider, so I setup a CNAME over there but it would not resolve - OpenSSL error. Turns out you need to manually generate the certificate for the subdomain.

To do that:

fly certs create share.danielms.site

> The certificate for share.danielms.site has not been issued yet.
> 
> Hostname                  = share.danielms.site
> 
> DNS Provider              = nsone
> 
> Certificate Authority     = Let's Encrypt
> 
> Issued                    =
> 
> Added to App              = 35 seconds ago
> 
> Source                    = fly
> 
> Your certificate for share.danielms.site is being issued. Status is Awaiting certificates. Make sure to create another certificate for www.share.danielms.site when the current certificate is issued.

Check the status with fly certs show share.danielms.site. It only takes a few seconds to deploy anyway but this will show if there are any errors.

Viola share.danielms.site

Tags:

#fly #dns