Skip to content
Esc
↑↓navigate↵open⌘Jpreview

A Turborepo remote cache you host yourself

Deploy it to Cloudflare Workers with one button, or run the same server on AWS Lambda, Vercel, Netlify, Node.js, Bun, or Deno. Artifacts stay in R2, Workers KV, or any S3-compatible bucket, and a dashboard shows the build time your cache saves.

Deploy to Cloudflare Read the docs

A laptop runs turbo run build. Three tasks miss the cache, run, and upload their outputs to the Worker, which stores them in R2. A CI runner then runs the same command, downloads all three artifacts, and finishes in 1.2 seconds with FULL TURBO. Then the loop starts over.

Why host your own cache

  • No Vercel account. turbo talks to your server through the official Remote Cache API, with no plugin, no fork, and no turbo login.
  • Free to start on Cloudflare. The Workers free plan includes 100,000 requests a day, and R2 stores 10 GB a month for free. R2 charges nothing for egress, so cache downloads cost no bandwidth.
  • Your choice of storage. Keep artifacts in R2, Workers KV, any S3-compatible bucket, or anything with a Files SDK adapter.
  • Signed artifacts. The server stores each artifact’s signature and returns it unchanged, so turbo can reject any artifact that your own machines didn’t sign.

See the time your cache saves

Every server shows this dashboard at its root. This copy uses sample data. Try the controls.

The dashboard a server shows at its root, filled with example data: time saved, hit rates, time saved per day, and the busiest teams. Pick a range to see it change.
turborepo-remote-cache.acme.workers.dev

Set it up

Deploy the Worker

The Deploy to Cloudflare button copies this repository to your GitHub or GitLab account and deploys it with an R2 bucket. You can also deploy with Wrangler.

Set a token

Generate a long random token and add it to the Worker as a secret named TURBO_TOKEN.

openssl rand -hex 32

Point turbo at the Worker

Add the Worker to your root turbo.json, and give every machine the token as TURBO_TOKEN.

{
    "remoteCache": {
        "apiUrl": "https://turborepo-remote-cache.<your-subdomain>.workers.dev",
        "teamSlug": "my-team"
    }
}

Sign your artifacts

This step is optional, and we recommend it. Turn on remoteCache.signature and give every machine the same TURBO_REMOTE_CACHE_SIGNATURE_KEY. turbo then rejects any artifact your own machines didn’t sign, even one uploaded with a valid token.

Get started has every step. Connect turbo sets up your team and CI, and Sign artifacts explains the signature key.

Deploy to the platform you already use

The same server builds for six other platforms and stores artifacts in the storage you choose. Choose a platform compares their artifact size limits.