Skip to main content

Description

The dvc 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

string
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
string
Value to set for the option. Omit to get current value.

Options

flag
Unset (remove) the specified option.
flag
List all defined config values.
flag
Show the source file containing each config value.

Configuration Levels

flag
Use local config (.dvc/config.local).Not tracked by Git - Use for machine-specific settings and credentials.
flag
Use project config (.dvc/config).Tracked by Git - Use for project-wide settings shared across team.
flag
Use global config (~/.config/dvc/config).User-wide settings across all DVC projects.
flag
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

Security: Always use --local flag when setting credentials. Local config is not tracked by Git.

Configure Cache Settings

Unset Configuration

Global Configuration

Common Configuration Options

Core Settings

string
Default remote storage name.
boolean
Automatically stage dvc.lock and .gitignore changes.
boolean
Enable anonymous usage analytics.
boolean
Check for DVC updates on startup.
boolean
Use DVC without Git or other SCM.

Cache Settings

string
Custom cache directory location.
string
File link type: hardlink, symlink, reflink, or copy.
boolean
Make cache files read-only to prevent accidental modification.
string
Enable cache sharing: group or all.

Remote Settings

string
Remote storage URL.
string
AWS access key ID (S3 remotes).
string
AWS secret access key (S3 remotes).
string
AWS region (S3 remotes).
string
AWS profile name.
string
Custom S3 endpoint URL.

Plots Settings

string
Custom HTML template for plot visualization.
boolean
Automatically open plots in browser.
string
Default output directory for plots.

Configuration Levels (Precedence)

Configuration is read in the following order (later overrides earlier):
1

System Config (/etc/dvc/config)

System-wide settings for all users.
2

Global Config (~/.config/dvc/config)

User-wide settings across all projects.
3

Project Config (.dvc/config)

Project-specific settings, tracked by Git.
4

Local Config (.dvc/config.local)

Machine-specific settings, NOT tracked by Git.
Best Practice:
  • Project settings (URLs, shared options) → .dvc/config (tracked)
  • Credentials and machine-specific settings → .dvc/config.local (not tracked)
  • Personal preferences → ~/.config/dvc/config (global)

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:
Format: 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

Solution: Some config levels (project, local) require being inside a DVC repository.
  • dvc remote - Specialized commands for remote configuration
  • dvc cache - Specialized commands for cache configuration
  • dvc init - Initialize DVC repository with default config