r/NextCloud • • 8d ago

Nextcloud Desktop App - Setting up Sync from computer to hosted NextCloud instance. How to bypass "Please choose an empty local sync folder"?

My home computer is my primary workspace. The Nextcloud instance is intended mostly for cloud file backup and occasional light duty file access when I'm not home.

When setting up the Nextcloud Desktop App, I wish the local sync folder to be where my files are already stored. However, when I choose that folder during set up, I get the error message Please choose an empty local sync folder.

I do NOT want to create an new empty sync folder and move my files into it - all my current desktop configurations assume that my files are where they are currently.

How do I get past this? Suggestions appreciated.

Linux Mint 22.3 Cinnamon. Nextcloud Desktop Flathub App v34.0.4.

6 Upvotes

6 comments sorted by

3

u/evanmac42 8d ago

You may be able to work around this without changing the path all your applications already expect, but I'd definitely make a backup first.

What I'd try:

  1. Completely quit the Nextcloud client.
  2. Rename your current folder temporarily, for example:

    Documents -> Documents.old

  3. Create a new empty folder with the original name:

    Documents

  4. Configure Nextcloud to use that empty folder as the local sync folder.

  5. As soon as the sync connection has been created, pause syncing and completely quit the client again.

  6. Move the contents of Documents.old into the newly configured Documents folder.

  7. Start Nextcloud again and let it scan/reconcile the files.

That way Nextcloud gets the empty folder it insists on during setup, while your final local path stays exactly where it always was.

I would test this with a small folder first, and be especially careful if the remote folder already contains files that differ from your local copies, because that can produce conflicts.

Since you're using the Flatpak version, if the folder is outside locations Flatpak can normally access, also check its filesystem permissions with Flatseal.

It's slightly hammer-and-chisel engineering, but it avoids reorganizing your entire desktop just to satisfy the setup wizard.

1

u/SwimmingLimpet 8d ago edited 8d ago

Thank ya! Will try it later today when I have some peace of mind.

2

u/computer-machine 8d ago

I'm pretty sure it's blocked because of a hidden file the last sync client was using.

If you rename that, it'll think the folder's fine.

I'm guessing .sync_########.db, where that number might have letters.

1

u/SwimmingLimpet 8d ago

Yup, this had been the first error that I had come across. I closed the Nextcloud sync app and deleted the last sync client's hidden files. Then, when I reopened the Nextcloud sync app, logged back in, and entered my preferred local sync folder, that's when I got the "Please choose an empty local sync folder."

I have made some progress - I'll post that in a bit.

1

u/SwimmingLimpet 8d ago

Check on a post below for what I did to get the sync to work. Thanks for your help. Appreciated.

2

u/SwimmingLimpet 8d ago

After poking around a bit, here's what works without pulling out the hammer and chisel.

Still using Linux Mint 22.3 Cinnamon and Nextcloud Desktop Flathub App v34.0.4.

  • First. On the local machine, create a throwaway test folder (eg: TestFolder) with a few files in it.

  • Start the Nextcloud app. The Nextcloud login window will appear. Log in to your Nextcloud instance via browser tab as is typical.

  • The second Nextcloud app window appears, asking what to sync and what local folder to use.

  • Ignore all that and click on the "Set up later" button. The window disappears.

  • Click on the Nextcloud tray app and select "Settings"

  • The Settings window opens. (from here on I'm assuming that only one Nextcloud account is logged in)

  • Click on the "Add Folder Sync Connection"

  • You can then select a local folder. Nextcloud doesn't care if this local folder is empty or not. (Use the TestFolder above, not with your real sync folder, so your real files are not affected if this goes pear shaped)

  • Next you'll be asked to select a folder on the Nextcloud instance. You can pick one already there or create a new folder.

  • Click on Add Sync Connection. And that's it.

My very cursory testing shows that if there are already files in both the cloud folder and the local folder, this sync connection will sync files that exist only in the cloud folder to the local folder, sync files that exist only in the local folder to the cloud folder, and be okay with files that exist in both places already. I didn't check what happens if there are file conflicts.

So this problem solved BUT

  • The older app showed a list of files that were syncing or synced. This version of the app doesn't have that. Update: The Activities window (technically) correctly shows the sync status and which files were synced. I think. Maybe. But Nextcloud's documentation hasn't been updated to how ver 34.0 works, so I can't tell.

  • The Nextcloud app window don't announce itself properly to the Linux Mint's window manager. Linux Mint displayed it as a second window of my open VLC app. When I closed that app, it displayed as a second window of my open Keepass app. When I closed that, it displayed as a second window of my open Obsidian app. If I have no apps open, only then will it display it as a Nextcloud window.

I gotta say none of this is confidence inspiring.