Add a new data remote.
Depending on your storage type, you may also need
dvc remote modifyto provide credentials and/or configure other remote parameters.
This command creates a
remote section in the DVC project's
config file and optionally assigns a default
remote in the
core section, if the
--default option is used (recommended
for the first remote):
['remote "myremote"'] url = /tmp/dvcstore [core] remote = myremote
url are required. The
name is used to identify the remote and
must be unique for the project.
url specifies a location to store your data. It can represent a cloud storage
service, an SSH server, network-attached storage, or even a directory in the
local file system (see all the supported remote storage types in the examples
If you installed DVC via
pipand plan to use cloud services as remote storage, you might need to install these optional dependencies:
[ssh]. Alternatively, use
[all]to include them all. The command should look like this:
pip install "dvc[s3]". (This example installs
boto3library along with DVC to support S3 storage.)
--system - save remote configuration to the system config file (e.g.
/etc/xdg/dvc/config) instead of
--global - save remote configuration to the global config file (e.g.
~/.config/dvc/config) instead of
--project - save remote configuration to the project's config file
.dvc/config). This is the default behavior.
--local - save remote configuration to the Git-ignored local config file
.dvc/config.local) instead of
.dvc/config. This is useful to
save private remote config that you don't want to track and share with Git.
--force - overwrite existing remote with new
--help - prints the usage/help message, and exit.
--quiet - do not write anything to standard output. Exit with 0 if no
problems arise, otherwise 1.
--verbose - displays detailed tracing information.
The following are the types of remote storage (protocols) supported:
Add an Amazon S3 remote as the default (via the
-d option), and modify its
💡 Before adding an S3 remote, be sure to Create a Bucket.
$ dvc remote add -d myremote s3://mybucket/path Setting 'myremote' as a default remote. $ dvc remote modify myremote region us-east-2
The project's config file (
.dvc/config) now looks like this:
['remote "myremote"'] url = s3://mybucket/path region = us-east-2 [core] remote = myremote
The list of remotes should now be:
$ dvc remote list myremote s3://mybucket/path
You can overwrite existing remotes using
dvc remote add:
$ dvc remote add -f myremote s3://mybucket/another-path
List remotes again to view the updated remote:
$ dvc remote list myremote s3://mybucket/another-path