Skip to content

PostgreSQL ​

Infrly's managed PostgreSQL gives you a production Postgres database — provisioned, backed up, and kept running for you — without managing a server yourself.

Create a database ​

New Service → PostgreSQL, pick a plan, and create it. There's no free plan for PostgreSQL: a database keeps dedicated storage that costs real money every day it exists, whether or not anything is using it, so every plan is a paid one. See Resource Plans for exact specs and pricing.

By default, Infrly runs two instances of your database for high availability — a primary and a standby that can take over automatically. This is why a database needs roughly twice its listed plan size in actual project capacity; it's already accounted for in the plan's resource footprint.

Provisioning a fresh database usually takes under a minute. Once it's ready, the service shows Running.

Connect to it ​

Open the database's Connect tab. You'll see two connection strings:

  • Internal — reachable only from other services in the same project, over Infrly's private network. Use this for your app's DATABASE_URL whenever your app and the database are in the same project — it's faster and never leaves the cluster.
  • External / Public — reachable from anywhere (your laptop, a different project, a local dev environment), over a TLS-encrypted connection. Use this for local development or cross-project access.

Using the external connection string

If you connect with the external/public string, your app needs to negotiate TLS — set DATABASE_SSL=true (or your database driver's equivalent) when connecting this way. The internal connection string never needs this.

Wiring it into a service ​

The straightforward way is copying the connection string into your web service's environment variables by hand as DATABASE_URL. The better way, especially once you have more than one service, is a service reference:

DATABASE_URL=${{my-database.URL}}

my-database is whatever you named the database service (not its generated hostname) — Infrly resolves this to the real internal connection string at deploy time, and keeps it correct automatically if the database is ever recreated. Referencing a database that hasn't finished provisioning yet is fine; the reference just won't resolve to anything usable until it has.

Backups and restore ​

Every database gets an automatic daily backup with a configurable retention window. See Backups & Restore for how to restore one, and what "restore" actually does (it creates a new database — it never overwrites the original).

Next ​

Infrly — You commit. We ship. Need something custom? support@infrlyapp.com