Prisma 8 is here.Read the docs

dev

Start a local Prisma Postgres server for development

The prisma dev command starts a local Prisma Postgres database that you can run Prisma ORM commands against. Use it for development and testing, then point the same project at Prisma Postgres for production.

Usage

prisma dev [options]

Options

OptionDescriptionDefault
-n, --nameName of the server (helps isolate state between projects)default
-p, --portMain port number the Prisma Dev server will listen on51213
-P, --db-portPort number the database server will listen on51214
--shadow-db-portPort number the shadow database server will listen on51215
-d, --detachRun the server in the backgroundfalse
--debugEnable debug loggingfalse

Subcommands

CommandDescription
prisma dev lsList available servers
prisma dev rmRemove servers
prisma dev startStart one or more stopped servers
prisma dev stopStop servers

Examples

Start a local Prisma Postgres server

bunx prisma dev

Output:

✔  Great Success!

   Your  prisma dev  server default is ready and listening on ports 63567-63569.

╭──────────────────────────────────╮
│[q]uit  [h]ttp url  [t]cp urls    │
╰──────────────────────────────────╯

Start with a specific name

Create a named instance for project isolation:

bunx prisma dev --name="mydbname"

Run in detached mode

Run the server in the background:

bunx prisma dev --detach

This frees up your terminal. Use prisma dev ls to see running servers and prisma dev stop to stop them.

Specify custom ports

bunx prisma dev --port 5000 --db-port 5001 --shadow-db-port 5002

On this page