Your Fly.io Postgres data, where work happens.
Fly.io Managed Postgres. Reachability is the question worth settling first — there are three answers and all of them work.
Use the results in Excel, Google Sheets, AI tools and your apps through the Database REST API.
Every connector type is on Free. Start with 2 data sources and 1 agent.
Run read-only queries inside your network.
Read-only queries · outbound connectionSource credentials stay on the agent. Your tools receive query results.
Query Streams reads Fly.io Managed Postgres from Microsoft Excel, Google Sheets, Power BI, AI assistants over MCP and a REST endpoint through one read-only connection. Fly MPG is built to be reached from inside Fly's own network, so the first thing to decide is where the Network Agent runs — on a Fly Machine in the same organisation, or on your own hardware through a local proxy Fly gives you. Both are ordinary Postgres once established. This is also one of the few cards where encryption follows the checkbox rather than being forced, and there is a good reason for that.
- Pool is a hostname prefix
- Run on Fly, or use fly mpg proxy
- SSL follows the checkbox
Connect Fly.io with the right settings.
Keep the connection on the Network Agent. These are the details specific to Fly.io.
- Host
- direct.<cluster>.flympg.net or pgbouncer.<cluster>.flympg.net — or 127.0.0.1 through a local fly mpg proxy
- Port
- 5432, or the proxy port when tunnelling
- Driver
- Npgsql, carried by the agent — nothing to install at the Fly end
- Paste format
- The string from fly mpg connect or the dashboard, as a postgresql:// URI
- Defaults
- Database fly-db and user fly-user are prefilled, matching what Fly creates
- TLS
- Follows the SSL checkbox, which is on by default. Not forced by the agent, so that a local proxy tunnel stays possible. Encrypted when on; the certificate chain is not verified
- Pooling
- PgBouncer on the pgbouncer. hostname prefix. The card reads the prefix and records the mode
- Rejected
- .internal hostnames — those are Fly private-network names and do not resolve from outside Fly
- Saved as
- PostgreSQL, with Fly.io kept as a badge
- Default schema
- public, which is what a federated reference carries
Fly.io is the clearest case on this site of the Network Agent's shape being the thing that makes a connection possible rather than merely safe. Fly MPG expects its clients to be on Fly, which is a problem for any tool that connects from its own cloud to yours. The agent does not connect from anywhere — it runs where you put it, including on a Fly Machine inside the same organisation, and dials out. The awkward network position simply stops being awkward.
The hostname-prefix design deserves a word of credit. Putting the pool at pgbouncer.<cluster> rather than on a second port or behind a saved flag means the choice is carried in the address itself, so it survives being copied, pasted and stored without a second setting to keep in step. Crunchy Bridge achieves the same thing with a port. Both are better than a flag, and for the same reason.
For a cross-source query Fly.io is ordinary Postgres. A connection you called fly_app is written fly_app.public.orders, and it joins to a folder of CSVs, an on-premises system of record or a billing API in one read-only statement — with nothing copied and nothing scheduled.
Provider reference: fly.io
Built for how Fly.io works.
Three ways in, and the card tells you when you have picked a fourth
Fly MPG assumes its clients live on Fly. The agent usually does not, so this is the one decision worth making before anything else.
- Agent on a Fly Machine in the same organisation — the database is simply reachable, and this is the tidiest answer if you already run things on Fly.
- Agent on your own hardware, through fly mpg proxy — Fly opens a local tunnel and you connect to 127.0.0.1 on the proxy port. This is the usual answer for an on-premises agent.
- Agent anywhere, straight to the flympg.net hostname — works when your network can reach it, and times out when it cannot. If a direct connection hangs rather than being refused, this is the case you are in, and the proxy is the fix.
- What does not work is a .internal hostname. Those are Fly's private 6PN names and they resolve only inside Fly's network, so the card rejects them by name rather than letting the connection die as a timeout — the same courtesy the Railway card extends to its private variable.
The pooled endpoint is a hostname prefix, which is unusually easy to get right
Most services with a pooler give it a separate port or a separate flag. Fly changes one word at the front of the hostname.
- direct.<cluster>.flympg.net is the database. pgbouncer.<cluster>.flympg.net is the PgBouncer pool, same cluster, same credentials.
- Because the prefix is part of the hostname, it travels with whatever you paste. Paste a pgbouncer URI and the card reads the prefix and records the pooled mode for you — no dropdown to remember.
- Use the direct host for long-running reads and the pool when you have many short ones. Everything the agent runs is read-only either way.
- Worth being precise about what the agent does with that: it records which endpoint you are on, and connects. It does not currently change its driver settings between the two. If you are driving heavy concurrent load through the pool, prefer the direct host for now.
Encryption follows the checkbox here, and that is on purpose
Most managed Postgres cards on this site say the agent forces TLS regardless of the checkbox. This one does not, and the reason is the proxy.
- The SSL checkbox is on by default, and left on you get an encrypted connection to a flympg.net host. That is the normal path and nothing needs changing.
- The agent does not override it, because a local fly mpg proxy tunnel is a legitimate way to connect and forcing encryption would break it. Traffic through that tunnel never leaves your machine, so there is nothing on the wire to protect.
- So the honest instruction is the simple one: leave it on unless you are on 127.0.0.1 through the proxy. Do not clear it for a flympg.net host.
- When encryption is on, the certificate chain is not verified. Read it as protection against anyone reading the traffic in transit, rather than as proof of which server answered.
- Your credentials never leave the machine the agent runs on, and Query Streams stores no copy of your data and no copy of your password.
-- Ordinary Postgres, read-only\nSELECT c.name,\n COUNT(o.id) AS orders,\n SUM(o.amount) AS revenue\nFROM public.customers AS c\nJOIN public.orders AS o ON o.customer_id = c.id\nWHERE o.placed_at >= now() - interval '30 days'\nGROUP BY c.name\nORDER BY revenue DESC;From connection to useful results.
- Decide where the agent runs. On a Fly Machine in the same organisation it reaches the database directly; anywhere else, run fly mpg proxy and point the connection at 127.0.0.1. Either way the agent only makes outbound connections.
- Get the connection string from fly mpg connect or the dashboard. Paste it into the first field and host, port, database, username and password are read out of it.
- Check the hostname you ended up with. direct.<cluster>.flympg.net is the database itself and pgbouncer.<cluster>.flympg.net is the pooled endpoint — the mode is in the prefix, not the port.
- Leave Use SSL on for a flympg.net host. Turn it off only when you are going through a local fly mpg proxy tunnel, where the traffic never leaves your machine.
- Test, save, then read it from Microsoft Excel, Google Sheets, Power BI, MCP or REST. The pasted string is dropped once the fields are filled, so the password is stored once.
Put your Fly.io results to work.
One connection serves your spreadsheets, apps and AI tools. Share permission to run a saved query; recipients see the allowed results, with the SQL and source login hidden.
For your team, vendors and partners
Pull live Fly.io results straight into a worksheet and refresh them on demand — desktop Excel, Excel Online, Microsoft 365.
PostgreSQL guideRun a saved Fly.io query from the sidebar and drop the rows into the sheet. Shared collaborators can refresh it themselves.
PostgreSQL guideAsk a question in plain English. Nova already knows your Fly.io tables, writes and runs the SQL, explains the answer and charts it — no query to write, no credentials to hand over.
How Nova worksShare a live Fly.io result with anyone — a colleague, a vendor, a partner — as a bookmarkable grid that re-runs fresh when opened, on a phone, a tablet or a desktop. They see the results, never the SQL or the credentials.
How the Data Viewer worksFor apps and systems
Publish a Fly.io query as an authenticated JSON endpoint any application can call, with an OpenAPI 3.1 spec and ready-made Postman, Insomnia and Hoppscotch collections. No database port is opened.
PostgreSQL guidePaste the generated Power Query M into the Power BI Advanced Editor and the report reads live Fly.io results over HTTPS — no ODBC driver, no database port opened.
Explore Power BISync Fly.io rows into an Airtable base on a schedule, or fetch them inside an Airtable automation script.
PostgreSQL guideFeed a Baserow table from Fly.io over the REST endpoint — self-hosted or Baserow cloud.
PostgreSQL guideKeep a SeaTable base current with Fly.io data without exporting a file or exposing the database.
PostgreSQL guidePush Fly.io results into a Smartsheet grid so plans and reports read from the source system, not last week's export.
PostgreSQL guideBack an Anvil Python app with Fly.io through the REST endpoint instead of embedding database credentials in the app.
PostgreSQL guideFor AI tools
Give an AI assistant read-only access to Fly.io with the schema it needs to write correct SQL — no credentials in the chat.
PostgreSQL guideDelivered to people
Put a Fly.io query on a schedule and have the rows delivered to Slack, Discord, email or a signed webhook — or hold the message until a row count, threshold or percentage change crosses the line you set.
How alerts and reports workJoin Fly.io to the rest of your data.
Bring databases, business APIs, files and logs into one read-only query. Every connector supports Federated Queries.
Name the connections and tables. Query Streams handles the source queries and combines the results.
Explore Federated Queries-- nothing copied, nothing merged, nothing scheduled
SELECT c.region, COUNT(*) AS orders, SUM(i.amount_due) AS invoiced
FROM fly_app.public.orders1 f
JOIN erp_sql.dbo.customers2 c ON c.id = f.customer_id
JOIN billing.stripe.invoices3 i ON i.customer = c.stripe_id
GROUP BY c.region
ORDER BY invoiced DESC;Use your own connection, schema, table and column names.
Shared across the connector family.
True of every database connector
- Outbound only — the agent opens one encrypted connection out to Query Streams. No inbound port to forward, no VPN, no IP allowlist, nothing about your database exposed to the internet.
- Credentials stay put — the database username and password live on the machine you installed the agent on. Query Streams never receives them and cannot reach your database on its own.
- Read-only, enforced — one statement at a time, SELECT and friends only. A write is rejected on your own machine before it is ever sent to the server, rather than relying on a permission somebody remembered to set.
- Deploy as many agents as you like — one per site, region or cloud. Every data source they can see arrives in a single dropdown, so nobody has to know which agent hosts what.
What you get once a query is saved
- Share the capability, not the SQL — a colleague or an outside partner can run your query and change its filters without ever seeing the statement behind it.
- Filters from either direction — declare them yourself as @variables, or let the connector spot the literal values already sitting in your WHERE clause and offer those as dropdowns.
- Read it from anywhere — Microsoft Excel, Google Sheets, Power BI, the REST API, AI assistants over MCP, the Query Builder and Nova all read the same saved query.
- Run several at once — five saved queries into five worksheet tabs, streamed concurrently, however large the results.
- Join it to anything else you have connected — another database, a business API, or a folder of files, in one read-only statement.
Questions about Fly.io Postgres
Where can I use Fly.io Postgres query results?
Use Fly.io Postgres results in Excel, Google Sheets, the Data Viewer, your apps through the Database REST API, and AI tools through MCP or Nova. Saved results also feed supported Automation destinations, reports and alerts. Destination availability and allowances depend on your plan.
Do I need to open an inbound port for Fly.io Postgres?
No. Install the Network Agent on a machine that can reach Fly.io Postgres. The agent connects outward to Query Streams; no inbound port or VPN is needed. Your source must still allow the agent machine to connect under its own access rules.
Can Query Streams change data in Fly.io Postgres?
No. Queries are enforced read-only on the Network Agent before execution. Source credentials stay on that machine. Sharing grants permission to run a saved query and receive its results; it does not reveal the SQL or database login.
What do I need to connect Fly.io Postgres?
Host: direct.<cluster>.flympg.net or pgbouncer.<cluster>.flympg.net — or 127.0.0.1 through a local fly mpg proxy. Port: 5432, or the proxy port when tunnelling. Driver: Npgsql, carried by the agent — nothing to install at the Fly end. Paste format: The string from fly mpg connect or the dashboard, as a postgresql:// URI
Can I join Fly.io Postgres to other connected sources?
Yes. Federated Queries support every connector type, including databases, business APIs, files and logs. Name the connections and tables in one read-only query. Query Streams translates the source portions as needed and combines their results. See how Federated Queries work.
Does Fly.io Postgres use the PostgreSQL connector?
Yes. Fly.io Postgres uses the PostgreSQL wire protocol. Its provider preset supplies the relevant connection settings. The linked PostgreSQL guides apply to the shared workflow; use the provider-specific connection details on this page for your endpoint and security requirements.
Put Fly.io where the work happens.
Start with Free: every connector type, 2 data sources and 1 Network Agent. Add plan allowances as your needs grow.

