How to Use a Local Folder as a DVC Remote
A DVC remote is the storage that dvc push uploads your data to and dvc pull downloads it from. It doesn't have to be in the cloud: a folder on your own disk, a mounted drive or a network share works too, and costs nothing. This guide makes a folder in your home folder the default remote of a project with DVC 3.67.1, reads what DVC saved, and commits it.
Syntax
dvc remote add -d <name> <folder>
| Part | What it means |
|---|---|
dvc remote add | Saves a remote, a storage place for DVC's data, in the project's .dvc/config |
-d | Short for --default: makes it the remote that dvc push and dvc pull use when you don't name one |
<name> | A name you choose, such as storage. The reference says it "must be unique" |
<folder> | The folder that will hold the data, as an absolute path: the full path from the top of the disk |
The dvc remote add reference says DVC remotes "can point to a cloud storage service, an SSH server, network-attached storage, or even a directory in the local file system."
The Example
weather-data is a Git repository where dvc init has run and data/temperatures.csv is tracked with dvc add. Its data will go to a folder called dvc-storage in your home folder, outside the project.
Prerequisites
- DVC, in a Git repository where
dvc inithas run. Rundvc --versionto check; this guide uses DVC 3.67.1.
Step 1: Add the Folder as the Default Remote
In the project folder:
- bash / zsh
- PowerShell
dvc remote add -d storage $HOME/dvc-storage
dvc remote add -d storage (Join-Path $HOME dvc-storage)
Setting 'storage' as a default remote.

$HOME is your home folder, so on a Mac the remote is /Users/you/dvc-storage. PowerShell has a $HOME variable too: its documentation says that on Windows it's the USERPROFILE folder, "typically C:\Users\<UserName>". Join-Path adds the folder name to it with the right separator. The PowerShell line was checked in PowerShell 7.6 on macOS.
Step 2: See What DVC Saved
cat .dvc/config
[core]
remote = storage
['remote "storage"']
url = /Users/you/dvc-storage

The command added two things:
['remote "storage"']is the remote itself: its name, and itsurl, the folder.remote = storagein the[core]section is what-dadded. It makesstoragethe default remote.
dvc remote list shows every remote of the project:
dvc remote list
storage /Users/you/dvc-storage (default)

Both commands work unchanged in PowerShell.
Step 3: Check the Folder
DVC saved the path, but it didn't create the folder:
- bash / zsh
- PowerShell
ls $HOME/dvc-storage
ls: /Users/you/dvc-storage: No such file or directory
Test-Path (Join-Path $HOME dvc-storage)
False

That's expected. dvc push creates the folder the first time it uploads data.
Step 4: Commit the Setting
.dvc/config is a file Git tracks, so the change shows up in Git:
git status --short
M .dvc/config
Commit it:
git commit -am "Store DVC data in dvc-storage"
[main 4b1c14f] Store DVC data in dvc-storage
1 file changed, 4 insertions(+)

-a stages every changed file Git already tracks before it commits, here only .dvc/config. The remote is now part of the project, and every clone gets the same setting. Because the path is absolute, a clone on another computer can use it only where the same folder exists, such as a network drive mounted at the same path. The commands are the same in PowerShell.
A Relative Path Is Saved Differently
The remote storage guide recommends an absolute path "because it's saved as-is in DVC config", and adds: "When using a relative path, it will be saved relative to the config file location, but resolved against the current working directory."
Here's what that means in weather-data-rel, a second copy of the example:
dvc remote add -d storage ../dvc-storage
Setting 'storage' as a default remote.
cat .dvc/config
[core]
remote = storage
['remote "storage"']
url = ../../dvc-storage
dvc remote list
storage /Users/you/source/dvc-storage (default)

