SyncThing does what OneDrive & Google Drive can do but under your control, across your machines, with more options, and without having to touch a 3rd party data snooping provider and without having to pay 3rd party Terabyte rates. I use it on my home network both to synchronise configuration across multiple machines and as an at-home backup solution. It's fast, simple, well-maintained and it works.
NSSM is “the Non-Sucking Service Manager” which has a simple GUI to set up commandline programs like
SyncThing as a Windows Service.
To use SyncThing as a Service, avoid the GUI options such as SyncTrayzor and go for the GitHub download. Choose a directory to install to, such as your
Program Files directory.
SyncTrayzor is great for your working machine, where you only need SyncThing to run when you are logged in. For a server which is hosting backups and redundant copies of your files, you want a Windows service running whenever the machine is up.
NSSM also has no installer as of early 2020. Download & extract to a
Program Files directory.
I then added
New-Alias nssm "C:\Program Files\nssm-2\win64\nssm.exe" to my PowerShell profile
nssm without parameters will show you the commands you can use. The simplest is to use install & edit to get the GUI:
To show service installation GUI:
nssm install [<servicename>]
To show service editing GUI:
nssm edit <servicename>
nssm install SyncThing
And then fill in the boxes by finding the path where you installed SyncThing. I only edited the first three tabs: Application, Details, and Log On. The rest can stay as default.
What about the Parameters? See the SyncThing Docs. This is mine:
-no-console -no-browser -no-restart -gui-address=localhost:8384
-no-console -no-browser are because services run headless.
-no-restart because the Windows Service infrastructure has options for handling restarts.
-gui-address=localhost:8384 to make the gui console only available on localhost, not across the network. You may not want this.
You can now use
nssm to start/stop/monitor services, not just the ones you have installed with it.
nssm start SyncThing
nssm status SyncThing
Or, you can use the standard Windows Services gui.
Where is the config?
Nssm just edits the Windows service config, which is visible in the Local Services app, which you can launch from Task Manager -> Services
SyncThing keeps config in the place noted in SyncThing Docs unless you add e.g.
-home=D:\MyPath to the startup parameters
Where is the SyncThing Gui?
If you followed my example and used
-gui-address=localhost:8384 then open that address in your browser and read all about at https://docs.syncthing.net/intro/gui.html
Yes but I want to manage it across my home network?
- Change the startup options to use
- Add the full path to SyncThing.exe as a firewall exception in your Windows firewall.
- Restart the service
This will make the browser interface accessible across the network. Then:
- Open the the GUI at localhost:8384.
- Open the Settings (under the
Actionsmenu, top right).
- Open the GUI panel.
- Choose HTTPS
- Add a username and password. NB I think these are both case sensitive.