---
title: Turborepo Remote Cache
description: Host your Turborepo remote cache on Cloudflare, AWS Lambda, Vercel, Netlify, or Node.js. You need no Vercel account.
mode: custom
sidebar:
    hidden: true
---

<HomeHero>

# 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](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/AdiRishi/turborepo-remote-cache-cloudflare) [Read the docs](/turborepo-remote-cache-cloudflare/introduction)

</HomeHero>

<CacheReplay />

<HomeSection>

## 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](https://files-sdk.dev) 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.

</HomeSection>

<HomeSection>

## See the time your cache saves

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

</HomeSection>

<DashboardPreview />

<HomeSection>

## Set it up

1. **Deploy the Worker**

    The [Deploy to Cloudflare](https://deploy.workers.cloudflare.com/?url=https://github.com/AdiRishi/turborepo-remote-cache-cloudflare) button copies this repository to your GitHub or GitLab account and deploys it with an R2 bucket. You can also [deploy with Wrangler](/turborepo-remote-cache-cloudflare/deploy/cloudflare).

2. **Set a token**

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

    ```sh
    openssl rand -hex 32
    ```

3. **Point turbo at the Worker**

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

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

4. **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](/turborepo-remote-cache-cloudflare/get-started) has every step. [Connect turbo](/turborepo-remote-cache-cloudflare/connect-turbo) sets up your team and CI, and [Sign artifacts](/turborepo-remote-cache-cloudflare/sign-artifacts) explains the signature key.

</HomeSection>

<HomeSection>

## 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](/turborepo-remote-cache-cloudflare/deploy) compares their artifact size limits.

### Platforms

- [Cloudflare Workers](/turborepo-remote-cache-cloudflare/deploy/cloudflare)
- [Node.js, Bun, and Deno](/turborepo-remote-cache-cloudflare/deploy/node)
- [Vercel](/turborepo-remote-cache-cloudflare/deploy/vercel)
- [Netlify](/turborepo-remote-cache-cloudflare/deploy/netlify)
- [AWS Lambda](/turborepo-remote-cache-cloudflare/deploy/aws-lambda)

### Storage

- [Cloudflare R2](/turborepo-remote-cache-cloudflare/storage/r2)
- [Cloudflare KV](/turborepo-remote-cache-cloudflare/storage/kv)
- [S3-compatible storage](/turborepo-remote-cache-cloudflare/storage/s3)
- [A custom Files SDK adapter](/turborepo-remote-cache-cloudflare/storage/custom-adapter)

</HomeSection>