You typed ../dvc-storage, the folder next to the project. DVC saved ../../dvc-storage, with one ../ more, because it counts from .dvc/config, which sits one folder deeper, inside .dvc. Both point to the same folder, as dvc remote list shows. A relative path is useful when every copy of the project sits next to the storage folder, such as a project and its clones side by side in one folder: the path is right for all of them, and no user name ends up in a file Git shares.
Error: Remote Already Exists
Running the same dvc remote add a second time fails:
- bash / zsh
- PowerShell
dvc remote add -d storage $HOME/dvc-storage
dvc remote add -d storage (Join-Path $HOME dvc-storage)
Setting 'storage' as a default remote.
ERROR: configuration error - config file error: remote 'storage' already exists. Use `-f|--force` to overwrite it.

Don't trust the first line: nothing was set, and .dvc/config still holds the first folder. I reported that line to the DVC project as treeverse/dvc#11161.
If the remote already points where you want, there's nothing to fix. To point it at another folder, add -f, which the reference describes as "overwrite existing remote with new url value":
- bash / zsh
- PowerShell
dvc remote add -d -f storage $HOME/dvc-storage-new
dvc remote add -d -f storage (Join-Path $HOME dvc-storage-new)
Setting 'storage' as a default remote.
dvc remote list
storage /Users/you/dvc-storage-new (default)

Commit .dvc/config again after the change.
Error: No Remote Specified
A remote added without -d isn't the default, so dvc push doesn't know where to upload. Here it happens in no-remote, another small project:
- bash / zsh
- PowerShell
dvc remote add storage $HOME/dvc-storage
dvc push
dvc remote add storage (Join-Path $HOME dvc-storage)
dvc push
ERROR: failed to push data to the cloud - config file error: no remote specified in /Users/you/source/no-remote. Setup default remote with
dvc remote default <remote name>
or use:
dvc <command> -r <remote name>

dvc remote add without -d prints nothing. The <command> in the last line is a placeholder DVC forgot to fill in: for dvc push, it means dvc push -r <remote name>. I reported it as treeverse/dvc#11163.
The first suggestion is the fix. dvc remote default makes an existing remote the default:
dvc remote default storage
dvc remote list
storage /Users/you/dvc-storage (default)

It adds the same remote = storage line to .dvc/config that -d adds. The other way is to name the remote in each command with -r, such as dvc push -r storage: the reference says commands use the default remote "unless their -r option is used".
Common Mistakes
| Mistake | What happens | Do this instead |
|---|---|---|
Leaving out -d | dvc push stops with no remote specified | dvc remote default <name> |
Running dvc remote add twice | remote 'storage' already exists | Nothing, if the folder is right; -f to change it |
| Typing a relative path | .dvc/config holds a different path from the one you typed | Use an absolute path, which is saved as typed |
Not committing .dvc/config | Clones of the project have no remote | git commit after dvc remote add |
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
remote 'storage' already exists | A remote with that name is already in .dvc/config | Keep it, or add -f to change its folder |
no remote specified … Setup default remote with | The project has a remote, but none is the default | dvc remote default <name> |
no remote specified … Create a default remote with | The project has no remote at all | dvc remote add -d <name> <folder> |
No such file or directory for the remote's folder | Nothing has been pushed yet | Run dvc push; it creates the folder |
FAQ
Can the remote be on a USB drive or a network share?
Yes. The remote storage guide says: "You can also use system directories, mounted drives, network resources e.g. network-attached storage (NAS), and other external devices as storage." Give the drive's absolute path.
Can I keep the remote out of Git?
Yes: --local saves it in .dvc/config.local instead. The reference calls that file "the Git-ignored local config file", "useful to save private remote config that you don't want to track and share with Git."
Does a local remote cost anything?
No. It's a folder on your own disk, so the only cost is the space the data takes.
Conclusion
dvc remote add -d storage $HOME/dvc-storage saved a folder in the home folder as the project's default remote, in two lines of .dvc/config, and one commit made it part of the project. The folder itself appears with the first dvc push. A relative path is saved relative to .dvc/config, a second remote add with the same name needs -f, and a remote added without -d needs dvc remote default.
Additional Resources
- dvc remote add — every option, including
--localand-f. - Remote storage — local remotes and every cloud storage type.
- dvc remote default — set, show or unset the default remote.
