The Prisma 8 Release Candidate is available.Read the docs

Deploy your first app

Take a TypeScript app from your terminal to a live URL on Prisma Compute, either by scaffolding a new one or connecting a project you already have.

Prisma Compute is serverless hosting for TypeScript apps. It runs your app right next to your Prisma Postgres database, so the trip from app to data stays short.

This is a quickstart: sign in, connect, and ship. There are two ways in:

  • To start fresh, scaffold a new app with create-prisma. Follow Option A.
  • To deploy an app you already have, connect its repository and push. Follow Option B.

Deployments on Compute come from a git push, the Console, or Prisma Composer; the CLI manages everything around them. To learn more about how Compute works, see the resource model for a mental model.

Prerequisites

Before you start, make sure you have:

  • A JavaScript runtime. Node.js 22 or newer for npx/pnpm dlx, or Bun for bunx.
  • A Prisma Data Platform account. Free to create, and it holds your workspace.
  • An app in a GitHub repository, if you are bringing your own. Compute builds Next.js, Nuxt, Astro, Hono, NestJS, TanStack Start, and plain Bun servers today, including Elysia (which runs on Bun). Skip this if you are scaffolding a new app below.

1. Sign in

Sign in once. This is the only step that needs a human, because it opens your browser:

bunx @prisma/cli@next auth login

It stores a session on your machine that every later command reads automatically, including a coding agent working in your directory. Confirm it any time with auth whoami.

Two shortcuts from here:

2. Get your app deployed

Both options finish in the same place: a live URL and a project that redeploys on every push.

Option A: Scaffold a new app with create-prisma

create-prisma builds a TypeScript app from a template and wires up Prisma. Run it and answer the prompts:

bunx create-prisma@latest

It asks for a template, a database provider, and a few options. When you pick PostgreSQL, it can provision a Prisma Postgres database and wire the connection string in, so your app has a database from its first request. To skip the prompts, pass your choices as flags:

bunx create-prisma@latest --name my-api --template hono --provider postgresql

Push the scaffolded app to a GitHub repository, then continue with Option B to connect and deploy it.

Option B: Connect a project you already have

From your app's directory, describe the app, create a project, and connect the repository:

bunx @prisma/cli@next init
bunx @prisma/cli@next project create my-app
bunx @prisma/cli@next git connect

What each step does:

  1. init detects your framework and writes prisma.compute.ts, the committed config the platform builds from. To choose the framework yourself, pass --framework (use --framework bun --entry <server file> for a Bun or Elysia server).
  2. project create sets up a project and pins this directory to it via .prisma/local.json, a gitignored local cache. If your team already has a project, run project link instead.
  3. git connect links the repository, starting the GitHub App install flow if needed.

Now push. Your default Git branch builds and deploys to production; every other branch gets its own isolated preview with its own URL:

git push

3. Verify the deployment

Confirm the service and its deployment, then open the live URL:

bunx @prisma/cli@next service show
bunx @prisma/cli@next service open

service show prints the current deployment and its build id. If something looks wrong, stream the build's logs:

bunx @prisma/cli@next build logs <buildId> --follow

You can also inspect everything in the Console instead of the terminal: projects, branches, services, deployments, integrations, and domains.

4. Ship changes

Push again whenever you want to ship. Every push builds and deploys its branch: your default branch goes to production, and feature branches get isolated previews, so you can ship previews as often as you like without touching production.

To manage what is live, promote a preview deployment to production (it rebuilds with production environment variables) or roll back to a known-good one:

bunx @prisma/cli@next service deployment promote dep_123
bunx @prisma/cli@next service deployment rollback

To learn more, see Deployments.

Hand it to your agent

You can let a coding agent do the work. Sign in once yourself (step 1), because the browser step needs a human. After that, anything running in your environment inherits the session, including your agent. Paste this into your agent and fill in the blanks:

Build [what you want] in [framework] and get it deployed to Prisma Compute using `npx @prisma/cli@next`.

Notes:
- Before starting, run `npx @prisma/cli@next auth whoami`; if I am not signed in, stop and ask me to run `npx @prisma/cli@next auth login` (it opens a browser).
- Run every CLI command as `npx @prisma/cli@next <command>`, and add `--json` for structured output; on errors, follow the `nextActions` the CLI returns.
- Compute supports Next.js, Nuxt, Astro, Hono, NestJS, TanStack Start, and plain Bun servers. If you build a Next.js app, set `output: "standalone"` in its config. For a Bun or Elysia server pass `--framework bun --entry <server file>` to `init`.
- Set up with `init`, then `project create <name>`, then `git connect`; deploys happen on git push. Verify with `service show` and confirm the live URL responds with curl.
- To give the app a database, create one with `npx @prisma/cli@next postgres create <name>` and set its connection string as an environment variable.
- If the app needs config or secrets, scope them to the environment you are deploying: `npx @prisma/cli@next project env add KEY=value --role production` (or `--role preview`), then redeploy. Full scoping rules: https://www.prisma.io/docs/compute/environment-variables.md

For example:

Build a Hono API with a /todos endpoint backed by an in-memory list and get it deployed to Prisma Compute using `npx @prisma/cli@next`.

The notes travel with the prompt, so your agent checks sign-in state, verifies the live URL, and scopes environment variables correctly. For the full scoping rules in the docs, see Environment variables.

What's next

  • Branching: how preview branches isolate work and map to your Git branches.
  • Add environment variables for configuration, secrets, and your database connection string.
  • Deployments: promote, roll back, and inspect what you ship.
  • GitHub integration: the full picture on deploy-on-push, monorepos, and cleanup.
  • Prisma Composer: declare multi-service apps in TypeScript and deploy them from the CLI.

On this page