Multiple users : some kind of mismatch

Hi,

Using Syncthing for years now and well I don’t ask often things here because it just works.

So I am almost glad to ask for some help today :wink:

Here is a « new » situation for me.

One computer ( running Ubuntu Budgie 20.04 ) and 3 users, A, B, C Those users don’t share folders through SyncThing with each others. But each one of this user share folders with other computers - so they all have their own ~/.config/syncthing.

My problem.

For user C, no problem : each time he launches web UI, it leads to 127.0.0.1:37243 For user A and B, problem : for both users, web UI leads to 127.0.0.1:8384 therefore if session for A is already open with active Syncthing, B will see A’s Syncthing shares and not his owns ( and vice-versa, depending of who first opened a session ).

This also means it’s ok as long as only one user out of A and B is logged in to his session.

But as you guess, we need to be able to switch from A, B or C seamlessly.

I’ve checked this

but it works exactly the same, with or without -home=/path_to/each_user/.config/syncthing

So I wonder how / where I may assign a different address for each user, as mentioned in help . Do I only need to change that port « manually » for each user ? And only once ? Any downsides ? How do I check « availability » of ports ?

The strange thing here is I have other computers with « multi-users » ( *buntu and windows ) but on these, webUI may lead for one user to …:8384 but all other users are led to something else like …:37XXY

So I guess I forget something during first configuration of Syncthing… Or maybe it’s related to some of these shares being many years old and some other recent, later added ?

I also read some lines about SyncThing as a service in systemd but am not at all « educated » about those…

So, any suggestions and highlights very welcome. I have permanent physical access to that machine so if you need some logs or commands outputs, let me know.

You can change the web UI to listen on which port you like, in the config.xml for a given user.

Syncthing will use :8384 (and write that to the config) if it’s free when it starts up the first time (when it creates the config). If :8384 is taken when it starts up the first time it will use another random port and write that to the config.

1 Like

Ok, thanks, sounds easy, there ↓

    <gui enabled="true" tls="false" debugging="false">
        <address>127.0.0.1:37243</address>

Now sorry for my ignorance but how may I know which ports are available ( or busy ) between 1024 and 65535 ? netstat ?

Ok statistically speaking I have a good opportunity to pick up an available one, but one should not rely on luck.

This also explains what happened : first created user was probably A. Second one was C. So C get 127.0.0.1:37243. When I created the third one B, none of the other users was logged in so …:8384 « looked » free for SyncThing at that moment. Isn’t it a bit fragile ?


ok, ok, thanks again @calmh all fixed by assigning a port per user in each config.xml

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