Skip to main content

Description

DVC remote commands help you configure and manage remote storage locations where DVC stores cached data and model files. Remotes can be cloud storage (S3, GCS, Azure), network storage (SSH, HDFS), or local directories.

Subcommands

remote add

Add a new data remote.

Arguments

string
required
Name of the remote (converted to lowercase).
string
required
Remote location. Supported URLs include:
  • s3://bucket/path - Amazon S3
  • gs://bucket/path - Google Cloud Storage
  • azure://container/path - Azure Blob Storage
  • ssh://user@host/path - SSH/SFTP
  • hdfs://namenode/path - HDFS
  • /local/path - Local directory
  • http://example.com/path - HTTP
See full list of supported URLs.

Options

flag
Set as default remote.
flag
Force overwriting existing configs.
flag
Use global config (~/.config/dvc/config).
flag
Use system config.
flag
Use project config (.dvc/config).
flag
Use local config (.dvc/config.local).

remote default

Set/unset the default data remote.

Arguments

string
Name of the remote to set as default. Omit to show current default.

Options

flag
Unset default remote.
flag
Use global config.
flag
Use system config.
flag
Use project config.
flag
Use local config.

remote list

List all available data remotes.

Example Output

The default remote is highlighted in green and marked with “(default)“.

remote modify

Modify the configuration of a data remote.

Arguments

string
required
Name of the remote.
string
required
Name of the option to modify. Common options:
  • access_key_id, secret_access_key - AWS credentials
  • region - AWS region
  • profile - AWS profile name
  • endpointurl - Custom endpoint URL
  • ssl_verify - Enable/disable SSL verification
  • url - Change remote URL
string
Value of the option. Omit when using --unset.

Options

flag
Unset option.
flag
Use global config.
flag
Use system config.
flag
Use project config.
flag
Use local config.

remote remove

Remove a data remote.

Arguments

string
required
Name of the remote to remove.

Options

flag
Use global config.
flag
Use system config.
flag
Use project config.
flag
Use local config.

remote rename

Rename a DVC remote.

Arguments

string
required
Remote to be renamed.
string
required
New name of the remote.

Options

flag
Use global config.
flag
Use system config.
flag
Use project config.
flag
Use local config.

Examples

Setting Up AWS S3 Remote

Store credentials in .dvc/config.local (not tracked by Git) using --local flag for security.

Setting Up Google Cloud Storage

Multiple Remotes for Different Purposes

SSH Remote with Key Authentication

Supported Storage Types

Amazon S3

AWS S3 and S3-compatible storage (MinIO, DigitalOcean Spaces)

Google Cloud Storage

GCS buckets with service account or default credentials

Azure Blob Storage

Azure containers with connection string or SAS token

SSH/SFTP

Remote servers via SSH with key or password authentication

HDFS

Hadoop Distributed File System

HTTP/HTTPS

Read-only HTTP servers (for pulling data)

Local Directory

Network-mounted directories or local paths

WebDAV

WebDAV protocol (Nextcloud, ownCloud)

Configuration Levels

DVC supports four configuration levels (in order of precedence):
1

Local (.dvc/config.local)

Machine-specific settings, not tracked by Git. Use for credentials.
2

Project (.dvc/config)

Project-wide settings, tracked by Git. Use for remote URLs.
3

Global (~/.config/dvc/config)

User-wide settings across all projects.
4

System (/etc/dvc/config)

System-wide settings for all users.
Security Best Practice: Never commit credentials to Git. Always use --local flag when setting sensitive options like access_key_id or password.

Common Remote Options

AWS S3 Options

  • access_key_id - AWS access key
  • secret_access_key - AWS secret key
  • region - AWS region (e.g., us-east-1)
  • profile - AWS CLI profile name
  • endpoint_url - Custom S3 endpoint
  • ssl_verify - Enable/disable SSL verification

Google Cloud Storage Options

  • credentialpath - Path to service account JSON file
  • projectname - GCP project name

Azure Options

  • connection_string - Azure storage connection string
  • account_name - Storage account name
  • sas_token - Shared Access Signature token

SSH Options

  • keyfile - Path to SSH private key
  • password - SSH password
  • port - SSH port (default: 22)
  • timeout - Connection timeout
  • dvc push - Upload data to remote storage
  • dvc pull - Download data from remote storage
  • dvc fetch - Download data to cache without checkout
  • dvc config - Direct configuration management