Common config for Linux and Windows

I have 2 OS: Linux and Windows. Windows has configured SyncTayzor Portable according to my needs. Is there a way to use same config on Linux, so that SyncThing stays online when I use Linux? I tried to manually specify config path on Linux, but it didn’t work since for each system path is different eg. D:\Music for Windows and /mnt/:disk_id/Music for Linux.

As for the folder location, you need to set you paths relatively to the executable / binary, e.g. ./Sync or ../Sync, etc.

Do you mean config folder location? If so, it works well, since it starts. But crashes with error, because cannot find folder, because path is for different system

@st3p, do you mean you have a dual boot system and want to use the same Syncthing configuration for both OS?

Yes. So that when I change something one of them, changes will be automatically reflected in other one

I don’t think this will work because they have different file systems and paths. Also the Syncthing database stores information about files and folders so even if you adjust config.xml at startup via a script the information in the database could still be wrong.

Maybe it is better to set up Syncthing on the system you use more often. Or set up Syncthing twice and sync two “devices” (one for Windows, one for Linux) with your other device(s)

You need to have everything, i.e. both the config, the database, and the folders, set up with relative paths.

For example:

  1. Place both syncthing.exe (Windows executable) and syncthing (Linux binary) in the same folder called Syncthing.

  2. Start Syncthing from that folder using syncthing.exe -home=.\files in Windows, and syncthing -home=./files in Linux.

  3. Use relative paths for your folders, e.g. image.

This way, you will have a portable installation with a folder structure resembling

Syncthing
    files
        index-v0.14.0.db
        cert.pem
        config.xml
        csrftokens.txt
        https-cert.pem
        https-key.pem
        key.pem
    Sync
    syncthing
    syncthing.exe

which you can move around and run Syncthing from it wherever you like between Windows and Linux.

Also, just a disclaimer, but please do not use your real data while experimenting with this.

Thank you for help, thats a good idea, but it will not work for me since my data and SyncThing clients are on different drives.

It might be easier to have a third device that has syncthing running permanently on it, and just access the files on that device via a network share. Or run linux in a vm inside Windows and mount a windows folder in the linux vm (or vice versa). My $0.02 of alternatives.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.