Skip to content

Internal 2-way sync does not pick up files / folders created/modified/deleted outside nextcloud app #13752

Description

@tobias0409

⚠️ Before posting ⚠️

  • This is a bug, not a question or an enhancement.
  • I've searched for similar issues and didn't find a duplicate.
  • I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
  • I agree to follow Nextcloud's Code of Conduct.

Steps to reproduce

  1. Enable 2-way synchronization for a folder
  2. Create a file/folder using the Android file browser, modify an existing file/folder, or delete a file/folder using the Android file browser
  3. Wait for the next synchronization to begin
  4. The Nextcloud Android App fails to detect the files, or in other words, it does not recognize the changes

Expected behaviour

It should be possible to create, modify, or delete a file or folder outside the Nextcloud app (e.g., using the phone's file browser or any other app with access to the synced folder).

Actual behaviour

When creating, modifying, or deleting a file or folder outside the Nextcloud app, the app does not recognize the changes and fails to detect the new files. Despite this issue, the sync operates normally every 15 minutes.

Android version

14

Device brand and model

Samsung Tab S7 FE

Stock or custom OS?

Stock

Nextcloud android app version

3.30.1 RC1

Nextcloud server version

29.0.6

Using a reverse proxy?

Yes

Android logs

No response

Server error logs

No response

Additional information

I have already described the issue in detail in PR #13294 .

Activity

  1. superzanti commented on Oct 9, 2024

    @superzanti

    Thanks for opening this @tobias0409

    I have the same issue on my Pixel 5a

    You can see some of the details of my issue here.

  2. derutaramuda commented on Oct 10, 2024

    @derutaramuda

    Same issue here, Pixel 8 with GrapheneOS atm

  3. Akselmo commented on Oct 28, 2024

    @Akselmo

    Can also confirm this issue, Fairphone 5 with CalyxOS.

  4. motareis commented on Nov 3, 2024

    @motareis

    Same here. Pixel 6 with GrapheneOS and Nextcloud Client 3.30.4

    1. Set up folder Logseq and sub-folders as 2-way sync.
    2. Open Logseq client and create a new journal entry (creates a new file in Logseq sub-folder).
    3. Check in Android file manager that new file actually exists.
    4. Wait.
    5. New file is not synced after a day although sync is set to 15 minutes.
    6. Upload new file manually in Nextcloud Client.
    7. File is synced to server and desktop client immediately.
  5. superzanti commented on Nov 4, 2024

    @superzanti

    I hate to say it, but I ended up purchasing a license to FolderSync. For all who are waiting on a solution, I suggest you do the same - This has been a game changer for my note-taking.

    I believe it will be a better solution. This has been an issue in nextcloud/android for years. FolderSync has native support for nextcloud too. And I just set it up to sync my existing nextcloud folders that I have in android. It works great and has a much higher level of configurability than I believe this feature will get anytime soon.

  6. artfulrobot commented on Nov 6, 2024

    @artfulrobot

    @superzanti thanks for sharing. I might end up looking at that.

    I have just experienced file corruption using the two way sync.

    • Set up two way sync on the android app (3.30.3) on a folder called Keepass (you do this by going to Details on the folder, then checking the sync checkbox).
    • Opened one of the keepass files within that folder from within Nextcloud. It opened the KeepassDX app.
    • Saved the file in the external (KeepassDX) app, as normal.
    • come back a day later, thinking it should be all sync-ed: file is corrupted, will not load in KeepassDX on android or KeepassXC on desktop. Had to roll back to backup; lost the new password I added.

    This needs a lot more testing before being available for use. (possible other example of someone using Keepass + Nextcloud losing their data)

    Incidentally: the method I outline here used to work (as long as I manually chose Sync on the file after saving).

  7. superzanti commented on Nov 6, 2024

    @superzanti

    You know, I use keepass and haven't had this issue before.
    I rarely update keepass on my phone. But regardless, notes seem to sync fine.

    Does this happen with just a text file? What kind of timing do you have? like is it 5 min before switching to another device and interacting with that file? 10?

  8. artfulrobot commented on Nov 7, 2024

    @artfulrobot

    @superzanti came back a day later. So no idea at which point nextcloud corrupted the file.

  9. Soltinator commented on Jan 20, 2025

    @Soltinator

    hi. a update on this,
    this just happened to me. if i hadnt enabled versions i would have lost my keepass password database.

    i got 2 nextcloud clients on linux and windows and a android client.
    im pretty sure my android didnt have access to the nextcloud server a week ago (when the corrupted file got synced)
    i can pull up versions of both keepass and nextcloud on all 3 of my devices. as well as server version.
    also i can give you guys a diff of the hex of my database file before and after corruption.
    let me know if you guys need anything.

  10. Markoise commented on Jun 4, 2025

    @Markoise

    I have the same problem. Apparently, the whole 2-way sync is just a 1-way sync, and that only every 15 minutes at least, and only via Wi-Fi. 🤷‍♂️

    I'm slowly starting to regret choosing Nextcloud.

  11. Keyaku commented on Jun 5, 2025

    @Keyaku

    @Markoise Gentle reminder that this is a GitHub issue discussion, not a forum board! I am also discontent with the situation, but putting aside the fact that what you might be referring to is actually Google's fault, I'd ask to keep the discussion solely on technical info.

    (I am no representative of Nextcloud btw. I just like to keep GitHub issues clean from "me too!")

    With the latest (working) version, the files seem to sync other than not syncing, they're stuck in Android/media files instead of us being able to pick somewhere in internal storage, which I'd say is the best end for this functionality.

  12. 6 remaining items

  13. tobiasKaminsky commented on Sep 8, 2026

    @tobiasKaminsky
    Member

    Small update: I see that there is no code for uploading files/folders that are created locally new.
    I assume that the assumption back then was that this is only done from within NC Files app or via Android Files app, which then uses document storage provider to create such new files/folder directly.

    I am thus adding this code.

  14. tobiasKaminsky commented on Sep 9, 2026

    @tobiasKaminsky
    Member
    Image

    Drop in replacement APK: https://cloud.nextcloud.com/s/ABtFF9JpKTR7qtj
    It is with same Google Play Store Key signed.
    Same version number, so any newer version will replace it.

    Please test it and provide feedback if it is now working as expected.

  15. all-the-good-ones-are-gone commented on Sep 9, 2026

    @all-the-good-ones-are-gone
  16. BroOtti commented on Sep 9, 2026

    @BroOtti

    Seems to work good. I hope for the final version it won't bei necessary to enable it in the settings and it will be enough to start the sync of a directory. After 10 years #19 will be finally implemented

  17. tobiasKaminsky commented on Sep 10, 2026

    @tobiasKaminsky
    Member

    I hope for the final version it won't bei necessary to enable it in the settings and it will be enough to start the sync of a directory.

    The "run sync now" is only for debugging, so that the testers can run it immediately, without waiting 15min.
    The final version will have the same behaviour like before: enable it per folder and done.

    Thanks for positive feedback 👍

  18. fracklaus commented on Sep 10, 2026

    @fracklaus

    Please test it and provide feedback if it is now working as expected.

    I have tested this as well. When running the sync manually (via "Run sync now"), everything is working as expected.

    However, periodic sync does not seem to work reliably on my Samsung S26. I have enabled two-way sync with 15min interval and disabled battery optimization for the nextcloud app. Still, in the two-way sync dialog I see that the last sync happened yesterday. Consequently, the changes I have made in between on a file in the local android storage as well as on another file on the server are not synced in the background.
    After enabling two-way snyc, at least one sync happened automatically in the background, but somehow it stopped working.

    Any hints how to fix this?

  19. tobiasKaminsky commented on Sep 10, 2026

    @tobiasKaminsky
    Member

    @fracklaus is the regular auto-upload working for you?
    I can later check, but I think/fear that Samsung has an additional battery optimization settings.

  20. fracklaus commented on Sep 10, 2026

    @fracklaus

    @fracklaus is the regular auto-upload working for you? I can later check, but I think/fear that Samsung has an additional battery optimization settings.

    Hi @tobiasKaminsky, I have enabled auto upload on a test folder and will check whether it keeps functioning. I will give further feedback tomorrow to allow battery optimization methods to kick in.

    However, in my experience, disabling battery optimizations in Samsung works pretty well. I have several apps working in the background flawlessly on my device.

  21. fracklaus commented on Sep 11, 2026

    @fracklaus

    @tobiasKaminsky I have observed the following:

    • Autoupload works as expected completely in the background: I put something new in the folder, wait a few minutes, and it gets uploaded to the server without any interaction with the nextcloud app.
    • Two-way sync did not work. However, I noticed tremendous battery usage by the nextcloud app in the background. Hence I restarted the nextcloud app yesterday evening. Since then, two-way sync seems to be working in the background as expected, and battery usage has significantly decreased.

    I cannot tell why it did not work yesterday and the day before, but since app restart it seems to be working as it should. I will continue to observe and report back here if anything comes up again.

    Thank you for providing this major improvement to two-way sync!

  22. philip-soerensen commented on Sep 14, 2026

    @philip-soerensen

    Hi all, I also bumped into this problem yesterday, and I'm happy to see that it is being worked on just as I encountered it. I tried to install @tobiasKaminsky's patched version, but I get an "App not installed as package conflicts with an existing package" error. Otherwise, I'd be happy to help test this fix.

    My usecase: I use the messenger app Signal, which can export a backup to a local folder in the phone file system. I would like that folder to be a two-way synced Nextcloud folder, so that the backup is taken to my server. I already set that up, targeting a subfolder of /Android/media/com.nextcloud.client/..., which was created by the Nextcloud app by enabling two-way sync on a folder.

  23. tobiasKaminsky commented on Sep 16, 2026

    @tobiasKaminsky
    Member

    , but I get an "App not installed as package conflicts with an existing package" error. Otherwise, I'd be happy to help test this fix.

    I suspect that you do not have it installed via Google Play Store, right?
    If you have installed it via Fdroid I unfortunately cannot create a drop-in replacement, since Fdroid signs the app on their own.

    However, you can test it here: #17598 (comment)
    It is then a separate app, so you would need to set it up and test it.
    It would be great to have another test feedback.

    Thank you!

  24. philip-soerensen commented on Sep 16, 2026

    @philip-soerensen

    @tobiasKaminsky, maybe tomorrow I can give it a shot, if I can just install the APK there :)

  25. hprien commented on Sep 25, 2026

    @hprien

    @tobiasKaminsky thank you so much for taking care of this issue.
    I tested the APK you liked in #17598 (comment).

    With the manual "Run sync now" as well as with the scheduled sync I found following things:
    Creation of a file on server and client works great. They get picked up and synced.
    Deletion of a file on server and client works great. When I delete a file on server side it is being deleted on client as well and the other way around.
    Update of a file (change the content of a text file):

    • When I update a file on the server the changes are synced to the client
    • I'm not able to edit files synced to Android/media/com.nextcloud.android.qa/Nextcloud/<user>@<domain>/. My text editor (BeauTyXT) shows the file as "read only".

    My Platform: Google Pixel 9a, GrapheneOS, Android 17

    Edit: I'm able to change files locally on my phone. The changes get picked up and synced to the Server properly. The "read only" Problem was between me and my texteditor. I tested now with text files and kdbx files.

  26. hprien commented on Sep 25, 2026

    @hprien

    The "run sync now" is only for debugging

    I would love the keep this option

  27. alperozturk96 commented on Oct 6, 2026

    @alperozturk96
    Collaborator

    Hello,

    The PR is updated, love to hear your feedback: #17598 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions