Skip to main content
DVC uses a hierarchical configuration system to manage project settings, remote storage, and various options. This guide explains the different configuration files and how they work together.

Configuration Files

DVC supports multiple configuration levels that shadow each other in a specific order:

System Config

System-wide settings for all users

Global Config

User-specific settings across all projects

Project Config

Repository-specific settings in .dvc/config

Local Config

Local overrides in .dvc/config.local (git-ignored)

Configuration Hierarchy

Configurations are merged in the following order (later levels override earlier ones):
  1. System (/etc/xdg/dvc/config on Linux)
  2. Global (~/.config/dvc/config on Linux)
  3. Project (.dvc/config - tracked by Git)
  4. Local (.dvc/config.local - not tracked by Git)
The local config file is git-ignored by default, making it perfect for storing sensitive information like access keys or user-specific paths.

DVC File Types

DVC uses several file types to manage your data and pipelines:

.dvc Files

.dvc files are single-stage files that track data files and directories. They contain metadata about:
  • File paths
  • MD5 checksums
  • Dependencies
  • Outputs

dvc.yaml

dvc.yaml is a multi-stage pipeline file that defines:
  • Pipeline stages and their commands
  • Dependencies between stages
  • Parameters and metrics
  • Plots and artifacts

dvc.lock

dvc.lock is automatically generated to lock the state of your pipeline, including:
  • Exact checksums of all dependencies and outputs
  • Parameter values used
  • Command that was run
Don’t edit dvc.lock manually. It’s automatically managed by DVC to ensure reproducibility.

Configuration Sections

DVC configuration files use INI format with the following main sections:

core

General DVC behavior settings:
string
Default remote storage to use for dvc push/dvc pull
boolean
default:"false"
Automatically stage changes to DVC files with Git
boolean
default:"true"
Check for DVC updates
boolean
default:"true"
Send anonymous usage analytics

cache

Local cache configuration:
string
Location of the cache directory (default: .dvc/cache)
string
Link type for cache: reflink, hardlink, symlink, or copy
string
Make cache group-writable (group)

remote

Remote storage configurations. See Remote Configuration for details.

state

The state section is deprecated and no longer used in recent DVC versions.

Working with Configuration

View Configuration

List all configuration values:
Show configuration with file origins:

Set Configuration

Set a project-level configuration:
Set a global configuration:
Set a local (git-ignored) configuration:

Unset Configuration

Remove a configuration value:

Configuration Format

DVC configuration files use the INI format with special handling for named sections:
Named sections like remote and machine use double quotes in their section names to support spaces and special characters.

Best Practices

Store sensitive credentials in .dvc/config.local which is git-ignored:
Configure the default remote in .dvc/config (tracked by Git):
This ensures all team members use the same default remote.
For local remotes, use relative paths to make the configuration portable:
Use descriptive names for different storage purposes:

Next Steps

DVC Files

Deep dive into .dvc and dvc.yaml file formats

Remote Config

Configure remote storage for your data