Set up a Bazel remote cache backed by a gRPC or HTTP server

domain: bazel.build · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Choose a cache backend: bazel-remote (open source, supports both HTTP and gRPC) is a common self-hosted option; managed alternatives include BuildBuddy and Engflow which expose grpcs:// endpoints
  2. Run bazel-remote with a data directory and cache size limit: bazel-remote --dir /data/bazel-cache --max_size 50 --grpc_address 0.0.0.0:9092 --http_address 0.0.0.0:8080
  3. Add remote cache flags to your .bazelrc: build --remote_cache=grpc://CACHE_HOST:9092 (or http://CACHE_HOST:8080 for HTTP); use grpcs:// and supply --tls_certificate for TLS
  4. To allow the cache to be populated by CI and read by local dev, add build --remote_upload_local_results=true in CI and build --noremote_upload_local_results in developer .bazelrc.user to make CI the source of truth
  5. Add build --remote_timeout=30 and build --remote_retries=3 to handle transient network failures gracefully without breaking local builds
  6. Verify cache hits by running bazel build //... --execution_log_json_file=/tmp/exec.log and checking the remoteCacheHit field in the log entries

Known gotchas

Related routes

Configure Turborepo remote caching with Vercel and a self-hosted cache server
turborepo.dev · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans