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/configLocal Config
Local overrides in
.dvc/config.local (git-ignored)Configuration Hierarchy
Configurations are merged in the following order (later levels override earlier ones):- System (
/etc/xdg/dvc/configon Linux) - Global (
~/.config/dvc/configon Linux) - Project (
.dvc/config- tracked by Git) - 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
Configuration Sections
DVC configuration files use INI format with the following main sections:core
General DVC behavior settings:Default remote storage to use for
dvc push/dvc pullAutomatically stage changes to DVC files with Git
Check for DVC updates
Send anonymous usage analytics
cache
Local cache configuration:Location of the cache directory (default:
.dvc/cache)Link type for cache:
reflink, hardlink, symlink, or copyMake 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:Set Configuration
Set a project-level 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
Use local config for credentials
Use local config for credentials
Store sensitive credentials in
.dvc/config.local which is git-ignored:Set default remote at project level
Set default remote at project level
Configure the default remote in This ensures all team members use the same default remote.
.dvc/config (tracked by Git):Use relative paths when possible
Use relative paths when possible
For local remotes, use relative paths to make the configuration portable:
Organize remotes by purpose
Organize remotes by purpose
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