Sub topic 5
Syncing Desktop and Documents
This chapter assumes you have already turned on iCloud Drive and can open it in Finder. You should know your iCloud storage quota. Here you decide whether to sync the Desktop and Documents folders, set that up, and handle the problems it can cause.
What the setting does
Normally your Desktop and Documents folders live on your Mac, at ~/Desktop and ~/Documents. When you turn on Desktop & Documents Folders, macOS moves their contents into iCloud Drive. Two new folders named Desktop and Documents then appear inside iCloud Drive. Finder's sidebar and the ~/Desktop and ~/Documents paths keep working, but they now point at the synced copies.
The result is that a file you save to the Desktop on your Mac appears in iCloud Drive on your iPhone, iPad, other Macs, and iCloud.com. Apps that save to Documents benefit too, without any change in how you work.
Check the requirements first
Before you turn the setting on, check these points:
- Storage. Everything on your Desktop and in Documents counts against your iCloud quota. Add up the sizes of both folders and compare the total with your free space. If the folders are larger than your free space, the upload cannot finish.
- The right Apple Account. The files go to whichever account is signed in. Confirm it in System Settings by clicking your name at the top of the sidebar.
- Contents. Look for large or unsuitable items such as virtual machine images, build folders, or databases. Move them elsewhere first. A later chapter covers keeping folders out of sync.
- Other Macs. If a second Mac also has these folders, think about what happens when they merge (see below).
Turn it on
- Open System Settings and click your name.
- Click iCloud, then Drive.
- Turn on Sync this Mac if it is not already on.
- Turn on Desktop & Documents Folders.
- Click Done.
Menu names change slightly between macOS versions. On older versions, look for Options next to iCloud Drive and tick Desktop & Documents Folders.
The Mac then starts uploading. Large folders can take hours, and the upload only runs while the Mac is awake and online. Leave it plugged in and connected.
What happens to existing files
The Mac's behavior depends on whether iCloud Drive already contains Desktop or Documents folders.
| Situation | What macOS does |
|---|---|
| First Mac to use the setting | Moves its Desktop and Documents contents into new iCloud folders with the same names. |
| Second Mac, with iCloud folders already present | Puts its local contents in a new folder in iCloud Drive, named after the Mac, such as `Desktop - MacBook Pro`. It does not merge them. |
| Turning the setting off | Your Mac keeps a local copy of the files and creates new, empty Desktop and Documents folders. The files stay in iCloud Drive. |
The second row prevents data loss, but it surprises many people. A second Mac will not show its old Desktop items on the shared Desktop. You have to move them yourself.
How it interacts with other features
Desktop and Documents syncing is part of iCloud Drive, so the other iCloud Drive features apply to these folders too.
- Optimize Mac Storage. If your Mac runs low on disk space, macOS may replace older or rarely used files with cloud-only placeholders. A document on your Desktop may then show a cloud icon and need a download before it opens. This is normal. If you need a file offline, use Keep Downloaded, covered in a later chapter.
- Shared Desktop on several Macs. Items you place on one Mac's Desktop appear on another's. Icon positions may differ between machines.
- Version history and conflicts. If two devices edit the same file, iCloud may create a conflict copy. See the chapter on versions.
Find the folders in Finder and Terminal
In Finder, the Desktop and Documents entries appear under iCloud in the sidebar and in the usual Favorites list. Both lead to the same files.
From Terminal, the paths still work as before. The real storage location is inside the iCloud Drive folder:
ls -la "$HOME/Library/Mobile Documents/com~apple~CloudDocs"With the setting on, the listing includes Desktop and Documents. Check where ~/Desktop points with this command:
ls -ld ~/DesktopScripts, backups, and command-line tools should keep using ~/Desktop and ~/Documents. Hard-coding the long iCloud path is fragile.
Common problems
Not enough storage
If the quota fills, uploads stop and a warning appears in System Settings. Free space by deleting files, or buy a larger plan. Moving a large folder out of Documents reduces what you need.
Slow or stalled uploads
Large files, a weak connection, or a sleeping Mac slow the upload. Keep the Mac awake and connected. A single very large file can hold up a progress indicator for a long time. The troubleshooting chapter covers deeper fixes.
Tools that dislike synced folders
Software that creates many small files, such as node_modules, Python virtual environments, or Git repositories with heavy activity, can cause constant sync traffic or odd errors. Keep these projects outside Desktop and Documents, for example in ~/Developer. If they must stay, use the .nosync approach described later.
Files appear to be missing
A file with a cloud icon is not missing. It is stored online and not downloaded. Double-click it to download it, or check the status icons chapter. If a file is truly gone, look in Recently Deleted on iCloud.com. Deleted files stay there for a limited time.
Different Macs, different layouts
Because Desktop is shared, a cluttered Desktop on one Mac becomes cluttered on all of them. Use folders, or Stacks, to keep the Desktop tidy.
When not to use it
Syncing Desktop and Documents is convenient but not a backup. A deletion or an overwrite on one device spreads to the others. Keep a separate backup, such as Time Machine.
You may also prefer to leave the setting off if you:
- have a small iCloud plan and large local folders,
- store sensitive files you want kept only on the Mac,
- work with software that conflicts with synced folders,
- share a Mac among several accounts with different Apple Accounts.
In those cases, you can still put selected files in iCloud Drive by hand, and leave the rest local.
Verify your setup
After the upload finishes, check these things:
- System Settings shows Desktop & Documents Folders turned on.
- Finder's iCloud Drive window lists both folders.
- A test file you create on the Desktop appears in the Files app on your iPhone or on iCloud.com within a few minutes.
Exercise
You turn on Desktop & Documents Folders on a second Mac, and its old Desktop files no longer appear on the Desktop. The first Mac's Desktop items show up instead. Where are the second Mac's old files, and how do you get them back on the shared Desktop?
Show answer
macOS did not merge them. It put the old contents in a new folder in iCloud Drive named after the Mac, such as "Desktop - MacBook Pro". Open iCloud Drive in Finder, open that folder, and drag the items you want into the iCloud Drive Desktop folder.
Exercise
You turn off Desktop & Documents Folders and find an empty Desktop on your Mac. Are your files lost? What should you do?
Show answer
No. The files remain in the Desktop folder inside iCloud Drive, and the Mac created new empty local folders. Open iCloud Drive in Finder and drag the files back to ~/Desktop, then confirm the copy finished before deleting anything from iCloud.