> **⚠️ `@nx/gcs-cache` is deprecated.**
>
> `@nx/gcs-cache` provides a Google Cloud Storage-backed remote cache for Nx. The CREEP vulnerability ([CVE-2025-36852](https://www.cve.org/CVERecord?id=CVE-2025-36852)) affects this package. The flaw is in its design and cannot be patched. The package stays on npm so existing builds don't break for now. It will not receive updates or security patches, and may be removed in the future.
>
> See the [deprecation notice](https://nx.dev/docs/reference/deprecated/self-hosted-cache-packages) for migration paths.

---

# [@nx/gcs-cache](https://nx.dev/nx-api/gcs-cache)

This plugin provides a Nx cache which can be self hosted on [Google Cloud Storage](https://cloud.google.com/storage).

## Usage

Use of this package is governed by the following [LICENSE](https://cloud.nx.app/terms/self-hosted-cache/2025-03-05). Please be sure to read through the license carefully before using this plugin.
This license is also included in the package in a `LICENSE` file.

## Use Cases

This plugin is useful when [Nx Cloud](https://nx.dev/nx-cloud) is not a viable solution.
Nx Cloud is the ideal recommended method of sharing a cache between multiple machines using Nx.

This plugin uploads and downloads artifacts and metadata to and from a Google Cloud Storage bucket of your choice. This
allows Nx to run
faster in CI environments by reusing computation done in other runs.

## Configuration

This cache can be configured in an `gcs` property in `nx.json`. The following properties are configurable:

| Property    | Description                                                                                                 | Default      | Required |
| ----------- | ----------------------------------------------------------------------------------------------------------- | ------------ | -------- |
| `bucket`    | The name of th Google Cloud Storage bucket to use for the cache.                                            | N/a          | Yes      |
| `endpoint`  | The endpoint where Google Cloud Storage an be reached.<br/>(only use if not using the default GCS endpoint) | N/a          | No       |
| `localMode` | The mode that the cache behaves as during local development: `read`, `read-write`, `no-cache`               | 'read-write' | No       |
| `ciMode`    | The mode that the cache behaves as during CI runs: `read`, `read-write`, `no-cache`                         | 'read-write' | No       |
