Description
Thedvc config command allows you to view and modify DVC configuration settings. Configuration can be set at different levels (local, project, global, system) and controls behavior like remote storage, cache settings, and user preferences.
Usage
Arguments
Option name in format:
section.option- For core settings (e.g.,core.autostage)remote.name.option- For remote settings (e.g.,remote.storage.url)db.name.option- For database settings
Value to set for the option. Omit to get current value.
Options
Unset (remove) the specified option.
List all defined config values.
Show the source file containing each config value.
Configuration Levels
Use local config (
.dvc/config.local).Not tracked by Git - Use for machine-specific settings and credentials.Use project config (
.dvc/config).Tracked by Git - Use for project-wide settings shared across team.Use global config (
~/.config/dvc/config).User-wide settings across all DVC projects.Use system config (
/etc/dvc/config).System-wide settings for all users.Examples
List All Configuration
List Config with Origins
The
--show-origin flag shows which config file contains each setting, helpful for debugging configuration issues.Get Specific Value
Set Core Options
Configure Remote Storage
Configure Cache Settings
Unset Configuration
Global Configuration
Common Configuration Options
Core Settings
Default remote storage name.
Automatically stage
dvc.lock and .gitignore changes.Enable anonymous usage analytics.
Check for DVC updates on startup.
Use DVC without Git or other SCM.
Cache Settings
Custom cache directory location.
File link type:
hardlink, symlink, reflink, or copy.Make cache files read-only to prevent accidental modification.
Enable cache sharing:
group or all.Remote Settings
Remote storage URL.
AWS access key ID (S3 remotes).
AWS secret access key (S3 remotes).
AWS region (S3 remotes).
AWS profile name.
Custom S3 endpoint URL.
Plots Settings
Custom HTML template for plot visualization.
Automatically open plots in browser.
Default output directory for plots.
Configuration Levels (Precedence)
Configuration is read in the following order (later overrides earlier):Configuration File Format
DVC config files use INI format:.dvc/config
.dvc/config.local
Use Cases
Team Collaboration
Set project-wide defaults in
.dvc/config for consistent team experience.Secure Credentials
Store sensitive credentials in
.dvc/config.local (not tracked by Git).Personal Preferences
Configure global settings for your workflow across all projects.
CI/CD Setup
Configure system-level cache locations and credentials for build servers.
Environment Variables
DVC config can also be set via environment variables:DVC_<SECTION>_<NAME>_<OPTION> (uppercase)
Environment variables have the highest precedence and override all config files.
Troubleshooting
View Effective Configuration
Reset to Defaults
Config Not Found Error
Related Commands
dvc remote- Specialized commands for remote configurationdvc cache- Specialized commands for cache configurationdvc init- Initialize DVC repository with default config