How to set up an alternate syncthing configuration

Apologies if this is already described somewhere. I have syncthing running as a service on 2 non-encrypted Windows 11 machines and it’s working well with multiple folders.

I’d like to also be able sync 2 encrypted Veracrypt partitions, when they are both mounted. To avoid possible leaks of keys and metadata it might be best to put an entirely different configuration with a different home folder on the encrypted drive and start a new syncthing instance from there. I don’t mind shutting down the original instance first.

Is that possible? If so, what’s the best way to create the new config files and keys?

I’m hardly an expert, but I would probably do this:

  1. Run Syncthing as you are now, and stop it when you’re ready to sync the two encrypted partitions

  2. Start Syncthing with one of these options for command line arguments:

(A)

–home=

Or (B)

–config= –data=

You must use both config and data CLI arguments if you use one of them.

Details here: Syncthing — Syncthing documentation

  1. I would then write a quick script wrapper to confirm that the primary Syncthing instance was not running before running the second instance, and use that. Then another script wrapper to confirm that the second instance is dead before running the first instance.

Alternatively, you could run both instances simultaneously if you configured the second instance to use different ports.

2 Likes

Thanks for the advice. I’m having problems getting syncthing to start. It did work once before and it created new keys and config but I have no idea what I did differently!

C:\Users\daveb>“C:\Program Files\Syncthing\syncthing.exe” –home=“V:\Syncthing” syncthing.exe: error: unexpected argument –home=V:\Syncthing

1 Like

It may be due to the forum’s formatting, but you’ve got (dash) in your code while it should be just - (minus sign) there. The same goes for quotes which should be just "" and not the fancy ones.

2 Likes

That was it thanks!

Must have been the forum since I didn’t type funny double quotes and I only used notepad and command prompt. The forum must have also broken chaos’ original reply.

Thanks again, it’s working perfectly now. I decided to go with a different GUI listening port, meaning I don’t have to shut down the existing service.

I launch it with a simple one-line batch file and the fact that the command prompt stays open is a nice reminder to shut it down before dismounting the drives.

In addition to the GUI listen address, I also needed to change the sync listen addresses to avoid conflictes there.

1 Like

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