[Syncthing] multi-user?

My YunoHost server

Hardware: Raspberry Pi at home
YunoHost version: 4.2.6.1 stable
I have access to my server : Through SSH | through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Description of my issue

Hi all,
I’ve been using YNH for more than a year now, and I love the experience!
I’ve tried various cloud services, but I find Nextcloud a bit too slow and feature-full for my taste, and seafile’s clients are somewhat of a pain to use, IMHO.
I thus turned to Syncthing, willing to adjust a cloud-ish service for file synchronsation and relying on other services (Piwigo, Navidrome, …) to browse sync’ed files.

However, I am struggling to find an elegant way of handling multi-users with syncthing. Syncthing and multi-user support appears to be a common request. The situation now on YNH is that one or all users can access Syncthing’s Web GUI, allowing to sync folders, add devices etc.
However, I’d like things to be a little more separated, with users identifying and being redirected to their own portion of the service, with their files and their files only.

The most common solution offered is that each user runs their own instance of syncthing, which does not seem to be possible on YNH, as only a single install is offered.
I’ve also come across the WikiSuite team, which has apparently solved this with a plugin (but I do not know the details of the implementation).

Anyway, This would be a great add-on to Syncthing, in my opinion. For the moment I will hack something that ‘just works’ for the small number of users on my server, but let me know if you have any suggestions, ideas and such on the matter!

Thanks again for the great service you provide guys!
Cheers

I have just tried manually allowing multiple installs of Synthing, and it seems to be working. :partying_face: I will open a PR to have it tested a bit further: Enable multi_instance by tituspijean · Pull Request #82 · YunoHost-Apps/syncthing_ynh · GitHub

If you want to try it: yunohost app install https://github.com/YunoHost-Apps/syncthing_ynh/tree/multi_instance -l LABEL
(I advise you to give them a relevant LABEL if you have multiple users, otherwise it will get quite confusing in the admin panel, with apps named syncthing, syncthing__2, syncthing__3, etc.)

3 Likes

Hi,
thanks for the quick response! I will try it right away!

Yup, it works like a charm, awesome! This will work just fine for a small number of users (I guess having dozens of syncthing instances running can create quite a load on the system).
In case anyone else wants to try it, here is what I did:

  • For each user that wants to use syncthing, run yunohost app install https://github.com/YunoHost-Apps/syncthing_ynh/tree/multi_instance -l LABEL with label syncthing_USER for example.
  • In the groups and permissions panel, allow access to syncthing_USER only to the relevant user.
  • Voilà! You can then add USER to the group syncthing (or syncthing__2 or whatever the app ID is) to allow an easier workflow.

Cheers

1 Like

@etienne, a bit of a warning following the discussion at Enable multi_instance by tituspijean · Pull Request #82 · YunoHost-Apps/syncthing_ynh · GitHub.

If more than one instance of Syncthing is on the same server, then only one will be able to connect smoothly (due to port 22000 clashing). The other ones will pass through a relay server, inducing some poorer performance.

And this hack is pretty clever, but would be cumbersome to implement I guess.

Nevermind, if we specify the actual port in <listenAddress> it works directly, without relying on relay servers.

1 Like

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