# Environment variables reference (/docs/orm/v6/reference/environment-variables-reference)

Location: ORM > v6 > Reference > Environment variables reference

This document describes different environment variables and their use cases.

Prisma Client [#prisma-client]

DEBUG [#debug]

`DEBUG` is used to enable debugging output in Prisma Client.

Example setting Prisma Client level debugging output:

```bash
# enable only `prisma:client`-level debugging output
export DEBUG="prisma:client"
```

See [Debugging](/orm/v6/prisma-client/debugging-and-troubleshooting/debugging) for more information.

NO_COLOR [#no_color]

`NO_COLOR` if [truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy) will activate the `colorless` setting for error formatting and strip colors from error messages.

See [Formatting via environment variables](/orm/v6/prisma-client/setup-and-configuration/error-formatting#formatting-via-environment-variables) for more information.

Prisma Studio [#prisma-studio]

BROWSER [#browser]

`BROWSER` is for Prisma Studio to force which browser it should be open in, if not set it will open in the default browser.

```bash
BROWSER=firefox prisma studio --port 5555
```

Alternatively you can set this when starting Studio from the CLI as well:

```bash
prisma studio --browser firefox
```

See [Studio](/orm/v6/reference/prisma-cli-reference#studio) documentation for more information.

Prisma CLI [#prisma-cli]

PRISMA_HIDE_PREVIEW_FLAG_WARNINGS [#prisma_hide_preview_flag_warnings]

`PRISMA_HIDE_PREVIEW_FLAG_WARNINGS` hides the warning message that states that a preview feature flag can be removed. It is a truthy value.

PRISMA_HIDE_UPDATE_MESSAGE [#prisma_hide_update_message]

`PRISMA_HIDE_UPDATE_MESSAGE` is used to hide the update notification message that is shown when a newer Prisma CLI version is available. It's a truthy value.

PRISMA_GENERATE_SKIP_AUTOINSTALL [#prisma_generate_skip_autoinstall]

> [!CAUTION]
> Prisma v7 Deprecation
> 
> This environment variable is only supported in Prisma 6.19 and earlier. It will not work in Prisma v7.

`PRISMA_GENERATE_SKIP_AUTOINSTALL` can be set to a truthy value to skip the auto-install of `prisma` CLI and `@prisma/client` dependencies (if they are missing), if the `prisma-client-js` generator is defined in the Prisma Schema, when using the `prisma generate` command.

PRISMA_SKIP_POSTINSTALL_GENERATE [#prisma_skip_postinstall_generate]

> [!CAUTION]
> Prisma v7 deprecation
> 
> This environment variable is only supported in Prisma 6.19 and earlier. It will not work in Prisma v7.

`PRISMA_SKIP_POSTINSTALL_GENERATE` can be set to a truthy value to skip the auto-generation of Prisma Client when its `postinstall` hook is triggered by a package manager. The `postinstall` hook of the `@prisma/client` package is triggered when the package is installed, or its version is updated.

PRISMA_DISABLE_WARNINGS [#prisma_disable_warnings]

Disables all CLI warnings generated by `logger.warn`.

PRISMA_GENERATE_NO_ENGINE [#prisma_generate_no_engine]

> [!CAUTION]
> Prisma v7 deprecation
> 
> This environment variable is only supported in Prisma 6.19 and earlier. It will not work in Prisma v7.

> [!NOTE]
> This environment variable is available since version `5.2.0`

`PRISMA_GENERATE_NO_ENGINE` can be set to a truthy value to generate a Prisma Client without an included [query engine](/orm/v6/more/internals/engines) in order to reduce deployed application size when paired with [Prisma Accelerate](/accelerate).

PRISMA_SCHEMA_DISABLE_ADVISORY_LOCK [#prisma_schema_disable_advisory_lock]

> [!NOTE]
> This environment variable is available since version `5.3.0`

`PRISMA_SCHEMA_DISABLE_ADVISORY_LOCK` can be set to a truthy value to disable the [advisory locking](/orm/v6/prisma-migrate/workflows/development-and-production#advisory-locking) used by Prisma Migrate. This might be needed, depending on the database configuration, for example, for a Percona-XtraDB-Cluster or MariaDB Galera Cluster.

Proxy environment variables [#proxy-environment-variables]

The Prisma CLI supports custom HTTP(S) proxies to download the Prisma engines. These can be helpful to use when working behind a corporate firewall. See [Using a HTTP proxy for the CLI](/orm/v6/reference/prisma-cli-reference#using-a-http-proxy-for-the-cli) for more information.

NO_PROXY [#no_proxy]

`NO_PROXY` is a comma-separated list of hostnames or IP addresses that do not require a proxy.

```text
NO_PROXY=myhostname.com,10.11.12.0/16,172.30.0.0/16
```

HTTP_PROXY [#http_proxy]

`HTTP_PROXY` is set with the hostname or IP address of a proxy server.

```text
HTTP_PROXY=http://proxy.example.com
```

HTTPS_PROXY [#https_proxy]

`HTTPS_PROXY` is set with the hostname or IP address of a proxy server.

```text
HTTPS_PROXY=https://proxy.example.com
```

Engine environment variables [#engine-environment-variables]

Configuring Query Engine Type [#configuring-query-engine-type]

PRISMA_CLI_QUERY_ENGINE_TYPE [#prisma_cli_query_engine_type]

> [!CAUTION]
> Removed in Prisma v7
> 
> This environment variable is only supported in Prisma 6.19 and earlier. It will not work in Prisma v7.

`PRISMA_CLI_QUERY_ENGINE_TYPE` is used to [define the query engine type Prisma CLI downloads and uses](/orm/v6/more/internals/engines#configuring-the-query-engine). Defaults to `library`, but can be set to `binary`:

```text
PRISMA_CLI_QUERY_ENGINE_TYPE=binary
```

PRISMA_CLIENT_ENGINE_TYPE [#prisma_client_engine_type]

> [!CAUTION]
> Removed in Prisma v7
> 
> This environment variable is only supported in Prisma 6.19 and earlier. It will not work in Prisma v7.

`PRISMA_CLIENT_ENGINE_TYPE` is used to [define the query engine type Prisma Client downloads and uses](/orm/v6/more/internals/engines#configuring-the-query-engine). Defaults to `library`, but can be set to `binary`:

```text
PRISMA_CLIENT_ENGINE_TYPE=binary
```

Note: You need to generate your Prisma Client after setting this variable for the configuration to take effect and the libraries to be downloaded. Otherwise, Prisma Client will be missing the appropriate query engine library and you will *have to* define their location using [`PRISMA_QUERY_ENGINE_LIBRARY`](#prisma_query_engine_library).

It is the environment variable equivalent for the [`engineType` property of the `generator` block](/orm/v6/more/internals/engines#configuring-the-query-engine) which enables you to define the same setting in your Prisma Schema.

Downloading Engines [#downloading-engines]

PRISMA_ENGINES_MIRROR [#prisma_engines_mirror]

`PRISMA_ENGINES_MIRROR` can be used to specify a custom CDN (or server) endpoint to download the engines files for the CLI/Client. The default value is `https://binaries.prisma.sh`, where Prisma hosts the engine files.

```text
PRISMA_ENGINES_MIRROR=https://example.org/custom-engines/
```

See [Prisma engines](/orm/v6/more/internals/engines#hosting-engines) for a conceptual overview of how to use this environment variable.

Note: This environment variable used to be available as `PRISMA_BINARIES_MIRROR`, which was deprecated in Prisma ORM 3.0.1. It is discouraged to use anymore and will be removed in the future.

PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING [#prisma_engines_checksum_ignore_missing]

> [!NOTE]
> This environment variable is available since version `4.16.0`

`PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING` can be set to a truthy value to ignore problems around downloading & verifying the integrity (via a checksum file) of the Prisma ORM engines.
This is particularly useful when deploying to an offline system environment where the checksum file cannot be downloaded.

```text
PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING=1
```

Note: we might change the overall download behavior in a future release in a way that this environment variable will not be needed anymore in a offline environment case.

Custom engine file locations [#custom-engine-file-locations]

By default, all engine files are downloaded when you install Prisma CLI, copied when generating Prisma Client, and put into known locations. There are however situations where you may want to use a custom engine file from custom locations:

PRISMA_QUERY_ENGINE_BINARY [#prisma_query_engine_binary]

> [!CAUTION]
> Prisma v7 Deprecation
> 
> This environment variable is only supported in Prisma 6.19 and earlier. It will not work in Prisma v7.

`PRISMA_QUERY_ENGINE_BINARY` is used to set a custom location for your own query engine binary.

```text
PRISMA_QUERY_ENGINE_BINARY=custom/query-engine-<target>
# Example: ./prisma/binaries/query-engine-linux-arm64-openssl-1.0.x
```

For Prisma CLI it allows you to define the query engine file to be used.\
For Prisma Client, on build time (during `prisma generate`), it defines where the query engine file will be copied from into Prisma Client. At run time (when using the generated Client) it can be used to define the specific query engine file to be used instead of the included one.

Note: This can only have an effect if the engine type of CLI or Client are set to `binary`. If the engine type is `library` (the default), use PRISMA\_QUERY\_ENGINE\_LIBRARY instead.

PRISMA_QUERY_ENGINE_LIBRARY [#prisma_query_engine_library]

> [!CAUTION]
> Prisma v7 Deprecation
> 
> This environment variable is only supported in Prisma 6.19 and earlier. It will not work in Prisma v7.

`PRISMA_QUERY_ENGINE_LIBRARY` is used to set a custom location for your own query engine library.

```text
PRISMA_QUERY_ENGINE_LIBRARY=custom/libquery_engine-<target>.so.node
# Example: ./prisma/binaries/libquery_engine-linux-arm64-openssl-1.0.x.so.node
```

For Prisma CLI it allows you to define the query engine file to be used.\
For Prisma Client, on build time (during `prisma generate`), it defines where the query engine file will be copied from into Prisma Client. At run time (when using the generated Client) it can be used to define the specific query engine file to be used instead of the included one.

Note: This can only have an effect if the engine type of CLI or Client are set to `library` (the default)

PRISMA_SCHEMA_ENGINE_BINARY [#prisma_schema_engine_binary]

`PRISMA_SCHEMA_ENGINE_BINARY` is used to set a custom location for your Schema engine binary.

```text
PRISMA_SCHEMA_ENGINE_BINARY=custom/my-schema-engine-unix
```

PRISMA_MIGRATION_ENGINE_BINARY [#prisma_migration_engine_binary]

> [!WARNING]
> **Deprecated**: `PRISMA_MIGRATION_ENGINE_BINARY` variable is deprecated in [5.0.0](https://github.com/prisma/prisma/releases/tag/5.0.0) because Migration engine was renamed to Schema Engine.

`PRISMA_MIGRATION_ENGINE_BINARY` is used to set a custom location for your own migration engine binary.

```text
PRISMA_MIGRATION_ENGINE_BINARY=custom/my-migration-engine-unix
```

PRISMA_INTROSPECTION_ENGINE_BINARY [#prisma_introspection_engine_binary]

> [!CAUTION]
> Removed in Prisma v7
> 
> This environment variable is only supported in Prisma 6.19 and earlier. It will not work in Prisma v7.

`PRISMA_INTROSPECTION_ENGINE_BINARY` is used to set a custom location for your own introspection engine binary.

```text
PRISMA_INTROSPECTION_ENGINE_BINARY=custom/my-introspection-engine-unix
```

> [!WARNING]
> The Introspection Engine is served by the Migration Engine from [4.9.0](https://github.com/prisma/prisma/releases/tag/4.9.0). Therefore, the `PRISMA_INTROSPECTION_ENGINE` environment variable will not be used.

PRISMA_FMT_BINARY [#prisma_fmt_binary]

> [!CAUTION]
> This functionality has been removed in Prisma CLI version 4.10.0. It only works in earlier versions.

`PRISMA_FMT_BINARY` is used to set a custom location for your own format engine binary.

```text
PRISMA_FMT_BINARY=custom/my-custom-format-engine-unix
```

> [!WARNING]
> The `PRISMA_FMT_BINARY` variable is used in versions [4.2.0](https://github.com/prisma/prisma/releases/tag/4.2.0) or lower.

CLI Binary Targets [#cli-binary-targets]

PRISMA_CLI_BINARY_TARGETS [#prisma_cli_binary_targets]

> [!CAUTION]
> Prisma v7 Deprecation
> 
> This environment variable is only supported in Prisma 6.19 and earlier. It will not work in Prisma v7.

`PRISMA_CLI_BINARY_TARGETS` can be used to specify one or more binary targets that Prisma CLI will download during installation (so it must be provided during `npm install` of Prisma CLI and does not affect runtime of Prisma CLI or Prisma Client).

Use `PRISMA_CLI_BINARY_TARGETS` if you 1) deploy to a specific platform via an upload of a local project that includes dependencies, and 2) your local environment is different from the target (e.g. AWS Lambda with Node.js 20+ is `rhel-openssl-3.0.x`, and your local environment might be macOS arm64 `darwin-arm64`). Using the `PRISMA_CLI_BINARY_TARGETS` environment variable ensures that the target engine files are also downloaded.

```bash
PRISMA_CLI_BINARY_TARGETS=darwin-arm64,rhel-openssl-3.0.x npm install
```

This is the Prisma CLI equivalent for the [`binaryTargets` property of the `generator` block](/orm/v6/prisma-schema/overview/generators#binary-targets), which enables you to define the same setting for Prisma Client.

> [!NOTE]
> Note
> 
> For Node.js versions earlier than 20, the openssl version was 1.0.x instead of 3.0.x. This is most obvious in AWS Lambda deployments, where the binary target would be `rhel-openssl-1.0.x` instead of `rhel-openssl-3.0.x`.

## Related pages

- [`Connection URLs`](https://www.prisma.io/docs/orm/v6/reference/connection-urls): Learn about the format and syntax Prisma ORM uses for defining database connection URLs for PostgreSQL, MySQL and SQLite.
- [`Database features matrix`](https://www.prisma.io/docs/orm/v6/reference/database-features): Learn which database features are supported in Prisma ORM and how they map to the different Prisma ORM tools.
- [`Error message reference`](https://www.prisma.io/docs/orm/v6/reference/error-reference): Prisma Client, Migrate, Introspection error message reference
- [`Preview features`](https://www.prisma.io/docs/orm/v6/reference/preview-features): Previews are typically available behind a feature flag or require some form of opt-in.
- [`Prisma CLI reference`](https://www.prisma.io/docs/orm/v6/reference/prisma-cli-reference): This page gives an overview of all available Prisma CLI commands, explains their options and shows numerous usage examples.