Serverless PostgreSQL
A real Postgres in seconds. Free tier, no credit card, the same drivers, ORMs, and migration tools you already use. Cloud, desktop, or self-host with the Layerbase CLI.
Tables
- users
- events
- orders
- sessions
| id | name | created_at |
|---|---|---|
| 1247 | signup | 2026-03-12 14:21 |
| 1246 | purchase | 2026-03-12 14:08 |
| 1245 | login | 2026-03-12 13:55 |
| 1244 | signup | 2026-03-12 13:44 |
| 1243 | purchase | 2026-03-12 13:30 |
Free tier
$0/mo, no credit card
Then flat
$5 or $15/mo, no meters
Encrypted
TLS on every plan
Layerbase Cloud
Managed, in seconds
Desktop and CLI
Run it locally or self-host
Branching
Fork your Postgres for every pull request
Branch a running PostgreSQL database into a full, isolated copy with its own connection string. Copy-on-write makes it near-instant, not a dump and restore: point a preview deploy at it, test a migration, then throw it away when the pull request merges. Branches hibernate when nothing is connected and wake on the next connection, so a stack of preview databases costs nothing while it sits idle.
See how branching workslbase cloud branch seed-db pr-482
lbase cloud branch ls seed-db
lbase cloud branch delete seed-db pr-482Quick start
Connect with any PostgreSQL client
Primary application databases, SaaS backends, transactional workloads, and frameworks that expect a normal Postgres URL.
- Drop a managed Postgres behind a side project without paying for a dedicated instance
- Per-tenant or per-developer databases that scale to zero between bursts
- Run logical replication or migration tooling against the direct connection string
- Query from Vercel, Cloudflare Workers, or AWS Lambda over HTTP with the Neon serverless driver, no VPC or connection broker
- Self-host on your own hardware with the Layerbase CLI when compliance requires it
psql "postgresql://layerbase:password@your-host.cloud.layerbase.dev:5432/app?sslmode=require"
Where to run it
Cloud, desktop, or self-host
One database, three places it can live. Pick the speed you want and move between them when you outgrow it.
Free Postgres hosting
What you actually get on the free Postgres tier
Free here is a real Postgres database on the Free plan, not a 30-day trial and not a credit balance that quietly runs out. This is what is included, what happens when the database sits idle, and where the line is.
Free is $0/mo with no card
The Free plan covers 2 databases, 5 GB of storage, and up to 20 concurrent connections. PostgreSQL is one of the engines you can create on it. There is no trial clock on the plan and no expiry date.
It sleeps after 15 minutes idle and wakes on connect
A free Postgres database hibernates after 15 minutes with no connections; paid plans wait 6 hours. Hibernation keeps the hostname, the port, and the data volume in place, so the next connection wakes it in roughly 1 to 5 seconds and your query then runs normally. This works with any Postgres client over TLS, including psql, pg, and every ORM built on them.
The same Postgres, not a fork or a subset
You get a real PostgreSQL server with superuser on your own instance, so extensions, schemas, and roles all behave the way your migration tool expects. Prisma, Drizzle, and raw SQL migrations run unmodified, and both pooled and direct connection strings are handed to you at create time.
Branches for dev and staging, off the same database
Free includes 1 instant branch per database, Solo 3, and Pro 10. A branch is a full copy you can point a preview environment at, and it does not consume a slot from your plan database count.
Forget about it and it archives, it does not vanish
A free database left hibernated for 14 days is archived (7 days if you never connected to it): its address is released and it takes an explicit Restore, roughly 10 to 30 seconds, to bring it back. Data and backups are kept. After 90 continuous days archived the live resources are reclaimed and the most recent backup is kept and still restorable in one click. Paid plans are never auto-archived.
No card on Free. Solo is $5/mo and Pro is $15/mo when you outgrow it.
FAQ
Common PostgreSQL questions
What is PostgreSQL?
PostgreSQL is the open-source relational database most application frameworks assume by default: SQL, ACID transactions, and a deep extension ecosystem. It is the usual choice for primary application databases, SaaS backends, and transactional workloads. Layerbase runs it as a managed endpoint you get in seconds, with TLS, a web SQL console, and pooled or direct connection strings, and the same engine runs locally through the Layerbase CLI and Layerbase Desktop.
Is the free PostgreSQL tier really free?
Yes. The Free plan is $0/mo with no card, and it is not a trial: it covers 2 databases, 5 GB of storage, and up to 20 concurrent connections, with no expiry date. A free database hibernates after 15 minutes idle and wakes on the next connection in roughly 1 to 5 seconds. Solo ($5/mo) and Pro ($15/mo) are there when you outgrow it.
Which PostgreSQL version do you run?
Layerbase Cloud tracks the latest stable PostgreSQL major version, and new databases default to it. The dashboard shows the exact version, and the supported versions list is visible in the create flow so you can pin a specific one. We sometimes also offer an upcoming major as a clearly marked beta for early testing, but it is never the default.
Do you support extensions like pg_vector or PostGIS?
Most popular extensions are available out of the box. The dashboard exposes the extension list per database; if something you need is missing, open an issue and we will look at adding it.
Do you support the Neon serverless driver?
Yes. Every Layerbase Postgres also speaks the HTTP protocol used by @neondatabase/serverless, so passing your normal Layerbase connection string to neon() works from Vercel, Cloudflare Workers, AWS Lambda, and other runtimes that cannot hold a TCP socket. Queries run through the connection pooler, so a burst of function invocations does not exhaust connections. @vercel/postgres, Drizzle neon-http, and the Prisma and Kysely Neon adapters work the same way. Interactive (WebSocket) transactions are not supported; sql.transaction() batches are.
What is the difference between the pooled and direct PostgreSQL connection strings?
Pooled is the right default for serverless and connection-heavy web apps; it multiplexes requests so you do not exhaust the server connection limit. Direct bypasses the pooler and is required for migrations, logical replication, and tools that hold a session.
How do PostgreSQL backups work on Layerbase?
Free databases hibernate but persist their data, and Free includes 1 manual backup slot you can take and restore from the dashboard. Paid plans add scheduled snapshots with 7 or 30 day retention, one-click restore, and more manual slots.
Can I run PostgreSQL locally too?
Yes. The Layerbase CLI (npm i -g layerbase, run as lbase) manages local Postgres versions, schemas, and seed data as native processes, no Docker required. Layerbase Desktop wraps the same engine runtime in a GUI.
Do you support client certificate (mTLS) authentication?
Yes, on the Pro plan. Enable it per database and every connection then requires both a valid client certificate and its password. Each database has its own certificate authority; you issue certificates from the dashboard or API, and rotating the CA revokes all of them at once. Connection pooling stays on: the pooler verifies the certificate, so you keep the pooled endpoint (useful for serverless) with mTLS enforced.
Branch PostgreSQL in seconds
Fork a running PostgreSQL into a full, isolated copy with its own connection string. Copy-on-write makes it near-instant, not a dump and restore. Point a preview deploy at it, test a migration, then throw it away. Layerbase branches 16 engines, not just Postgres.
See how branching worksWhat you get
Everything a PostgreSQL database should ship with
The same primitives on every PostgreSQL database: TLS, web console, hibernation, and a real dashboard. The rows that need a paid plan say so on the row; nothing here is hidden behind a sales call.
Web IDE
Query console in the dashboard, no extra client to install.
TLS by default
All connections encrypted. No setup required.
Always-on connections
Pin a database to your plan's always-on pool so it never hibernates. Free has no pool, so a free database always sleeps when idle; Solo includes 768 MB of pool and Pro 1.5 GB.
Scale to zero
Hibernates when idle. Wakes on the next connection.
Connection pooling
Pooled endpoint for serverless and edge workloads.
Direct connections
Bypass the pooler for migrations and replication.
Native HTTPS endpoint
Engines whose own wire protocol speaks HTTPS. Every database, including this one, is also queryable over the platform's HTTPS query API and web console.
Serverless driver
Drop-in HTTP driver for edge runtimes (Neon serverless, PlanetScale, Upstash REST, or the engine-native client).
IP whitelisting
Restrict access to specific IPs or CIDR ranges.
Automatic backups
Scheduled dumps and volume snapshots with one-click restore on paid plans. Free includes 1 manual backup slot you take and restore yourself.
What it costs
What PostgreSQL costs on Layerbase
Plans are flat. There is no per-hour compute meter, no per-database line item, and no ingress or egress fee, so the bill does not change shape when your traffic does. You do not need an AWS, GCP, or Azure account either: Layerbase runs the infrastructure.
Scale to zero when idle. No credit card.
The database you pin never sleeps.
Every engine, plus a bigger always-on pool.
Side by side
Hosted PostgreSQL, compared
| Provider | Free tier | Billing |
|---|---|---|
| Neon | 0.5 GB of storage and 100 CU-hours per project | Usage-metered per CU-hour and per GB-month; spend notifications alert at 80% and 100% but do not stop usage |
| Supabase | 500 MB database; free projects are paused after 1 week of inactivity | Pro from $25/mo plus metered compute, storage and egress |
| Layerbase | Full PostgreSQL on the Free tier; sleeps when idle, wakes on connect | $0, $5, or $15/mo flat. No meters. |
Neon
- Free tier
- 0.5 GB of storage and 100 CU-hours per project
- Billing
- Usage-metered per CU-hour and per GB-month; spend notifications alert at 80% and 100% but do not stop usage
Supabase
- Free tier
- 500 MB database; free projects are paused after 1 week of inactivity
- Billing
- Pro from $25/mo plus metered compute, storage and egress
Layerbase
- Free tier
- Full PostgreSQL on the Free tier; sleeps when idle, wakes on connect
- Billing
- $0, $5, or $15/mo flat. No meters.
Competitor facts verified September 7, 2026 against each vendor's own pricing and documentation pages: Neon, Supabase.
Already have data? Migrate it from Neon, Supabase, Render, and more Any connection string works too.
More on PostgreSQL
All articles- September 7, 2026
Hosting Postgres in Asia and the Middle East
Layerbase runs in the United States and that is where we are building first. If your users are in Asia or the Middle East and what you need is Postgres, put the database near them. We recommend Nearbase for that, and here is how the two products split the work.
Read - September 6, 2026
Preview environment platforms in 2026: what is in the database when the preview comes up
Every platform on this list will give a pull request its own URL. The question that sorts them is what is in the database behind that URL: nothing, a restore of last night's backup, or the live data as of right now. Here is where each of eleven platforms lands, quoted from their own docs, and what a preview costs while the PR sits open.
Read - September 5, 2026
Northflank alternatives: a preview environment is not a database branch
Northflank gives every pull request its own stack, and the database in that stack starts empty unless you seed it or restore it from a backup you already had. Here is exactly how their forks work, what a copy-on-write branch does differently, what each one costs while a PR sits open, and the cases where Northflank is the right answer.
Read - September 4, 2026
Neon alternatives: when the CU-hour meter stops matching the work
Neon is excellent serverless Postgres with a bill shaped like compute-hours and branch-months. That shape fits a bursty production app and fights a stack of small, mostly idle databases. Here is what Neon actually is, where the meter bites, the current plan numbers, and an honest list of reasons to stay.
Read - September 3, 2026
Layerbase vs Crunchy Bridge: two ways to buy managed Postgres
Crunchy Bridge is Postgres specialists selling instance-hours across AWS, Azure and GCP. Layerbase is a flat monthly price, 18 engines and branching. A head-to-head on pricing, versions, extensions, HA, backups and placement, with worked examples.
Read
Upstream project
PostgreSQL is developed by the PostgreSQL Global Development Group. Layerbase packages and hosts official releases; the engine itself is built upstream.