Skip to main content
Set up remote caching for Buck2. nsc cache buck2 setup generates a Buck2 configuration for Remote Execution API storage. Use --config to write the configuration to a file and --storage to choose read-only or read-write access.

Usage

Example

Generate a Buck2 configuration for remote caching:

Options

—config string

Write the generated Buck2 configuration to this path. No path is set by default.

—key string

Stable identifier that disambiguates parallel execution or storage clusters. Defaults to default. Use a distinct key for a separate cluster.

-o, —output string

Output format, either plain or json. Defaults to plain.

—static

Authenticate with a static bearer token instead of an mTLS client certificate. This is a boolean flag.

—static_token_duration duration

The minimum duration of the configured static token. Requires --static. Defaults to 4h0m0s (4 hours).

—storage string

Storage access mode, either read-only or read-write. Defaults to read-write.

—token string

Use the bearer token stored at this path for authentication. Implies --static. No token path is set by default.
Last modified on October 26, 2026