Quick start
In this tutorial you’ll connect two machines, share a file and a directory between them, and watch a change travel from one to the other. It takes about five minutes.
You’ll need two macOS or Linux machines with dotsync installed, and an account on GitHub, GitLab, Gitea or any other git host. The examples call them laptop (a Mac) and desktop (a Linux machine).
1. Create a private repository
Section titled “1. Create a private repository”-
On your git host, create a new, empty, private repository, for example
dotfiles. Don’t add a README or a license: dotsync sets the repository up itself. -
Check that
gitcan reach it without asking for anything. The background agent has nobody to type a password or passphrase:Terminal window git ls-remote git@github.com:you/dotfiles.gitAny output, or none, is fine. A prompt is not: see git access without prompts.
2. Set up the first machine
Section titled “2. Set up the first machine”-
On the laptop, point dotsync at the repository:
dotsync init git@github.com:you/dotfiles.git cloning git@github.com:you/dotfiles.git ... remote is empty; creating the manifest installed ~/.local/bin/dotsync dotsync: in sync (0 files) automatic sync: launchd agent io.github.dotsync, every 300sinitcloned the repository, wrote the manifest (the list of managed files) to it, and installed a background agent that syncs every five minutes. Check that everything is healthy:dotsync doctor dotsync doctor ✓ dotsync 0.5.0 (ed63c37, 2026-09-21T06:18:53Z) go1.27.1 darwin/arm64 ✓ git version 2.50.1 (Apple Git-155) ✓ configuration: ~/.config/dotsync/config.json remote git@github.com:you/dotfiles.git, branch main ✓ remote reachable without prompts ✓ background agent: launchd agent loaded ✓ last sync 0s ago (ok) ✓ 0 managed entries, 0 files · backups: 0 file(s), 0 B in ~/.local/state/dotsync/backups (older than 90 days are pruned) Everything looks good.Every line should start with
✓or·. Anything marked✗or!comes with a→line saying how to fix it. The usual culprit is git needing a password it can’t ask for. -
Choose what to manage. Start with one file and one directory:
dotsync add ~/.gitconfig -d "Git identity and aliases" managing ~/.gitconfig as 'gitconfig' sent ~/.gitconfig dotsync: 1 sent — pushed 3f2a9c1 dotsync add ~/.config/nvim -d "Neovim" --ignore lazy-lock.json managing ~/.config/nvim as 'nvim' sent ~/.config/nvim/init.lua sent ~/.config/nvim/lua/plugins.lua dotsync: 2 sent — pushed 8b1d0e4-dsets the description shown bystatus.--ignorekeeps a file inside the directory out of sync, here the plugin lock file that each machine writes for itself. -
See what’s managed:
dotsync status dotsync on laptop: git@github.com:you/dotfiles.git (main @ 8b1d0e4) last sync: 2026-09-21T10:15:02+05:30 (ok) automatic sync: launchd agent loaded SOURCE TARGET STATUS DESCRIPTION gitconfig ~/.gitconfig ok Git identity and aliases nvim ~/.config/nvim/ ok Neovim
3. Set up the second machine
Section titled “3. Set up the second machine”-
On the desktop, run the same
init:dotsync init git@github.com:you/dotfiles.git cloning git@github.com:you/dotfiles.git ... installed ~/.local/bin/dotsync updated ~/.gitconfig (previous version saved to ~/.local/state/dotsync/backups/20260921-101730-4242/.gitconfig) updated ~/.config/nvim/init.lua updated ~/.config/nvim/lua/plugins.lua dotsync: 3 updated existing local files that were replaced are saved under ~/.local/state/dotsync/backups automatic sync: systemd user timer dotsync.timer, every 300sYour files are here. The desktop already had a
.gitconfigof its own, so dotsync backed it up before replacing it.
4. Watch a change travel
Section titled “4. Watch a change travel”-
On the desktop, change a managed file and sync straight away instead of waiting for the agent:
git config --global alias.st status # edits ~/.gitconfig dotsync sync sent ~/.gitconfig dotsync: 1 sent — pushed 51c7e02 -
On the laptop, the agent installs it within five minutes. To get it now:
dotsync sync updated ~/.gitconfig (previous version saved to ~/.local/state/dotsync/backups/20260921-102204-5120/.gitconfig) dotsync: 1 updated
That’s the whole workflow. From now on, just edit your files.
What you’ve learned
Section titled “What you’ve learned”dotsync init <url>connects a machine and starts its background agent.dotsync add <path>manages a file or directory on every machine, from whichever machine you run it on.- Changes sync both ways on their own, and every file dotsync replaces is backed up first.
dotsync doctorchecks the setup;dotsync statusshows every file.
Where to next
Section titled “Where to next”- Manage files and directories: ignore patterns, descriptions, permissions, and how to stop managing something.
- Resolve conflicts: what happens when two machines edit the same file.
- How sync works: the model behind all of this.