# PostgreSQL (/docs/next/quickstart/postgresql)

> For the complete Prisma documentation index, see [llms.txt](https://www.prisma.io/docs/llms.txt). A markdown version of any docs page is available by appending `.md` to its URL.

Create a new Prisma Next project with PostgreSQL using create-prisma@next.

Location: Next > Quickstart > PostgreSQL

Create a Prisma Next app with PostgreSQL, seed it, and run your first query.

> [!NOTE]
> Prisma Next is in Early Access
> 
> Prisma Next is the next major version of Prisma ORM, available now in Early Access. It’s the cutting-edge version of Prisma ORM and will become the future of Prisma, so we’d love for you to try it, explore what’s new, and [share your feedback in Discord](https://pris.ly/discord).
> 
> If you want to stay on the current generally available version of Prisma ORM, you can continue with [Prisma 7](https://www.prisma.io/docs/getting-started).

## Quick start [#quick-start]

  

#### bun

```bash
bunx create-prisma@next --provider postgres
```

#### pnpm

```bash
pnpm dlx create-prisma@next --provider postgres
```

#### yarn

```bash
yarn dlx create-prisma@next --provider postgres
```

#### npm

```bash
npx create-prisma@next --provider postgres
```

Run this from a Node.js 24 or newer environment. The command preselects PostgreSQL, so you can focus on the template and database URL prompts. Pick Prisma Postgres if you want setup to create the database for you, or paste your own `DATABASE_URL`.

Setup gives you the app template, a starter contract, `prisma-next.md`, project-level Prisma Next skills for your coding agent, and package scripts for the database steps below.

If you use your own database, keep the connection string ready before you start.

## 1. Check the database connection [#1-check-the-database-connection]

Open `.env` and confirm that `DATABASE_URL` points to the PostgreSQL database you want Prisma Next to use.

```text title=".env"
DATABASE_URL="postgresql://username:password@host:5432/database?sslmode=require"
```

If you chose Prisma Postgres during setup, this value is already written for you. If you pasted your own connection string, keep it in `.env` and do not hardcode it in application code.

## 2. Initialize the database [#2-initialize-the-database]

From the generated project directory, run `db:init` to apply the starter schema to PostgreSQL and sign the database.

  

#### bun

```bash
bun run db:init
```

#### pnpm

```bash
pnpm run db:init
```

#### yarn

```bash
yarn db:init
```

#### npm

```bash
npm run db:init
```

## 3. Seed data [#3-seed-data]

`db:seed` inserts sample users so the first query has data to show.

  

#### bun

```bash
bun run db:seed
```

#### pnpm

```bash
pnpm run db:seed
```

#### yarn

```bash
yarn db:seed
```

#### npm

```bash
npm run db:seed
```

## 4. Run the app [#4-run-the-app]

Start the app and confirm the sample query runs successfully.

  

#### bun

```bash
bun run dev
```

#### pnpm

```bash
pnpm run dev
```

#### yarn

```bash
yarn dev
```

#### npm

```bash
npm run dev
```

Use the URL or terminal output shown by your template. You should see the seeded users returned from PostgreSQL.

## Next steps [#next-steps]

* Open `src/prisma/contract.prisma` or `src/prisma/contract.ts` and change the starter model.
* Use the [PostgreSQL existing-project guide](https://www.prisma.io/docs/next/add-to-existing-project/postgresql) if you already have an app and database.
* Read the [Prisma Next overview](https://www.prisma.io/docs/orm/next) when you want the concepts behind contracts, query APIs, and migrations.

## Related pages

- [`MongoDB`](https://www.prisma.io/docs/next/quickstart/mongodb): Create a new Prisma Next project with MongoDB using create-prisma@next.