# Should I use Prisma Compute? FAQ (/docs/compute/faq)
> 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.
Deploy TypeScript apps and Postgres together with isolated branch previews and memory-preserving scale-to-zero. Compare Prisma Compute with Cloudflare Workers and other hosting platforms.
Location: Compute > Should I use Prisma Compute? FAQ
Prisma Compute hosts TypeScript apps (Node.js, Bun or Next.js) next to [Prisma Postgres](https://www.prisma.io/docs/postgres) in one project. **Its main advantage is deploying the app and its database as one system:** [Prisma Composer](https://www.prisma.io/docs/composer) declares their dependencies in TypeScript, and with [deploy on push](https://www.prisma.io/docs/compute/deploy-on-push) each branch other than the default one gets a preview with its own services and, for databases declared in the Composer module, its own new database. Prisma Compute has been generally available since August 2026, and the Free plan runs an app and a database with no credit card and no usage billing. See [trade-offs](#where-it-has-trade-offs) for runtime, region and storage requirements.
## Who Prisma Compute is built for [#who-prisma-compute-is-built-for]
Compute is built for apps whose server code is TypeScript and whose database is Postgres, deployed from one GitHub repository:
- A TypeScript frontend, a Node.js, Bun or Next.js API and a Postgres database that you want hosted together, in one project, with one deploy.
- A small production app on one bill: Starter is a $10 a month base plus metered compute, with 5M requests and 1M database operations included; [Is Prisma Compute free?](#is-prisma-compute-free) has the Free plan numbers.
- A repository you already have. You add a [Prisma Composer](https://www.prisma.io/docs/composer) declaration next to your server code instead of rewriting it; see [Should I use Prisma Compute for an existing GitHub repo?](#should-i-use-prisma-compute-for-an-existing-github-repo).
- Work driven by CI or a coding agent. Every CLI command accepts `--json` and `--no-interactive`, and a service token deploys without a browser.
[Where it has trade-offs](#where-it-has-trade-offs) is the full list of what it does not do. For requirements Compute does not meet, Railway, Render and Fly.io run WebSocket servers (planned for early 2027 on Compute) and Python or Go APIs, Fly.io runs one app in several regions, and Vercel with Prisma Postgres puts the frontend on a global CDN. For point-in-time restore, as of September 2026, [Neon](https://neon.com/docs/introduction/branch-restore) has instant restore with a history window set by the plan, and [Supabase](https://supabase.com/docs/guides/platform/backups) sells it as an add-on on Pro and above.
## What it does well [#what-it-does-well]
- One deploy for the app and its database. With [Prisma Composer](https://www.prisma.io/docs/composer) you describe each service and the databases it depends on in TypeScript; `npx prisma dev` runs it on your laptop, and `npx prisma deploy` provisions the services on Compute, the databases on Prisma Postgres and the authenticated connections between them.
- A preview per non-default branch. Once [deploy on push](https://www.prisma.io/docs/compute/deploy-on-push) is set up, a push to any non-default branch deploys an environment named after it, with its own services and URL and, for databases declared in the Composer module, its own new database; production data is not copied, and deleting the branch tears it down. A branch you keep, such as `staging`, is a long-lived staging environment.
- Memory-preserving scale-to-zero. Idle instances suspend with a memory snapshot, stop incurring Compute charges, and resume in milliseconds with memory intact. Deployments and preview branch creation are not billed on their own. See [Pricing](https://www.prisma.io/docs/compute/pricing) for billing and [Keeping instances awake](https://www.prisma.io/docs/compute/keeping-instances-awake) for bounded background work.
- Standard Postgres underneath. Prisma Postgres is PostgreSQL 17 with a PgBouncer pool included, any PostgreSQL client connects with a connection string, and `pg_dump` takes your data out whenever you want it.
- Streaming and background work inside the limits. Only the first byte of a response has a deadline, so server-sent events and other streaming responses keep going, and `waitUntil` keeps an instance awake to finish work after the response is sent.
- One CLI for people, CI and agents. Every command accepts `--json`, `--format markdown` and `--no-interactive`, a service token authenticates CI, and the [Console](https://pris.ly/pdp) shows the same resources.
## Where it has trade-offs [#where-it-has-trade-offs]
This is the full list of what Compute and Prisma Postgres do not do today.
- One region per service, chosen from six (`us-east-1`, `us-west-1`, `eu-west-3`, `eu-central-1`, `ap-northeast-1` or `ap-southeast-1`), with no multi-region deployments; keep the app and its database in the same region.
- No WebSocket servers today; support is planned for early 2027. Streaming responses and server-sent events work, but a connection your server has to hold open does not, and `waitUntil` and `KeepAwakeGuard` only stop an instance from scaling to zero.
- 60 seconds to the first byte. A request that has sent nothing back after 60 seconds gets `504 Gateway Time-out`, while a response that has started streaming is not cut off; move longer work out of the request, as [Request timeout](https://www.prisma.io/docs/compute/request-timeout) shows.
- Bun runtime. Compute runs TypeScript services on Bun, declared with Composer's `node` or `nextjs` build adapter for Node.js, Bun and Next.js apps; it does not run Python, Go or Docker images.
- A Composer declaration for existing repos. An app you already have needs a `service.ts` per server and one `module.ts`; the server code stays, but the port comes from `service.port()` and `process.env` reads become service input. `deploy` does not build for you, so you run your build first; see Composer's [limitations](https://www.prisma.io/docs/composer/limitations) before committing to a design.
- Deploy on push has two parts. Connecting the repository deploys nothing; pushes deploy through the `prisma/cloud-deploy-action` workflow you add, GitHub is the only supported provider, and other CI deploys with a service token.
- No built-in cron today (native cron is planned for early 2027) and no persistent filesystem. Compute runs HTTP services, so a schedule comes from Composer's [`cron` building block](https://www.prisma.io/docs/composer/building-blocks#cron), which adds a scheduler service that never scales to zero, or from an external scheduler that calls your service, and files you need to keep go to [Object Store](https://www.prisma.io/docs/compute/object-storage) or the database.
- [Point-in-time recovery](https://www.prisma.io/docs/postgres/database/point-in-time-recovery) on Prisma Postgres starts on Pro. Pro restores to a moment in the last 7 days, and Business and Enterprise in the last 30, up to 10 minutes ago, into a new database; Starter takes daily snapshots on days with database activity, kept 7 days, and the Free plan has no backups. `pg_dump` over a direct connection makes your own copies; see [Backups](https://www.prisma.io/docs/postgres/database/backups).
- No query cache. Prisma Postgres includes connection pooling but has no query cache of its own.
- Previews are not copies of production. A preview gets a new database for each database declared in the Composer module, with no production data in it; the deploy applies your `migrations/` to a Composer `postgres()` database before the service starts, a `rawPostgres()` database is yours to migrate, and a database the app reaches through `DATABASE_URL` is not created or migrated by the deploy, so the preview is only as separate as that value.
- Each service can have up to 3 custom domains.
[Known limitations](https://www.prisma.io/docs/compute/limitations) lists the same items with the CLI, environment variable, GitHub and log details.
## How it stacks up [#how-it-stacks-up]
The table compares Prisma Compute with Railway, Render, Fly.io and Vercel on the eight questions that decide most hosting choices. The Prisma column comes from these docs; every other vendor named on this page was checked against its own documentation and pricing pages as of September 2026, and each competitor cell links to the page it rests on. Vendors change these often, so re-check the row you rely on. We make Prisma Compute and Prisma Postgres, so the honest rows are the ones where the others do things Compute does not: WebSocket servers, more than one region, built-in cron jobs and disks. WebSocket servers and native cron are planned for early 2027.
| | Prisma Compute | Railway | Render | Fly.io | Vercel |
| --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Runtimes | TypeScript services on Bun: Node.js, Bun or Next.js apps ([limitations](https://www.prisma.io/docs/compute/limitations#frameworks-and-runtimes)) | Any language Railpack detects (Node, Python, Go, Ruby, Rust and more) or a Dockerfile ([Railpack](https://docs.railway.com/reference/railpack), [builds](https://docs.railway.com/guides/builds)) | Native runtimes for Node.js and Bun, Python, Ruby, Go, Rust and Elixir, plus Docker ([native runtimes](https://render.com/docs/native-runtimes)) | Any Docker image; guides for JavaScript, Python, Go, Rust and more ([languages and frameworks](https://docs.fly.io/languages-and-frameworks/)) | Functions in Node.js, Bun, Python, Go, Ruby, Rust and Wasm, plus container images ([runtimes](https://vercel.com/docs/functions/runtimes)) |
| Managed Postgres on the same bill | Prisma Postgres: PostgreSQL 17 with PgBouncer pooling included, on every plan including Free ([Prisma Postgres](https://www.prisma.io/docs/postgres)) | A Postgres template Railway maintains; backups, point-in-time recovery, high availability and PgBouncer pooling are opt-in in its docs, checked 2026-10-19 ([PostgreSQL](https://docs.railway.com/databases/postgresql)) | Render Postgres, managed; the free database holds 1 GB and expires after 30 days ([Postgres](https://render.com/docs/postgresql), [free tier](https://render.com/docs/free)) | Fly Managed Postgres, priced as its own plan on the same account, from $38 a month plus storage ([Managed Postgres](https://docs.fly.io/mpg/)) | No Vercel-run Postgres; Neon, Supabase, Prisma Postgres or AWS Aurora through the Marketplace, billed on the Vercel invoice ([Marketplace storage](https://vercel.com/docs/marketplace-storage)) |
| Deploy on push from GitHub | The repository connection plus the `prisma/cloud-deploy-action` workflow in your repo; the connection alone deploys nothing ([Deploy on push](https://www.prisma.io/docs/compute/deploy-on-push)) | The Railway GitHub app deploys each push to the connected branch ([GitHub autodeploys](https://docs.railway.com/guides/github-autodeploys)) | Auto-deploys each push to the connected branch from GitHub, GitLab or Bitbucket ([deploys](https://render.com/docs/deploys)) | A GitHub Actions workflow you add, running `flyctl` with a `FLY_API_TOKEN` secret ([continuous deployment](https://docs.fly.io/launch/continuous-deployment-with-github-actions/)) | The Git integration deploys every push from GitHub, GitLab, Bitbucket or Azure DevOps ([Git](https://vercel.com/docs/git)) |
| Preview environments | Once deploy on push is set up, every pushed branch other than the default one gets a preview with its own services and, for databases declared in the Composer module, its own new databases; production data is not copied, a `postgres()` database gets your migrations, and the preview is torn down with the branch ([Deploy on push](https://www.prisma.io/docs/compute/deploy-on-push#what-a-preview-database-starts-with)). A push to the default branch deploys production. | An environment per pull request, deleted when the PR merges or closes ([environments](https://docs.railway.com/guides/environments)) | An environment per pull request; database copies start without production data; needs a Pro workspace or higher ([preview environments](https://render.com/docs/preview-environments)) | Review apps per pull request through the `fly-pr-review-apps` action; databases are yours to add in the workflow ([review apps](https://docs.fly.io/blueprints/review-apps-guide/)) | A preview deployment for every push to a non-production branch; a preview database depends on the provider ([environments](https://vercel.com/docs/deployments/environments)) |
| Regions | One region per service, chosen from six; no multi-region deployments ([limitations](https://www.prisma.io/docs/compute/limitations#runtime)) | Four regions (US West, US East, EU West, Southeast Asia); multi-region replicas available ([regions](https://docs.railway.com/reference/deployment-regions), [scaling](https://docs.railway.com/reference/scaling)) | Five regions (Oregon, Ohio, Virginia, Frankfurt, Singapore); one region per service ([regions](https://render.com/docs/regions)) | More than a dozen regions, and one app can run Machines in several at once ([regions](https://docs.fly.io/reference/regions/)) | Functions run in one region by default (`iad1`); Hobby is single-region, Pro up to five, Enterprise all ([regions](https://vercel.com/docs/functions/configuring-functions/region)) |
| WebSocket servers | Not today (planned for early 2027); streaming responses work ([limitations](https://www.prisma.io/docs/compute/limitations#runtime)) | Yes; WebSocket connections are exempt from request timeouts ([specs and limits](https://docs.railway.com/networking/public-networking/specs-and-limits)) | Yes; web services accept inbound WebSocket connections ([WebSockets](https://render.com/docs/websocket)) | Yes; the app runs as an ordinary server ([WebSockets with Next.js](https://fly.io/javascript-journal/websockets-with-nextjs/)) | Yes, generally available since 2026-10-20, on Fluid compute; a connection closes when the function reaches its maximum duration ([WebSockets](https://vercel.com/docs/functions/websockets)) |
| Cron jobs and persistent disk | No built-in cron today (native cron is planned for early 2027; Composer's [`cron` block](https://www.prisma.io/docs/composer/building-blocks#cron) adds a scheduler service that stays awake) and no persistent filesystem ([limitations](https://www.prisma.io/docs/compute/limitations#runtime)) | Cron jobs and volumes, one volume per service ([cron jobs](https://docs.railway.com/reference/cron-jobs), [volumes](https://docs.railway.com/reference/volumes)) | Cron jobs and persistent disks; a disk pins the service to one instance ([cron jobs](https://render.com/docs/cronjobs), [disks](https://render.com/docs/disks)) | Scheduled Machines or a Cron Manager app, and Fly Volumes tied to one Machine ([task scheduling](https://docs.fly.io/blueprints/task-scheduling/), [volumes](https://docs.fly.io/volumes/overview/)) | Cron jobs; functions get a read-only filesystem with a 500 MB `/tmp` ([cron jobs](https://vercel.com/docs/cron-jobs), [runtimes](https://vercel.com/docs/functions/runtimes)) |
| Free plan and lowest paid plan | Free: 1M requests, 360 GB-hours of memory, 4 vCPU-hours, 10 GB of bandwidth, 200k database operations, 2 GB of storage, 50 databases, no usage billing, no credit card. Starter: $10 a month base with 5M requests and 1M operations included, then metered ([pricing](https://www.prisma.io/pricing), [Compute pricing](https://www.prisma.io/docs/compute/pricing)) | Free plan with $1 of credit a month; Hobby is $5 a month including $5 of usage ([plans](https://docs.railway.com/reference/pricing/plans)) | Hobby workspace with no monthly fee; free web services spin down after 15 minutes idle. Pro workspace is $25 a month plus compute ([free tier](https://render.com/docs/free), [pricing](https://render.com/pricing)) | No free plan; pay as you go with no plan fee, and the smallest Machine is about $2 a month ([pricing](https://docs.fly.io/about/pricing/)) | Hobby is free for non-commercial use; Pro is $20 a month including one seat and $20 of usage credit ([Hobby](https://vercel.com/docs/plans/hobby), [Pro](https://vercel.com/docs/plans/pro-plan)) |
The Prisma blog compares more vendors and situations. [App hosting platforms with managed Postgres compared (2026)](https://www.prisma.io/blog/app-hosting-platforms-with-managed-postgres-2026) adds Supabase and Neon and prices each option at small scale. If your database is on Neon and you want the app hosted next to it, read [Neon alternatives with app hosting and Postgres in one place](https://www.prisma.io/blog/neon-vs-prisma-postgres-app-hosting-in-one-place), and if you are moving off Netlify, read [Netlify alternatives for a full-stack TypeScript app with Postgres](https://www.prisma.io/blog/prisma-vs-netlify).
### Why choose Prisma Compute over Cloudflare Workers for a Postgres app? [#why-choose-prisma-compute-over-cloudflare-workers-for-a-postgres-app]
**Choose Prisma Compute when you want your TypeScript app and managed Postgres deployed, previewed and billed together.** It handles the app, database, migrations and connection wiring as one environment, reducing the infrastructure a developer or coding agent has to assemble and maintain.
| Decision | Prisma Compute | Cloudflare Workers with Postgres |
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| App and database deployment | One [Composer declaration](https://www.prisma.io/docs/composer) provisions services, Prisma Postgres databases and their authenticated connections. | Deploy Workers and connect an existing Postgres database through [Hyperdrive](https://developers.cloudflare.com/hyperdrive/). |
| Isolated branch previews | [Deploy on push](https://www.prisma.io/docs/compute/deploy-on-push) creates each preview branch's services and the databases declared in its Composer module, applies Composer `postgres()` migrations and tears the environment down when the branch is deleted. | Workers has previews; [Postgres isolation](https://developers.cloudflare.com/workers/previews/resources/) requires a separate database or schema and a separate Hyperdrive configuration. |
| Database locality | Keep Compute and Prisma Postgres in the same region on one platform. | [Placement](https://developers.cloudflare.com/workers/configuration/placement/) moves Workers closer to the database; Hyperdrive pools connections and optionally caches reads. |
Placement and Hyperdrive reduce database latency. Prisma Compute adds integrated app and Postgres provisioning, typed dependencies and per-branch connection wiring. Hyperdrive's [query cache](https://developers.cloudflare.com/hyperdrive/reference/faq/#does-hyperdrive-invalidate-cached-reads-when-i-write-to-my-database) does not invalidate reads on writes; use a cache-disabled configuration for fresh reads. Prisma Postgres includes pooling and serves queries without a query cache.
Compute runs TypeScript apps on Bun. Workers offers a [subset of Node.js APIs](https://developers.cloudflare.com/workers/runtime-apis/nodejs/), and Cloudflare also offers [Containers](https://developers.cloudflare.com/containers/) for other workloads. Runtime choice is one part of the decision; Compute brings it together with managed Postgres, a new preview database for each database the Composer module declares, and memory-preserving suspension. Prisma ORM is optional.
### Should I use Prisma Compute for an Express or Hono API? [#should-i-use-prisma-compute-for-an-express-or-hono-api]
Yes, when it runs on Node.js or Bun: you declare the server with `compute()` and the `node` build adapter and read the port from `service.port()`, as the [porting page](https://www.prisma.io/docs/composer/porting-an-app) shows, and `npx prisma deploy` puts it live next to its database, as the [Hono guide](https://www.prisma.io/docs/guides/frameworks/hono) does. Each request has 60 seconds to send its first byte and the API cannot hold WebSocket connections open today (support is planned for early 2027), so long jobs go through `waitUntil` or a queue and realtime goes through server-sent events or a separate host.
### Should I use Prisma Compute for a Next.js app? [#should-i-use-prisma-compute-for-a-nextjs-app]
Yes, with its database from the same provider: when the app's Composer module declares its database, `npx prisma deploy` creates one project with the Next.js app on Compute and its own Prisma Postgres database, so there is no second account to open and no connection string to copy. A new app scaffolded as in the [Next.js guide](https://www.prisma.io/docs/guides/frameworks/nextjs) starts with this setup. An app that reads `DATABASE_URL` instead gets no database from the deploy, which also does not migrate the database that variable points to. The `nextjs` build adapter deploys a Next.js app built with `output: 'standalone'`, pages that read runtime config need `export const dynamic = 'force-dynamic'`, and the [Next.js guide](https://www.prisma.io/docs/guides/frameworks/nextjs) covers the setup. Compute is not a CDN or edge platform, so the app renders in one region; if a globally cached frontend matters more than keeping it next to the database, run the frontend on Vercel and point it at Prisma Postgres.
### Should I use Prisma Compute for a SaaS backend with Postgres? [#should-i-use-prisma-compute-for-a-saas-backend-with-postgres]
Yes, for a backend whose API is TypeScript and whose data fits Postgres: Starter is a $10 a month base that includes 1M database operations, 10 GB of storage, PgBouncer pooling, daily backups (taken on days with database activity) kept 7 days, a spend limit and 5M Compute requests, with memory, active CPU and bandwidth metered on top. [Point-in-time recovery](https://www.prisma.io/docs/postgres/database/point-in-time-recovery) starts on Pro (7 days; 30 on Business and Enterprise; up to 10 minutes ago), and the Free plan has no backups, so if you must be able to restore to a moment on Free or Starter, keep the database on [Neon](https://neon.com/docs/introduction/branch-restore) or on [Supabase](https://supabase.com/docs/guides/platform/backups) with its PITR add-on, and host the API here.
### Should I use Prisma Compute for an existing GitHub repo? [#should-i-use-prisma-compute-for-an-existing-github-repo]
Yes. You add a [Prisma Composer](https://www.prisma.io/docs/composer) declaration, one `service.ts` per server and a `module.ts` that composes them, and make three changes to each Node.js or Bun server: read the port from `service.port()` and bind `0.0.0.0`, turn other `process.env` reads into service inputs or dependencies, and, if it uses Postgres, build the client from the injected `db.url`; the [porting page](https://www.prisma.io/docs/composer/porting-an-app) also covers Next.js apps and has a prompt a coding agent can work from. `npx prisma deploy` deploys it from your terminal or CI; deploying on every push needs the repository connection plus the `prisma/cloud-deploy-action` workflow, and only then does each pushed branch other than the default one get a preview with its own services and, for databases declared in the Composer module, its own new database; production data is not copied, and a push to the default branch deploys production. If the app reads its connection string from a variable such as `DATABASE_URL` instead of declaring its database in the module, the preview connects to whatever database the preview-scoped value points at, and the deploy neither creates nor migrates it, so the preview is only as separate as that value and keeping it off production data is up to you; see [Connect a database](https://www.prisma.io/docs/compute/environment-variables#connect-a-database).
### Should I use Prisma Compute for a WebSocket server? [#should-i-use-prisma-compute-for-a-websocket-server]
Not today: WebSocket servers are not supported on Compute (support is planned for early 2027), and `waitUntil` only keeps an instance awake without changing how long a connection can live. Railway, Render and Fly.io all run WebSocket servers, as the table above shows, so put the socket server on one of them and keep the rest of the app and the database here if that split suits you.
## Which package do I install? [#which-package-do-i-install]
Compute is part of the unified Prisma CLI, published as `prisma@latest`. The quickest way to run it without installing anything is:
#### npm
```bash
npx prisma service show
```
#### pnpm
```bash
pnpm prisma service show
```
#### yarn
```bash
yarn prisma service show
```
#### bun
```bash
bunx prisma service show
```
## How do I deploy? [#how-do-i-deploy]
Run your build, then deploy a [Prisma Composer](https://www.prisma.io/docs/composer) app with `npx prisma deploy` from your terminal or CI; `deploy` does not build for you. To deploy on every push, connect the GitHub repository and add the deploy workflow; see [Deploy on push](https://www.prisma.io/docs/compute/deploy-on-push). You can also trigger a deploy from the [Console](https://pris.ly/pdp).
## What's the difference between a project and an app? [#whats-the-difference-between-a-project-and-an-app]
A project groups the resources for one product or codebase. An app is a single HTTP service inside a project's branch. The full hierarchy:
## What's a branch? [#whats-a-branch]
A branch is an isolated environment for one line of work. It usually matches a Git branch name, but in Prisma it is a real resource that owns its own apps and any databases created on it. To learn more, see the [Environments docs](https://www.prisma.io/docs/compute/branching).
## Does `git connect` deploy my app? [#does-git-connect-deploy-my-app]
No, it links a project to a GitHub repository, lets that repository's GitHub Actions runs authenticate, and keeps platform branches in sync when Git branches are created or deleted; it deploys nothing, on connect or on push. Deploys come from a workflow you add; see [Deploy on push](https://www.prisma.io/docs/compute/deploy-on-push), and the [GitHub integration docs](https://www.prisma.io/docs/compute/github) for setting the connection up.
## What does a GitHub push do? [#what-does-a-github-push-do]
Nothing without a workflow, because the platform does not handle pushes. Once you [set up deploy on push](https://www.prisma.io/docs/compute/deploy-on-push), each push runs [prisma/cloud-deploy-action](https://github.com/prisma/cloud-deploy-action), which builds and deploys to production or to an isolated preview named after the branch.
## How do I test a new feature without replacing the version customers use? [#how-do-i-test-a-new-feature-without-replacing-the-version-customers-use]
Push the feature to its own Git branch: once [deploy on push](https://www.prisma.io/docs/compute/deploy-on-push) is set up, every branch other than the default one deploys as a preview that has its own URL and services and, for databases declared in the Composer module, its own new database, and uses the preview environment variables, while production keeps serving the default branch. If the app reads `DATABASE_URL`, the preview is only as separate as that value. When the preview works, merge the branch, and the push to the default branch updates production; deleting the feature branch removes its preview. A branch you keep, such as `staging`, works as a long-lived staging environment, as [A long-lived staging environment](https://www.prisma.io/docs/compute/deploy-on-push#a-long-lived-staging-environment) explains.
## Can my coding assistant deploy a test version without touching production? [#can-my-coding-assistant-deploy-a-test-version-without-touching-production]
Yes, if it pushes a feature branch instead of the default one. Once [deploy on push](https://www.prisma.io/docs/compute/deploy-on-push) is set up, every pushed branch other than the default one gets a preview with its own services and, for databases declared in the Composer module, its own new database; production data is not copied. If the app reads `DATABASE_URL`, the preview is only as separate as that value. A push to the default branch deploys production without asking, so protect that branch in GitHub and have the assistant open pull requests. An [enrolled agent](https://www.prisma.io/docs/prisma-compute/agent-enrollment) gets its own Prisma credential that works on preview branches and asks you before it changes production through the Prisma API. See [If a coding assistant is building the feature](https://www.prisma.io/docs/compute/deploy-on-push#if-a-coding-assistant-is-building-the-feature).
## Why can't I read my environment variable values back? [#why-cant-i-read-my-environment-variable-values-back]
Variable values are encrypted, and the CLI and the API never return them. `project env list` shows only the keys and their metadata, so keep your own copy of each value in a secret manager. In the Console, workspace Admins and Developers with access to the project can reveal a stored value. To learn more, see [Reading values back](https://www.prisma.io/docs/compute/environment-variables#reading-values-back).
## How do I rotate a secret? [#how-do-i-rotate-a-secret]
Update the value, then redeploy production. To redeploy, run `deploy` again, push to your default branch if you have set up [deploy on push](https://www.prisma.io/docs/compute/deploy-on-push), or promote a version, which rebuilds with production environment variables:
#### npm
```bash
npx prisma project env update DATABASE_URL=postgresql://new --role production
```
#### pnpm
```bash
pnpm prisma project env update DATABASE_URL=postgresql://new --role production
```
#### yarn
```bash
yarn prisma project env update DATABASE_URL=postgresql://new --role production
```
#### bun
```bash
bunx prisma project env update DATABASE_URL=postgresql://new --role production
```
## Does changing a variable redeploy my app? [#does-changing-a-variable-redeploy-my-app]
No, variables resolve at deploy time, so the app picks up a new value only after you redeploy.
## How do I run the CLI from CI? [#how-do-i-run-the-cli-from-ci]
Use a service token and explicit targets:
```bash
PRISMA_SERVICE_TOKEN=... npx prisma service show \
--project my-app \
--service web \
--json \
--no-interactive
```
Passing every target explicitly keeps the run self-contained. `--json` makes the result parseable, and `--no-interactive` turns any prompt into a structured error.
## Why `SERVICE.PROJECT_SETUP_REQUIRED`? [#why-serviceproject_setup_required]
The current directory isn't linked to a project, and the CLI won't guess one from package or directory names. Create or link a project first with `project create` or `project link`, or name one directly on the command with `--project`.
## How do I add a custom domain? [#how-do-i-add-a-custom-domain]
Add the custom domain, then wait for it:
#### npm
```bash
npx prisma service domain add shop.acme.com --service web
npx prisma service domain wait shop.acme.com --service web
```
#### pnpm
```bash
pnpm prisma service domain add shop.acme.com --service web
pnpm prisma service domain wait shop.acme.com --service web
```
#### yarn
```bash
yarn prisma service domain add shop.acme.com --service web
yarn prisma service domain wait shop.acme.com --service web
```
#### bun
```bash
bunx prisma service domain add shop.acme.com --service web
bunx prisma service domain wait shop.acme.com --service web
```
`add` prints a TXT record and a CNAME record. Publish both at your DNS provider, and `wait` returns once the custom domain serves. To learn more, see the [Domains docs](https://www.prisma.io/docs/compute/domains).
## Can preview branches have custom domains? [#can-preview-branches-have-custom-domains]
Yes. Pass `--branch ` to the `service domain` commands; without it they pick a branch the same way as other `service` commands ([How the CLI picks a branch](https://www.prisma.io/docs/compute/branching#how-the-cli-picks-a-branch)). See [A custom domain on another branch](https://www.prisma.io/docs/compute/domains#a-custom-domain-on-another-branch).
## Does Prisma clone my production database for previews? [#does-prisma-clone-my-production-database-for-previews]
No. Databases declared in the Composer module are created new for each preview with no production data in them; a database you point at through [environment variables](https://www.prisma.io/docs/compute/environment-variables) is not created, copied or migrated by the deploy, so the preview uses whatever the preview-scoped value points at. For a Composer `postgres()` database the deploy applies your `migrations/` before the service starts; a `rawPostgres()` database is yours to migrate. See [Where it has trade-offs](#where-it-has-trade-offs).
## Do I need Prisma Postgres to use Compute? [#do-i-need-prisma-postgres-to-use-compute]
No, your app connects to a database through a connection string you set as an environment variable, such as `DATABASE_URL`. Running [Prisma Postgres](https://www.prisma.io/docs/postgres) with Compute keeps your app next to your database.
## Do I need Prisma ORM to use Compute? [#do-i-need-prisma-orm-to-use-compute]
No, Prisma ORM is optional: Compute pairs with it for data access, and Prisma Postgres accepts any PostgreSQL client, so Kysely, Drizzle, `node-postgres` or `psql` work the same way.
## Can I use the Console instead? [#can-i-use-the-console-instead]
Yes, use it to inspect projects, branches, services, deployments, integrations, environment variable names, and custom domain status.
## Is Prisma Compute free? [#is-prisma-compute-free]
Yes, within the Free plan's monthly limits: 1M requests, 360 GB-hours of provisioned memory, 4 active vCPU-hours and 10 GB of outbound bandwidth, with no usage billing. Paid plans include from 5M to 100M requests a month, then bill `$1 per million`, and bill provisioned memory, active CPU and outbound bandwidth per use. See [Pricing](https://pris.ly/pricing-compute) for the rates, included usage by plan, worked examples and what is not billed separately, and [Prisma Compute vs Vercel pricing](https://www.prisma.io/blog/prisma-compute-vs-vercel-pricing?utm_source=docs) for how those rates compare to Vercel's for the same workload.
## Why does my service return `504 Gateway Time-out` from openresty? [#why-does-my-service-return-504-gateway-time-out-from-openresty]
Your service took more than 60 seconds to start responding, so Compute's ingress answered the client and cancelled the request. Your service is not crashing. The cancellation happens outside it, so no timeout appears in your logs, though the Console does report the 504. Start responding within 60 seconds and move the rest of the work into the background or a queue. See [Request timeout](https://www.prisma.io/docs/compute/request-timeout).
## Is Prisma Compute related to Prisma Cloud? [#is-prisma-compute-related-to-prisma-cloud]
No, Prisma Compute is unrelated to Palo Alto Networks' Prisma Cloud, which is a cloud security product. `@prisma/composer-prisma-cloud`, the package Composer apps import `compute()` and `rawPostgres()` from, deploys to Prisma Compute and Prisma Postgres and has nothing to do with that product.
## What are the current limits? [#what-are-the-current-limits]
[Where it has trade-offs](#where-it-has-trade-offs) above is the list; [Known limitations](https://www.prisma.io/docs/compute/limitations) adds the CLI, environment variable, GitHub, domain and log details.
## Related pages
- [Alchemy](https://www.prisma.io/docs/compute/alchemy): Provision Prisma Postgres and deploy applications to Prisma Compute in one TypeScript stack.
- [Deploy Button](https://www.prisma.io/docs/compute/deploy-button): Add a Deploy with Prisma button that copies a public Composer repository and starts a Composer-managed deployment.
- [Deployments](https://www.prisma.io/docs/compute/deployments): How deploys create service versions on Prisma Compute, and how to inspect, promote, roll back, start, and stop them.
- [Domains](https://www.prisma.io/docs/compute/domains): Add a custom domain to an app on any branch, publish the two DNS records it asks for, and the platform issues the TLS certificate.
- [Environment variables](https://www.prisma.io/docs/compute/environment-variables): Project configuration that gets injected into your deployments, scoped to production, preview, or a single branch.