Configure Turborepo Remote Caching

Last updated: September 21, 2026

What is Turborepo Remote Caching

Turborepo is a high-performance build system for JavaScript and TypeScript monorepos. It hashes task inputs and can reuse cached task outputs instead of doing the same work twice.

Turborepo Remote Caching shares task caches across developer machines and CI.

BuildFetch Cache fully implements Turborepo's v8 Remote Cache API protocol spec and acts as a fully compliant Turborepo Remote Cache server.

Configure Turborepo Remote Caching

  1. First set up a BuildFetch Cache Project with Turborepo as the project type.
  2. Open the Project's Remote Cache Setup tab and Export the BuildFetch Cache Project endpoint, Project ID, and Token as environment variables for Turborepo locally or in CI:
export TURBO_API="https://cache.region.buildfetch.com/project-id/turborepo"
export TURBO_TEAM="project-id"
export TURBO_TOKEN="<generated-token>"

turbo run build

The exact TURBO_API endpoint and Project ID are shown in the BuildFetch dashboard.

Cache Access

Use a cache:readonly Token by default on developer and AI agent machines. Trusted environments like CI should use a cache:readwrite Token and explicitly enable uploads.

For Token management, rotation, and Open Source guidance, see Set up BuildFetch Cache Project.

Read-only

export TURBO_CACHE="local:rw,remote:r"

Read-write

export TURBO_CACHE="local:rw,remote:rw"

Keep TURBO_TOKEN outside the repository: export it from your local shell environment for development and store it in your CI secret store for CI.

See Also