What is Fly.io Managed Postgres?
+
Managed Postgres is our fully managed database service. We run production PostgreSQL clusters for you and handle automatic backups and recovery, high availability with automatic failover, performance monitoring, resource scaling, and encryption of data at rest and in transit. You get a Postgres cluster inside your Fly.io organization's private network without doing the operational work yourself.
How much does Fly.io Managed Postgres cost?
+
Plans start at $4 a month. The Developer plan is two shared-1x 256MB members with failover, made for agents, side projects and small apps; it includes 1GB of storage at create, up to 5GB, and pauses after 15 minutes without a client. Basic is $38 a month and plans go up to Performance at $1,922 a month, with storage billed at $0.28 per GB per month. Every plan is listed at fly.io/pricing.
Is there a free Managed Postgres option on Fly.io?
+
Yes. The Free plan gives you $5 of usage every month once you add a card, and a Free organization can run one $4 Developer Postgres cluster paid from it. The $5 covers the database and the rest of your usage together; fly.io/pricing says what happens when you reach it.
How do I create a Managed Postgres cluster on Fly.io?
+
Run fly mpg create and pick an organization, a region, and a plan. You can also create a cluster from the Fly.io dashboard. Once it is running, fly mpg attach connects it to one of your apps by cluster ID and app name.
How does my app connect to Managed Postgres on Fly.io?
+
Attaching a cluster with fly mpg attach sets a DATABASE_URL secret on your Fly.io app. On Basic and up, that URL points at the pooled endpoint, which routes through PgBouncer so a busy app does not exhaust Postgres connections. On the Developer plan, clients connect straight to Postgres through fly-proxy. To open a psql session yourself, run fly mpg connect.
Is a Fly.io Managed Postgres cluster reachable from the public internet?
+
No. Your cluster runs inside your Fly.io organization's private network, so apps in the same organization reach it directly and nothing else can. From your own machine, connect through flyctl with fly mpg connect or fly mpg proxy, or over WireGuard.
Does Fly.io Managed Postgres include high availability?
+
Yes. Every plan runs a primary and a replica with automatic failover, and storage is replicated across all nodes in the cluster. High availability and automatic backups are included on every plan rather than sold as add-ons, and Basic and up add connection pooling through PgBouncer.
Which regions can I run Managed Postgres in?
+
Managed Postgres runs in Amsterdam, Dallas, Frankfurt, Sao Paulo, Ashburn, Los Angeles, London, Tokyo, Chicago, Singapore, San Jose, Sydney, and Toronto. We are adding regions as capacity comes online, so check the Fly.io dashboard for the current list when you create a cluster.
Can I use pgvector and PostGIS on Fly.io Managed Postgres?
+
Yes. Every Managed Postgres image on Fly.io ships pgvector for vector similarity search, and you can turn on PostGIS for geospatial work when you create a cluster or later from the dashboard. A catalog of trusted PostgreSQL extensions sits alongside them, including pg_trgm, hstore, citext, and pgcrypto.
How are backups handled for Managed Postgres on Fly.io?
+
We back your cluster up automatically on a rolling schedule and keep those backups for ten days. fly mpg restore rebuilds a cluster from a backup or from a point in time into a new cluster on Fly.io, so recovering from a bad migration does not mean touching the original. The Developer plan takes a full backup every day and restores from those, without point-in-time restore.
Can I run more than one database on a single Fly.io Managed Postgres cluster?
+
Yes. A cluster starts with one database named fly-db and an admin user named fly-user, and you can add more databases, schemas, and users on the same cluster. On Fly.io, fly mpg databases and fly mpg users manage both from the command line.
Does Fly.io Managed Postgres support multi-region read replicas?
+
No. High availability is within one region: a primary and a replica in the cluster's region, with automatic failover between them. For a globally distributed app, keep the database in a single region, spread your Fly.io Machines across the regions your users are in, and cache in front of the database rather than trying to run a replica everywhere.