docs/deploy/cloud-platforms/fly.mdx
Fly.io deploys Docker containers as apps close to your users. This guide uses Fly Launch — Fly's scaffolding flow — to deploy the official paradedb/paradedb Docker image with a persistent volume.
flyctl) installed and authenticated with fly auth loginFrom an empty directory, run fly launch and point it at the ParadeDB Docker image. --no-deploy lets you edit the generated fly.toml before the first deploy so you can add the persistent volume and secrets:
fly launch \
--image paradedb/paradedb:latest \
--internal-port 5432 \
--no-deploy
fly launch prompts for an app name and a primary region, then writes a fly.toml in the current directory. See the Docker Hub page for available paradedb/paradedb tags — pin one (for example paradedb/paradedb:0.25.4-pg18) instead of latest for reproducible deploys.
ParadeDB stores its data under /var/lib/postgresql. Create a Fly.io volume in the same region as the app so data survives restarts and redeploys:
fly volumes create paradedb_data --region <REGION> --size 10
Replace <REGION> with the region you chose during fly launch (see Fly.io regions).
Set the POSTGRES_PASSWORD as a Fly.io secret so it is never committed to fly.toml:
fly secrets set POSTGRES_PASSWORD=<YOUR_STRONG_PASSWORD>
fly.tomlOpen the generated fly.toml and add the [env] block (Postgres init variables) and a [[mounts]] block that attaches the volume you just created. The [build], [[services]], and [[vm]] sections were written by fly launch:
[env]
POSTGRES_USER = "postgres"
POSTGRES_DB = "paradedb"
PGDATA = "/var/lib/postgresql/data"
[[mounts]]
source = "paradedb_data"
destination = "/var/lib/postgresql"
fly deploy
Fly.io pulls the ParadeDB image, mounts the volume, and starts the machine.
Fly.io machines are only reachable via WireGuard or Fly's proxy by default. Use fly proxy to open a local tunnel:
fly proxy 5432
Then connect with psql from another terminal:
psql "postgres://postgres:<YOUR_STRONG_PASSWORD>@localhost:5432/paradedb"
To expose ParadeDB publicly, allocate a dedicated IPv4 address (the [[services]] block from fly launch already accepts external traffic on port 5432):
fly ips allocate-v4
Public exposure means anyone on the internet can attempt to reach port 5432 — make sure POSTGRES_PASSWORD is strong and consider adding Fly.io's per-service firewall rules.