Phoenix’s Productivity, Elixir’s Reliability: UnlockedGlobal

Build and scale Phoenix apps on a developer-focused public cloud.

Launch Now

Ready, Set, Go!

Speedrun Your Phoenix App Onto Fly.io

Deploy a Phoenix app to Fly.io in a few minutes with Fly.io's command line tool, flyctl.

Get Started
> Install flyctl on GNU/Linux
curl -L https://fly.io/install.sh | sh
 
> Run from Phoenix project root
fly launch
 
> Scale CPU, memory, instances & regions
fly scale

Not on GNU/Linux? Install flyctl for your platform.

Up, Up, and Away!

Unleash the Full Potential of Elixir with Fly.io

Discover the seamless and powerful experience of clustering Elixir applications. It’s time to elevate your Phoenix projects with Fly.io’s effortless deployment and global scaling. Let your LiveViews soar and your BEAM processes thrive in a truly distributed environment.

Effortless Clustering Made for Elixir

Elixir Was Born to Be Clustered & Fly.io Makes It Natural

Elixir’s true strength lies in its ability to run clustered applications. Thanks to Fly.io's built-in private WireGuard network, you can easily unite your Elixir applications into a cohesive, powerful system with minimal setup. Experience the simplicity of scaling and get your apps working together, just like they were designed to.

NEW!

Managed Postgres For Your Elixir Project

Build more, manage less with Fly.io's fully-managed database service. We'll handle all aspects of running production PostgreSQL with Elixir, including:

  • Automatic backups and recovery
  • High availability with automatic failover
  • Performance monitoring and metrics
  • Resource scaling (CPU, RAM, storage)
  • 24/7 support and incident response
  • Automatic encryption of data at rest and in transit
Learn More

AI-Powered Development

Build Phoenix Apps with AI Agents

Choose from the leading AI agents for Phoenix development. Each brings unique strengths to help you build faster and deploy seamlessly on Fly.io.

Quick and Easy Set-up

From Concept to Launch, Faster Than Ever

Starting fresh with Fly.io feels like a breeze. We’ve streamlined the process so you can deploy your Phoenix applications without hassle. Swiftly move from development to deployment, ensuring your app is up and running in no time, all the while enjoying the performance perks that come with our platform.

Superior Performance with Global Deployment

Deploy Your App Where Your Users Are. Literally.

Fly.io takes your Phoenix application to the next level by deploying it closer to your users. This means incredibly fast, real-time interactions, especially for Phoenix LiveView, which becomes even more responsive and engaging. Experience the joy of lower latency and higher satisfaction for your users, no matter where they are.

  • Cross-Region PubSub

    Enjoy the simplicity of connecting distributed systems with Phoenix PubSub that effortlessly works cross-region, providing efficient, real-time messaging across the globe.

  • Secure, Private Networking

    Build with confidence knowing your applications are protected with built-in secure, private networking, keeping your data safe and your connections secure.

  • Built-in Observability

    Get insight into your Phoenix app's performance with Fly.io's built-in observability tools. Monitor, troubleshoot, and optimize your Elixir applications with real-time metrics and logging.

Attach Managed Postgres to your Phoenix app

Managed Postgres is the supported path. Fly.io runs the cluster for you, handling automatic backups and recovery, high availability with automatic failover, performance monitoring, resource scaling, and encryption of data at rest and in transit. Provision it as part of the launch:

fly launch --db mpg

Or add one to an app that already exists, in two commands:

fly mpg create
fly mpg attach <clusterID> -a your-app-name

fly mpg attach writes the connection string onto the app as a secret named DATABASE_URL and triggers a deploy so the app comes up holding it. The string is the pooled connection URL, which goes through PgBouncer. You never see the password. Your repo.ex does not change, and neither does config/runtime.exs beyond reading the variable it already expects.

To use it, Ecto picks it up in config/runtime.exs, which is where a Phoenix release reads its runtime configuration.

Migrations run on every deploy through release_command, which the migrate script mix phx.gen.release generates:

[deploy]
  release_command = "/app/bin/migrate"

It runs in a temporary Machine built from the new image, with your secrets loaded, before any Machine takes traffic. A non-zero exit fails the deploy and the previous version keeps serving.

What you didn't have to set up

Look back at what actually happened. You ran fly launch, and either took the database with it or added it with fly mpg create and fly mpg attach. A standard Phoenix app with a Postgres database in one region is the ordinary case Fly.io is built for, not a stretch. Here is the work that never appeared:

A hosting service for your code. fly launch and fly deploy build from the directory you are standing in. A Phoenix project with no git remote at all deploys fine.

A Dockerfile. fly launch detects Phoenix, generates a release, and writes the Dockerfile. It lands in your repository where you can read it, edit it, and see it in a diff.

A connection string. Attaching writes DATABASE_URL onto the app as a secret. The password never lands in your clipboard or your shell history.

A migration step in a deploy pipeline. release_command runs migrations on a throwaway Machine before any Machine takes traffic. A migration that fails fails the deploy, instead of half migrating production.

TLS and a hostname. The app answers on <app>.fly.dev with HTTPS from the first request, and the certificate is issued and renewed for you.

A load balancer or a VPC. Fly Proxy is already in front of your Machines, and your app reaches Postgres over your organization's private network as soon as the cluster is attached.

None of that work is missing. It is done, and the record of it is a fly.toml you can read in one screen, diff in a pull request, and revert with git.