friction-free config?

Hello all. I’m looking for a way to have a “not at all computer minded”-person join a syncthing setup.

Ideally the remote devices/introducers and folders should already be loaded in the setup process, offering the least opportunities for wrong input or user confusion.

For example, teamviewer has a “single click” system where the config is bundled and the whole thing starts simply by doubleclicking the resulting exe.

Is this a solved problem? Are there any pointers for me to try to build such a thing? Am I a fool?

Thanks in advance!

Aren’t we all? :smiley:

This has come up before, so you should be able to find more info here on the forum. Off the top of my head:

Config managers may be of use (though maybe overkill): Community Contributions — Syncthing v1 documentation

Also Arigi (https://www.kastelo.net/arigi/), which is geared towards large setups but might work for you (and is free to use for up to 5 devices).

And in the end the config is just a simple xml file: If adding a peer only occurs infrequently you can just prepare that file by hand and tell the user to copy it to the right place and you are done.

1 Like

You can probably ship a zip file with the executable, a config skeleton that sets your mothership device as introducer+auto accept folders, and a powershell or bat file to start/install. Might require some engineering though, so not a solved problem per se… (Might be a nice open source project to create a “builder” for such bundles though.)

1 Like

The config xml does have to be unique on every instance, so I imagine a utility that edits and injects in file is needed. I’m more of a unix guy, and the people I want to “target” are mainly windows users (photography enthousiasts) so there’s that bridge to cross.

It does not need to be unique.

Forgive me, I may have spent less time on this than I should have before replying.

What I meant is there is a default folder which points to the users’ c:\users\nameofuser\Sync, and there is the own device in the config. Sadly I don’t know enough go to create a supporting config utility, I will do an attempt in python instead.

You can ship the XML without the default folder. If you don’t ship the key and cert they are created on first start. If the XML doesn’t have a device entry matching the key/cert, it will be created too (IIRC).

1 Like

Exactly

Also, you can use ~ to refer to the user home directory, even on Windows.

Well I’m using a MSI that bundles syncthing stock files and a batch file to create a fresh default config with relay disabled. If I need our corporate server “auto configured” I can change the MSI filename and batch file will pick up the device ID, ip address and port from there to auto-add and trust the company server on first installation or upgrade. I’m building the MSI with wix toolset and a batch script, so its reproducible. Only problem for some people might be: the web ui password. I’ve defaulted the web ui to listen locally with no password and the MSI creating a disabled windows service. That way I ensure, an admin needs to set 0.0.0.0 listen address and ui password first before turning the service to autostart with the system. Btw it’s a system service. I would be fine to contribute if anyone has interest. Just didn’t make it to that point before because I thought some might counter the MSI packaging with the two arguments: uhhh, a system service or ahhh, what if some one enables this via group policy accidentally and corporate data gets exposed because he forgot to set a ui password. Ideas welcome :wink:

1 Like

Catfriend1: that would certainly be interesting, at the very least it’s something to build on top off.

Regarding the password situation, I don’t think there is an easy answer, but the situation wouldn’t be unique to syncthing.

1 Like

@MMM Please see my “share existing work” post.

Forum: [DRAFT] How to build a Syncthing MSI package for distribution

GitHub: https://github.com/Catfriend1/syncthing-msi/releases/tag/v1.4.0

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