We get asked questions about Fly in a lot of places on the web which we answer. But, not everyone is everywhere on the web, so with Fly Answers Questions, we bring those answers to you. If you have questions about Fly, why not ask @flydotio on Twitter, or drop a query in the Fly Community.
Q: Is it ok to run non-HTTP apps on Fly? From Pier via community.fly.io
A: It is, with one caveat: your applications need to have a network service of some kind. Why is that? Well, when your app deploys, we run health checks to ensure you can connect to it. They are, by default, TCP connection checks but we do have an option for full HTTP checks. Anyway, unless there is a network service that can be connected to, the health checks will fail and Fly will kill off the app for being apparently faulty.
We do this ourselves for some of our internal services. When we run our Buildkite agents, we use the fact that they export Prometheus metrics on port 8080 and use that port for the health checks to look at.
And no, this isn’t how things are going to stay. We have support for Worker processes on the way.
Q: What IP Ranges is Fly on? From David via community.fly.io
A: This is quite a regular question and the question itself comes from the strategy of protecting your database or other servers from unauthorized access by clear-listing the IP addresses of servers that will be legitimately connecting. This also blocklists the rest of the internet.
The first answer is “it’s complicated”. We do have a set of registered ranges in AS40509 but they may not be the addresses that are seen by servers being connected to. Instead, it’s likely they see the server’s IP address which isn’t assigned within that AS.
We have considered publishing our IP addresses, but we are literally adding new servers every day. With that rate of change, it is likely there would be a gap between an updated list being published and various other systems syncing with the up-to-date list.
As that’s the case, our second answer is we’d suggest that you regard Fly IP addresses as subject to change in the context of security-related features. That said, you can always use improved authentication between clients and servers with the exchange of client certificates during a TLS connection to help protect the connection.
There’s a third answer for the future though. Everything above is related to IPV4. With IPV6, we are able to generate addresses per application through our API, so in the future, it would be possible to use those addresses to control an IPV6-capable firewall’s clear-list. This, and other solutions, are all being worked on at Fly.
Q: How can I rename an App on Fly? From Dan via community.fly.io
A: We prefer people to use the generated app names on Fly. Apart from anything else, we make it easy to attach a custom domain to your application, making the issue of having a particular name mostly moot. We do understand, though, that people may want a specific name. We don’t have a way to do that yet but there are plans in the works to provide a solution.
Until then, we do have a workaround, but you will lose your app’s history, secrets, certificates, hostnames, and deployment configuration, so it’s entirely at your own risk:
- Make an empty directory
- Run
flyctl init
in there - Enter your desired name for your app
- Set the builder to
None
- Select the same organization as the original app
- If it completes successfully, you have claimed your desired name
- Go back to your original app
- Make a note of its original name as set in
fly.toml
in theapp=""
line - Replace that name with your now claimed app name
- Run
flyctl deploy
to deploy under your new name
Don’t forget to run flyctl destroy original-app-name
to tidy up. Then configure the new app’s secrets, certificates, hostnames, and deployment configuration including the scaling and regions it was mapped to.
Community.fly.io
If you follow the links to community.fly.io, you will see that our new community site is a great place to ask questions, look for hints and tips and get your Fly apps running at their best. If you have a Fly account, sign in today as we’ve enabled single sign-on between Fly and the community site making it easier than ever to participate.