Multiple SyncThing app instances with "host networking"

Hi everybody,

i have issues running multiple instances of SyncThing on the same TrueNAS Scale machine. One of my use cases: i run SyncThing on all mobile phones for the whole family to dump all photos to my home server. Every user should have a dedicated SyncThing instance - the photos are dropped with user permissions and rights in the respective home directories, accessible from both linux and windows client PCs.

Running multiple instances is no big deal by changing the ports (TCP / UDP / WebGUI) in the app settings to unique values - unfortunately syncthing also uses broadcasts in the local network which don’t work with k3s networking (or at least i did not get them to work).

Setting the app to “host network” allows to configure the Web GUI port, but (other than the container network settings) does not allow for the service port(s) to be configured, the exposed port is hardcoded to 20.000 and thus preventing multiple instances from being startet :confused:

Is there a way to work around this issue? Working without broadcasts is possible, but a bit uncomfortable for multiple devices and multiple users.

Thanks a lot!
Martin

You could setup a separate instance of syncthing in a sandbox (or three)

It won’t use k3s so may have success.

TrueNAS Scale: Setting up Sandboxes with Jailmaker

Just read about the upcoming migration to docker / docker compose - that’s a nice development and will replace my current lxc / portainer configuration. Thanks a lot!

I’ll test run the jailmaker part for “non-productive” use in the home lab :slight_smile:

If you run the underlying container, syncthing from docker hub in a Scale custom app, which will port over to the next version of Scale which will use docker, you can assign every syncthing instance it’s own IP and/or port if you wish.