Syncthing is a tool for synchronising folders between computers, and also Android devices. This gist is about how to install and configure Syncthing on an Android device, so that it works as expected. For instructions about how to install and configure Syncthing on computers, you will have to look elsewhere. Also for how to configure folder synchronisation. Below I describe necessary configuration on Android, that I could not easily find by googling:
- I have only tested the following on a OnePlus running OxygenOS 14.0, and on a Samsung Galaxy Tab S8 running Android 14.
- I have only succeeded in synchronizing folders in the internal storage, under /storage/emulated/0, for example /storage/emulated/0/Documents/notes.
- I have not been able to get Syncthing to recognize a folder on an sdcard, the folders there are owned by root, which might be a hindrance. I believe the base problem is that sdcards have a DOS file system, not a modern file system. Note that I am using the Android Syncthing app from Google Play. There is an alternative app Syncthing-Fork that is supposed to be able to handle sdcards.
- Install the Syncthing android app from Google Play store.
- Open the Syncthing app, configure device id and connect to Syncthing running on one or more other computers or devices.
- Configure a folder to be synchronized, but do not enable folder synchronization yet.
- Open Syncthing, select the hamburger menu in the upper left of the app window, select Settings
- In Settings select "Behaviour". Under "Service settings" enable "Start service automatically on boot". This is absolutely necessary, otherwise files synced from other devices or computers, will end up with unusable ownership, so you will be unable to access the files except if you have a file manager with special permissions.
- Restart you Android device. You should now see a Syncthing icon in the Android status row, without having to first start Syncthing manually.
- Start the Syncthing app. Select the hamburger menu in the upper left of the app window, select "Web GUI"
- In "Web GUI" select settings (the gear wheel at the upper right), select "Advanced"
- Select "Folders", this opens a list of folders configured for synchronization. Select each such folder and enable "Copy Ownership From Parent". This is absolutely necessary, otherwise files synced from other devices will end up with unusable ownership.
- Restart your Android device. I do not know if this is necessary, but better be on the safe side. Open the Syncthing app and check that option "Copy Ownership From Parent" is enabled.
- Now you can enable folder synchronization.
- Your Android apps should now be able to access the files in the synchronized folders.