Connecting to PostgreSQL on Layerbase Cloud

PostgreSQL databases on Layerbase Cloud use the standard PostgreSQL wire protocol, so existing app code, migration tools, and admin clients keep working.

Best for: Primary application databases, SaaS backends, transactional workloads, and frameworks that expect a normal Postgres URL.

1

Open your database in the dashboard

Go to /cloud, click the database you just created, and the connection panel shows the host, port, username, password, and a ready-to-paste connection string for the engine.

Use the generated username, password, host, port, and database name from the Quick Connect panel.

2

TLS is required, on by default

Append ?sslmode=require to the connection string.

PostgreSQL wire protocol on port 5432

3

Use any standard client

PostgreSQL works with the normal client family for that engine. Start with the dashboard snippet, then move the same URL and credentials into your app environment.

If your client has separate direct, pooled, TLS, or HTTP options, prefer the exact variant shown in Quick Connect.

bashPostgreSQL
psql "postgresql://layerbase:password@your-host.cloud.layerbase.dev:5432/app?sslmode=require"

PostgreSQL notes

  • Use the pooled URL for serverless apps and connection-heavy web workloads.
  • Use the direct URL for migrations, logical replication, or tools that dislike poolers.