Neon Postgres: Free Claimable DB in Minutes — No Install
Create a free Neon Postgres (Postgres 17) in one curl command; get a pooled DATABASE_URL and an optional direct URL…

📚 Get Practical Development Guides
Join developers getting comprehensive guides, code examples, optimization tips, and time-saving prompts to accelerate their development workflow.
If you want a real Postgres database without installing anything locally, Neon gives you a very fast option:
- it is free to start
- it takes one command
- you do not need a Neon account to create it
- you get a working database URL immediately
This guide is written to be extremely easy to follow, even if you have never created a cloud database before.
What You Are Creating
You are creating a temporary Neon Postgres database through neon.new.
This is called a claimable database because:
- it works immediately after creation
- it is free
- it expires after 72 hours if you do nothing
- you can later "claim" it into your Neon account if you want to keep it
Neon says these databases are currently provisioned on:
- AWS
us-east-2 - Postgres
17
When This Is Useful
This is a very good fit for:
- local development
- side projects
- hackathons
- prototypes
- demos
- temporary test environments
It is not meant to be your long-term production database unless you claim it and move into a normal Neon setup.
Before You Start
You only need:
- a terminal
curl- a place to paste your database URL, usually a
.envfile
If your app uses PostgreSQL, it likely expects a variable called:
DATABASE_URL=
Step 1: Create the Database
Run this command:
curl -X POST https://neon.new/api/v1/database \
-H 'Content-Type: application/json' \
-d '{"ref":"your-app-name"}'
Replace your-app-name with something simple that identifies your project.
Examples:
curl -X POST https://neon.new/api/v1/database \
-H 'Content-Type: application/json' \
-d '{"ref":"my-nextjs-app"}'
curl -X POST https://neon.new/api/v1/database \
-H 'Content-Type: application/json' \
-d '{"ref":"portfolio-site"}'
Step 2: Look at the Response
Neon will return JSON that looks like this:
{
"id": "01abc123-def4-5678-9abc-def012345678",
"status": "UNCLAIMED",
"neon_project_id": "cool-breeze-12345678",
"connection_string": "postgresql://neondb_owner:npg_xxxx@ep-cool-breeze-pooler.c-2.us-east-2.aws.neon.tech/neondb?channel_binding=require&sslmode=require",
"claim_url": "https://neon.new/claim/01abc123-def4-5678-9abc-def012345678",
"expires_at": "2026-02-01T12:00:00.000Z",
"created_at": "2026-01-29T12:00:00.000Z",
"updated_at": "2026-01-29T12:00:00.000Z"
}
You do not need to understand every field.
The 3 fields that matter most are:
connection_stringclaim_urlexpires_at
Here is what each one means:
connection_stringThis is the main database URL you will paste into your app.claim_urlOpen this link later if you want to keep the database longer than 72 hours.expires_atThis is the exact expiration time for the temporary database.
Step 3: Copy connection_string into Your .env File
In most apps, you should paste the returned connection_string into:
DATABASE_URL=postgresql://...
Example:
DATABASE_URL=postgresql://neondb_owner:npg_xxxxxxxxxxxx@ep-example-pooler.c-2.us-east-2.aws.neon.tech/neondb?channel_binding=require&sslmode=require
If your project already has a .env file, open it and replace the old DATABASE_URL.
If your project does not have one yet, create a .env file and add:
DATABASE_URL=postgresql://neondb_owner:npg_xxxxxxxxxxxx@ep-example-pooler.c-2.us-east-2.aws.neon.tech/neondb?channel_binding=require&sslmode=require
Step 4: Restart Your App
If your development server is already running, stop it and start it again.
Why:
- many frameworks only read
.envvalues at startup - if you do not restart, your app may still use the old database URL
The Most Important Detail: Pooled vs Direct URL
The connection_string Neon returns is a pooled URL.
That is usually the correct one for:
- application queries
- local app development
- server runtimes
- most normal usage
You should generally use this for:
DATABASE_URL=...
What the pooled hostname looks like
A pooled Neon hostname contains:
-pooler
Example:
ep-example-pooler.c-2.us-east-2.aws.neon.tech
If You Need a Direct URL for Migrations
Some tools prefer a direct database connection for migrations.
To create a direct URL:
- take the same
connection_string - find the hostname
- remove
-pooler
Example
Pooled hostname:
ep-example-pooler.c-2.us-east-2.aws.neon.tech
Direct hostname:
ep-example.c-2.us-east-2.aws.neon.tech
Example full env setup
DATABASE_URL=postgresql://neondb_owner:npg_xxxxxxxxxxxx@ep-example-pooler.c-2.us-east-2.aws.neon.tech/neondb?channel_binding=require&sslmode=require DATABASE_URL_DIRECT=postgresql://neondb_owner:npg_xxxxxxxxxxxx@ep-example.c-2.us-east-2.aws.neon.tech/neondb?channel_binding=require&sslmode=require PUBLIC_POSTGRES_CLAIM_URL=https://neon.new/claim/01abc123-def4-5678-9abc-def012345678
Use this as a simple rule:
DATABASE_URL= pooled URL for the appDATABASE_URL_DIRECT= direct URL for migrations if your tooling wants it
The Easiest Setup Pattern
If you want the safest and simplest setup, use this template:
DATABASE_URL=postgresql://neondb_owner:npg_xxxxxxxxxxxx@ep-example-pooler.c-2.us-east-2.aws.neon.tech/neondb?channel_binding=require&sslmode=require DATABASE_URL_DIRECT=postgresql://neondb_owner:npg_xxxxxxxxxxxx@ep-example.c-2.us-east-2.aws.neon.tech/neondb?channel_binding=require&sslmode=require PUBLIC_POSTGRES_CLAIM_URL=https://neon.new/claim/01abc123-def4-5678-9abc-def012345678
If your app also requires a secret, keep that in the same file too.
Example:
DATABASE_URL=postgresql://neondb_owner:npg_xxxxxxxxxxxx@ep-example-pooler.c-2.us-east-2.aws.neon.tech/neondb?channel_binding=require&sslmode=require DATABASE_URL_DIRECT=postgresql://neondb_owner:npg_xxxxxxxxxxxx@ep-example.c-2.us-east-2.aws.neon.tech/neondb?channel_binding=require&sslmode=require PAYLOAD_SECRET=your-existing-secret PUBLIC_POSTGRES_CLAIM_URL=https://neon.new/claim/01abc123-def4-5678-9abc-def012345678
CLI Option: Let Neon Write the .env File for You
If you want Neon to handle the env file for you, use the CLI:
npx neon-new --yes
According to the Neon docs, this writes values like these into .env:
DATABASE_URL=postgresql://neondb_owner:npg_xxxxxxxxxxxx@ep-cool-breeze-a1b2c3d4-pooler.c-2.us-east-2.aws.neon.tech/neondb?channel_binding=require&sslmode=require DATABASE_URL_DIRECT=postgresql://neondb_owner:npg_xxxxxxxxxxxx@ep-cool-breeze-a1b2c3d4.c-2.us-east-2.aws.neon.tech/neondb?channel_binding=require&sslmode=require # Claimable DB expires at: Sat, 01 Feb 2026 12:00:00 GMT # Claim it now to your account using the link below: PUBLIC_POSTGRES_CLAIM_URL=https://neon.new/claim/01abc123-def4-5678-9abc-def012345678
This is the easiest option if:
- you are starting a brand-new project
- you want a quick setup
- you want fewer manual copy-paste steps
How to Claim the Database So It Does Not Expire
By default, the database expires after 72 hours.
If you want to keep it:
- open the
claim_url - sign in to Neon, or create an account
- choose the Neon organization where the database should live
- complete the transfer
After you claim it:
- the expiration is removed
- the database appears in your Neon console
- it becomes part of your normal Neon account setup
Important detail from Neon:
- after claiming, the API
connection_stringbecomesnull - at that point, use the Neon console for ongoing connection details
Limits of the Free Unclaimed Database
According to the Neon docs, unclaimed databases currently have these limits:
| Feature | Unclaimed |
|---|---|
| Storage | 100 MB |
| Transfer | 1 GB |
| Branches | No |
| Expiration | 72 hours |
If you claim the database, limits move to your Neon plan.
Common Questions
Do I need a Neon account to create the database?
No.
You can create the database immediately without an account.
Do I need to install Postgres locally?
No.
That is one of the biggest advantages of this workflow.
Is this a real Postgres database?
Yes.
Neon’s docs say claimable databases run on Postgres 17.
Should I use the pooled URL or the direct URL?
Use the pooled URL first unless you know you specifically need a direct connection for migrations or tooling.
What happens if I do nothing?
The database expires after 72 hours.
Can I keep the same database?
Yes, but you need to claim it through the claim_url.
Copy-Paste Checklist
If you want the shortest possible version, do this:
- Run:
curl -X POST https://neon.new/api/v1/database \
-H 'Content-Type: application/json' \
-d '{"ref":"your-app-name"}'
- Copy
connection_string - Paste it into:
DATABASE_URL=...
- Optionally create
DATABASE_URL_DIRECTby removing-poolerfrom the hostname - Save
claim_url - Restart your app
- Claim the database if you want to keep it past 72 hours
One-Sentence Version
If you want a free Postgres database right now, create one with neon.new, paste the returned connection_string into DATABASE_URL, and claim it later only if you want to keep it beyond 72 hours.
Official Links
neon.new: https://neon.new/- Claimable Postgres docs: https://neon.com/docs/reference/claimable-postgres
- Neon docs index: https://neon.com/docs/llms.txt
Frequently Asked Questions
Comments
No comments yet
Be the first to share your thoughts on this post!