Getting started
Quickstart
Run the following command in your terminal to create a fresh Prisma Postgres instance:
npx prisma init --db
Once you ran this command, the terminal will output instructions for you to follow the steps on this page in order to set up your first project with Prisma Postgres.
Prisma ORM
The easiest ways to get started with Prisma Postgres is by following these guides:
If you are looking to explore Prisma Postgres in a fullstack project, check out these resources:
- Build a fullstack app with Next.js 15
- Next.js 15 example app (including authentication)
When you are using Prisma Postgres, you don't need to include the query engine in the generated Prisma Client code. Make sure to always generate it using the --no-engine
flag:
prisma generate --no-engine
Connect via any database library / tool
You can access Prisma Postgres with any ORM or database tool of your choice via direct TCP connections.
In order to get a direct TCP connection string, you need to:
- open a project in your Prisma Console account (or create a new one)
- navigate to a environment with an active Prisma Postgres instance
- click the API Keys tab in the project's sidenav
- click the Create API key button
- in the popup, provide a Name for the API key and click Create
- copy the connection string starting with
postgres://
, this is your direct TCP connection string
Once you have the connection string, you can follow the setup docs for PostgreSQL of any ORM or database tool: