This covers setting up SyncThing on Ubunty/Debian
$ sudo apt-install syncthing
Add a systemd file for each instance of syncthing.
sudo systemclt enable syncthing@alice
sudo systemctl enable syncting@bob
The ports must be configured manually. Starting the service will create all the necessary configuration files for the next step
sudo systemclt start syncthing@alice
sudo systemctl stop syncthing@alice
sudo systemctl start syncthing@bob
sudo systemctl stop syncthing@alice
Set up each user's address ~/.config/syncthing/config.xml
to match the following. Increment the port number (8384, 8385, 838n) for each user. Each user must have a unique port number. Use the address 0.0.0.0
to make the web gui accessible on the local network.
<gui enabled="true" tls="false" debugging="false">
<address>0.0.0.0:8385</address>
<apikey>abc123</apikey>
<theme>default</theme>
</gui>
This covers setting up SyncThing for multiple users on MacOS
$ brew install syncthing
Enable syncthing for the current user by following the directions in homebrew.
Copy /opt/Cellar/SyncThing/xx.yy.zz/homebrew.mxcl.syncthing.plist
to ~/Library/LaunchAgents/homebrew.mxcl.syncthing.plist
for each user.
Edit homebrew.mxcl.syncthing.plist
and change the logging paths to /tmp/syncthing_username.log
for each user
Set up each user's address ~/Library/Application Support/Syncthing/config.xml
to match the following. Increment the port number (8384, 8385, 838n) for each user. Each user must have a unique port number. Use the address 0.0.0.0
to make the web gui accessible on the local network.
<gui enabled="true" tls="false" debugging="false">
<address>0.0.0.0:8385</address>
<apikey>abc123</apikey>
<theme>default</theme>
</gui>
As each user, load the homebrew.mxcl.syncthing.plist
agent using launchctl load ~/Library/LaunchAgents/homebrew.mxcl.syncthing.plist
Configure syncthing as needed from the GUI by browsing to https://localhost:PORTNUMBER
I was trying to play with the service arguments to be able to specify the
username
andguiport
along with the service name. I didn't succeed yet, but I'm sharing my attempt here.The aim is to be able to do
systemctl start syncthing@bob,3318
and inside the service file we have:
Of course
Environment=
does not run thecut
command.Any ideas?