How do I run multiple syncthing processes on the same machine?

I’ve used syncthing for a few years now. I have a NAS in my home network and I host Syncthing for myself and some members of my family. Currently I have a separate lightweight Ubuntu VM for each member of my family running their instance of Syncthing. I would like to do this all from a single VM if I can.

I follow this guide: https://computingforgeeks.com/how-to-install-and-use-syncthing-on-ubuntu/ to set it up and that works fine, but I’m not sure how I would run another syncthing process. I get that I’ll have to run each instance on a separate port, but I’m confused if I need to install Syncthing multiple times, or if I just create separate systemd service files? Do I create multiple linux level user accounts and configure it that way?

I guess I’m just curious what the simplest or least complex way to do this would be.

Any tips? Greatly appreciated!

You should just be able to run each instance using a separate home folder, e.g.

syncthing --home=<full-path-to-a-folder>

and then change the ports under a few other settings (e.g. see https://forum.syncthing.net/t/best-fodlertype-settings-master-slaves-clients/19517/6).

Personally, I’d try run all that under the same account and avoid completely separate installations if possible, especially if the OS is responsible for the updates anyway. Not an expert here, but this would probably correspond to “creating separate systemd service files” if that’s how you start Syncthing right now.

Given the usage scenario, the least complex method would be to configure a single instance of Syncthing in your Ubuntu VM with a consistent Syncthing folder naming scheme for every incoming folder.

One of the things I would recommend doing differently from the tutorial you mentioned, is to use a systemd user service instead of a system service.

Please see the following earlier posts where I describe a single instance setup for multiple users and using a systemd user service instead of a system service: