Configuration Structure
A NativeLink configuration file has five top-level sections:Configuration files use JSON5 format, which supports comments, trailing commas, and unquoted keys.
Stores
Stores define how NativeLink stores data. Each store has a unique name and type.Store Types
filesystem: Local disk storagememory: In-memory storageredis_store: Redis backendexperimental_cloud_object_store: S3/GCS/Azure storagegrpc: Remote gRPC storefast_slow: Tiered caching (fast + slow)compression: Compressed storage wrapperdedup: Deduplication wrapperverify: Verification wrappercompleteness_checking: AC completeness checkingexistence_cache: Existence caching wrapper
Filesystem Store
Local disk storage with LRU eviction:content_path: Directory for storing contenttemp_path: Directory for temporary fileseviction_policy.max_bytes: Maximum storage size in bytes
Memory Store
In-memory storage for hot data:Fast-Slow Store
Two-tier caching with fast and slow backends:fast: Fast storage tier (usually filesystem or memory)slow: Slow storage tier (usually remote or cloud)fast_direction: When to use fast tier (“get”, “put”, “both”)
Cloud Object Store
S3, GCS, or Azure Blob Storage:provider: “aws”, “gcs”, or “azure”region: Cloud provider region (AWS only)bucket: Bucket/container namekey_prefix: Optional prefix for all keysretry.max_retries: Maximum retry attemptsretry.delay: Initial delay in secondsretry.jitter: Jitter factor (0-1)
Redis Store
Redis backend for distributed caching:gRPC Store
Remote store accessed via gRPC:Compression Store
Wrapper that compresses data:lz4: Fast compression (default)zstd: Better compression ratio, configurable level (1-22)
Dedup Store
Content deduplication with separate index and content stores:Workers
Workers execute build actions.Local Worker
worker_api_endpoint.uri: Scheduler endpointcas_fast_slow_store: Store name for CAS dataupload_action_result.ac_store: Store name for action cachework_directory: Working directory for buildsplatform_properties: Worker capabilitiesadditional_environment: Environment variables for actions
Platform Properties
Platform properties define worker capabilities:| Property | Type | Description |
|---|---|---|
cpu_count | minimum | Number of CPU cores |
memory_kb | minimum | Memory in KB |
OSFamily | priority | Operating system (linux, darwin, windows) |
ISA | exact | Instruction set (x86-64, aarch64) |
container-image | priority | Docker image support |
gpu_count | minimum | Number of GPUs |
gpu_model | exact | GPU model |
exact: Must match exactlypriority: Prefer matches, allow fallbackminimum: Worker must meet or exceed valueignore: Ignored by scheduler
Schedulers
Schedulers assign work to workers.Simple Scheduler
supported_platform_properties: Map of property to matching type
Servers
Servers expose gRPC services.Public Server
Serves client requests (CAS, AC, Execution):Private Server
Serves worker API (backend only):Available Services
| Service | Purpose | Port Convention |
|---|---|---|
cas | Content Addressable Storage | 50051 |
ac | Action Cache | 50051 |
execution | Remote Execution API | 50052 |
capabilities | Server capabilities | 50051 |
bytestream | ByteStream API | 50051 |
worker_api | Worker registration | 50061 |
admin | Admin operations | 50061 |
health | Health checks | 50061 |
fetch | Fetch API | 50051 |
push | Push API | 50051 |
TLS Configuration
Enable TLS for secure communication:Global Settings
Global configuration options:max_open_files: Maximum number of open file descriptors
Environment Variables
Configuration files support environment variable substitution:${VAR}: Required variable (fails if not set)${VAR:-default}: Optional variable with default value
Complete Example
Validation
Validate your configuration before deploying:For more configuration examples, see the nativelink-config/examples directory.