How to check programmatically whether the syncthing server is running, on Windows? / Where can I get syncthing-cli?

Apparently I need the syncthing-cli tool (which for Windows, right? It is Windows I’m asking about; I’ve found a way to check the status using Bash, so my Linux machines are catered for). But, where can I get syncthing-cli? I can’t find the file on my system and neither can I find somewhere to download the file.

Thanks.

I suppose he’s referring to https://git.dtluna.net/dtluna/syncthing-cli/releases because the client found within the GitHub organization isn’t maintained anymore.

There’s also syncthingctl which has binaries for Windows as well: https://github.com/Martchus/syncthingtray/releases

Maintained or not it might work, there are builds here: https://build.syncthing.net/viewLog.html?buildId=53303&buildTypeId=Syncthing_Tools&tab=artifacts&branch_Syncthing=<default>

Thanks both. I’ll try the latest x86 version from https://github.com/Martchus/syncthingtray/releases.

Could I get some help with the CLI please? Both

syncthingctl status

and

syncthingctl status --config-file C:\Users\<my user name>\AppData\Local\Syncthing\config.xml

hang, even when I disable my firewall; and that port number is right for my system.

Unfortunately I can only say it works on my computer. I’ve been trying mintty and cmd.exe under a recent Windows 10. Both commands - the automatic detection of the config file and specifying it manually - work.

Of course it will wait until a timeout is reached if the instance isn’t available but then you’ll get Connection timed out. Unfortunately there’s currently no way to specify the timeout and I’m not even sure where the default comes from. I’ll add a way to configure the timeout but for now it is maybe better to use one of the other tools.

By the way, you know that you can run scripts on Windows, too (and even Bash scripts e.g. using MSYS2)? Because checking the availability is really just an HTTP call so it makes actually sense to keep it simple.

Thanks, Martchus.

I’m running syncthingctl status again and I’ll leave it for a long time to see whether it times out, in case I can learn anything from any error message.

As to running a Bash script, I’m afraid I don’t see how using an emulator fits with your recommendation to keep things simple! As to just using any form of script: well, yes, the plan was to put syncthingctl status into a batch file run by Rainmeter (which, of you don’t know it, but do know conky, is a kind of conky for Windows). But perhaps I misunderstand you on some point(s).

PS: The command has been running in a terminal for five minutes now and still not stopped.

You could try the cli calmh suggested. In theory that should work too.

Bash under Windows does not need an emulator. It is using a compatibility layer but that’s just a library like any other dependency.

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