This is a cache-backend swap. Nx still computes the task hash from the same targets, inputs, outputs, and named inputs, so your task graph does not need to move. The change is removing the deprecated bucket plugin and pointing Nx at a server that implements its self-hosted remote cache API.
1. Upgrade every Nx runner to version 20.8 or later
Nx introduced its OpenAPI self-hosted cache support in version 20.8. Upgrade local development, CI, and any release runners before removing the Powerpack package. Complete the normal Nx migration review first; the cache-backend swap itself does not require changing task inputs or outputs.
2. Remove the deprecated package and bucket configuration
npm uninstall @nx/s3-cache
# or @nx/gcs-cache, @nx/azure-cache, @nx/shared-fs-cache
Delete the matching cache block from nx.json, remove its bucket credentials from CI and developer environments, then revoke those credentials. Do not leave an unused writer key active as a fallback.
3. Configure the supported Nx remote cache API
NX_SELF_HOSTED_REMOTE_CACHE_SERVER=https://remote.cachely.dev
NX_SELF_HOSTED_REMOTE_CACHE_ACCESS_TOKEN=<your-token>
Use a read-write token only on protected branches. Pull requests and forks should receive a read-only token, so they can restore trusted artifacts but cannot publish a cache entry that a later privileged build will consume.
4. Verify the migration before removing the rollback window
- Run one cacheable target from a clean checkout and confirm it uploads to the new backend.
- Run the same target again from another clean environment and confirm Nx restores it from the remote cache.
- Run an untrusted workflow with the read-only token and confirm reads work while writes are rejected.
- If the backend is unavailable, disable remote caching temporarily rather than restoring a deprecated read-write bucket plugin.
Primary sources: Nx's deprecated self-hosted cache package notice, Nx's self-hosted remote cache guide, and CVE-2025-36852. For S3-compatible endpoints and the old plugin shape, see the Nx S3 cache migration guide.