{"id":14164,"library":"turborepo-remote-cache","title":"Turborepo Remote Cache Server","description":"turborepo-remote-cache provides a self-hosted, open-source alternative to Vercel's official Turborepo remote cache service, allowing teams to manage their monorepo build artifact caching infrastructure in private environments. It supports a variety of storage providers, including S3, Google Cloud Storage, and Azure Blob Storage, and offers flexible deployment options such as Docker, Kubernetes, and serverless platforms. The project is actively maintained, currently at version 2.8.4 (April 2026), with a consistent release cadence that primarily focuses on dependency updates, security patches (e.g., Fastify bumps), and incremental feature enhancements. Its key differentiators include the flexibility to choose a storage backend, comprehensive deployment guides, and empowering organizations with full control over their build caching strategy, which is critical for compliance or specific infrastructure requirements. It requires Node.js version 20 or higher.","status":"active","version":"2.8.4","language":"javascript","source_language":"en","source_url":"https://github.com/ducktors/turborepo-remote-cache","tags":["javascript","turborepo","monorepo","remote","cache"],"install":[{"cmd":"npm install turborepo-remote-cache","lang":"bash","label":"npm"},{"cmd":"yarn add turborepo-remote-cache","lang":"bash","label":"yarn"},{"cmd":"pnpm add turborepo-remote-cache","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core web framework for the HTTP server.","package":"fastify","optional":false},{"reason":"Used for JSON schema validation within the Fastify framework.","package":"ajv","optional":false}],"imports":[{"note":"The `start` function is the programmatic entry point for the server. The package is primarily designed for ESM usage, reflecting its Node.js >=20.0.0 requirement.","wrong":"const { start } = require('turborepo-remote-cache');","symbol":"start","correct":"import { start } from 'turborepo-remote-cache';"},{"note":"For TypeScript users, import the `Options` interface to type the configuration object passed to the `start` function.","symbol":"Options","correct":"import type { Options } from 'turborepo-remote-cache';"},{"note":"While not the most common usage, this imports all named exports if you prefer to namespace them. There is no default export.","wrong":"import TurborepoCache from 'turborepo-remote-cache';","symbol":"* as TurborepoCache","correct":"import * as TurborepoCache from 'turborepo-remote-cache';"}],"quickstart":{"code":"import { start } from 'turborepo-remote-cache';\n\n// Configure environment variables for a basic S3-backed cache\nprocess.env.STORAGE_PROVIDER = 's3';\nprocess.env.S3_BUCKET = process.env.AWS_BUCKET_NAME ?? 'your-turbocache-bucket';\nprocess.env.S3_REGION = process.env.AWS_REGION ?? 'us-east-1';\nprocess.env.S3_ACCESS_KEY_ID = process.env.AWS_ACCESS_KEY_ID ?? ''; // Ensure these are set in your env\nprocess.env.S3_SECRET_ACCESS_KEY = process.env.AWS_SECRET_ACCESS_KEY ?? ''; // Ensure these are set in your env\nprocess.env.AUTH_TOKEN = process.env.TURBO_AUTH_TOKEN ?? 'supersecrettoken'; // Crucial for security\nprocess.env.PORT = process.env.PORT ?? '3000';\nprocess.env.HOST = process.env.HOST ?? '0.0.0.0'; // Default host for wider accessibility\n\nasync function runCacheServer() {\n  try {\n    const { url } = await start();\n    console.log(`Turborepo Remote Cache server listening at ${url}`);\n  } catch (err) {\n    console.error('Failed to start Turborepo Remote Cache server:', err);\n    process.exit(1);\n  }\n}\n\nrunCacheServer();","lang":"typescript","description":"This quickstart demonstrates how to programmatically start the Turborepo remote cache server using TypeScript, configured for an S3 storage backend with authentication."},"warnings":[{"fix":"Ensure your environment uses Node.js v20.0.0 or higher. For new deployments, consider using Node.js v24 for optimal compatibility as indicated by the project.","message":"The minimum Node.js version requirement was raised to `20.0.0`. Running on older Node.js versions (e.g., 18.x) may lead to unexpected behavior or failures. Recent releases (v2.8.3) default to Node.js 24 for container deployments.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Explicitly set the `HOST` environment variable (e.g., `HOST=127.0.0.1`) if you only want the server to listen on a specific interface, or ensure proper firewall rules are in place.","message":"The default `HOST` environment variable changed to `0.0.0.0` in v2.8.0. While this improves accessibility in containerized environments, it might expose the server to all network interfaces if not intended or secured properly, especially in non-containerized setups.","severity":"gotcha","affected_versions":">=2.8.0"},{"fix":"Always set a strong `AUTH_TOKEN` in production environments. Avoid `AUTH_MODE=none` unless you are operating within a completely trusted and isolated network segment, or implementing external authentication.","message":"For secure operation, it is critical to set the `AUTH_TOKEN` environment variable. If `AUTH_TOKEN` is not set, or if `AUTH_MODE=none` (introduced in v2.7.0) is explicitly used, the cache will be publicly accessible without authentication, posing a significant security risk for sensitive artifacts.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Monitor the project's changelog for each new minor/patch release. Test upgrades in a staging environment before deploying to production, especially if you rely on specific `fastify` features or plugins.","message":"Regular dependency bumps, especially for `fastify` and `ajv`, are common. While these often include security patches and performance improvements, they can occasionally introduce subtle behavioral changes or new requirements for plugins, which could impact highly customized deployments.","severity":"gotcha","affected_versions":">=2.0.0"}],"env_vars":null,"search_vec":"'2.8.4':75 '20':136 '2026':77 'activ':70 'allow':26 'altern':17 'april':76 'artifact':33 'azur':52 'backend':108 'blob':53 'build':32,120 'bump':93 'cach':3,8,24,34,121,143 'cadenc':82 'choos':105 'cloud':49 'complianc':127 'comprehens':109 'consist':80 'control':117 'critic':125 'current':72 'depend':87 'deploy':58,110 'differenti':100 'docker':62 'e.g':91 'empow':113 'enhanc':97 'environ':38 'fastifi':92 'featur':96 'flexibl':57,103 'focus':85 'full':116 'googl':48 'guid':111 'higher':138 'host':13 'includ':46,101 'increment':95 'infrastructur':35,130 'javascript':139 'key':99 'kubernet':63 'maintain':71 'manag':29 'monorepo':31,141 'node.js':134 'offer':56 'offici':21 'open':15 'open-sourc':14 'option':59 'organ':114 'patch':90 'platform':66 'primarili':84 'privat':37 'project':68 'provid':9,45 'releas':81 'remot':2,7,23,142 'requir':131,133 's3':47 'secur':89 'self':12 'self-host':11 'server':4 'serverless':65 'servic':25 'sourc':16 'specif':129 'storag':44,50,54,107 'strategi':122 'support':40 'team':27 'turborepo':1,6,22,140 'turborepo-remote-cach':5 'updat':88 'varieti':42 'vercel':19 'version':74,135","created_at":"2026-04-20T01:58:16.071914+00:00","updated_at":"2026-04-20T01:58:16.071914+00:00","problems":[{"fix":"Ensure the `AUTH_TOKEN` environment variable on your `turborepo-remote-cache` server matches the `REMOTE_CACHE_TOKEN` configured in your Turborepo client's `.env.local` or `turbo.json`.","cause":"The `AUTH_TOKEN` environment variable is either not set on the server, or the client is not providing the correct token in its requests.","error":"HTTP 401 Unauthorized"},{"fix":"Change the port by setting the `PORT` environment variable (e.g., `PORT=4000`) for the `turborepo-remote-cache` server, or terminate the conflicting process.","cause":"Another process is already listening on the port that `turborepo-remote-cache` is trying to use (default 3000).","error":"Error: listen EADDRINUSE: address already in use :::3000"},{"fix":"Refer to the documentation for your chosen `STORAGE_PROVIDER` (e.g., S3, GCS) and ensure all necessary environment variables (e.g., `S3_BUCKET`, `S3_REGION`, `S3_ACCESS_KEY_ID`, `S3_SECRET_ACCESS_KEY`) are correctly set.","cause":"Required environment variables for the selected storage provider (e.g., S3, GCS, Azure) are not configured, preventing the server from connecting to the backend storage.","error":"Error: Missing environment variable for storage provider: S3_BUCKET is not set."}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/ducktors/turborepo-remote-cache","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/turborepo-remote-cache","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops","aws","gcp","azure","web-framework"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-18","install_tag":null}}