macos - API key and URL when provisioning a remote syncthing

Hi!

I’m new here and would very much appreciate some help with macos.

My need is to be able to distribute changes from a folder on my Windows 10 computer running SyncTrayzor to many other remote users, some of whom will be mac (setting up over an AnyDesk remote support connection).

I have successfully trialled this on a remote Windows computer installing SyncTrayzor for them over an AnyDesk remote support connection (send only at my end and receive only at their end).

I have no mac to practice on and I won’t be able to spend ages playing around on someone else’s mac, so I’m attempting to work out in advance what to do.

I can see how to install the .dmg and that syncthing will appear in a browser window, but the thing that’s confusing to me is this ‘necessary configuration’ line from the macos installation guide:

To install just download the dmg, mount it and drag and drop the application to install. The only necessary configuration is to set the API key and URL when provisioning a remote syncthing instance,

I’ve searched Google, YouTube, Reddit and this forum but can find no info on what this means or how to find an API key and URL!

Any help or resources would be very much appreciated :slight_smile:

Thank you

I am not sure what guide you are referring to, but I believe it refers to the setup of a remote GUI.

Syncthing is generally controlled via its inbuild webinterface. By default this webinterface is only reachable from the local machine (where syncthing is running). It is however perfectly possible to setup the webinterface to also accept remote connections (from a VPN, from the internet, from space).

If you want to do that, there are indeed a few steps to be taken:

  • Authentication - a remotely reachable webinterface should have at least username + password access protection. Syncthing offers this as an inbuild feature, can be configured from the GUI.
  • Confidentiality - a remotely reachable webinterface should have an encrypted connection. You might do this via a VPN connection, or by enabling TLS in the GUI.
  • Configuring the GUI to be actually reachable for external connections. This requires the GUI listen address to be changed. I believe this is what the URL configuration refers to. Reaching the GUI from external may also require network configuration (VPN, port forwardings, dynamic DNS, firewall… - varies per network).
  • Syncthing also offers/uses authentication via an API key instead of username + password. This method is commonly used by tools scripting access to syncthing. The current API key can be checked and changed via the webinterface (Actions → Settings → General → API Key). I believe this what the API key configuration refers to.

Now, depending on your use-case you might not need any of this. If you have the capability to remotely login into the machine, you can access the syncthing GUI from “local” (relayed to you via the remote login session), hence the defaults will work just fine. The above setup would enable you to connect to a remote syncthing webinterface without using any remote login session.

PS: I think I found the paragraph:

To install just download the dmg, mount it and drag and drop the application to install. The only necessary configuration is to set the API key and URL when provisioning a remote syncthing instance, the local instance is auto-configured. The syncthing-macos application bundle disables the auto-updater of syncthing as it has its own update mechanism using Sparkle.

(As mentioned earlier, this talks about reaching a GUI which is not on the same machine as the syncthing-macos application. In your case both syncthing-macos and syncthing are on the same machine and hence local by definition)

PPS: Also to make this explicitly clear: syncthing-macos is a wrapper around syncthing, it is a separate application from syncthing - not syncthing itself. It does bundle syncthing on install. Its purpose is to make running and managing syncthing more comfortable, but you can also just run syncthing directly on macOS (though you then probably need to think about things like autostarting and whatnot, so the wrappers are often more suitable for the average user).

1 Like

Wow! What a comprehensive answer, many thanks Nummer378.

I would never have been able to work all that out without your help. I think the guide could do with updating to clarify the whole API/URL thing…

Just to be clear the syncthing-macos guide is here: https://github.com/syncthing/syncthing-macos#installation and it looks like you found that ok.

So, if I’ve understood correctly:

  1. I can just ignore the whole API/URL thing because I can log into the mac remotely on AnyDesk without needing to view the Syncthing page remotely. But thank you for those steps; they would be extremely helpful to anyone wanting to view the page remotely. Perhaps the guide could be updated (I went on a long and frustrating wild goose chase because of this!)

  2. Once syncthing-macos is installed on the mac I will be able to set up the connection over AnyDesk remote connection using my own 56 digit id in exactly the same way as I’m already familiar with on a Windows remote connection

And thanks for clarifying that syncthing-macos is a synching wrapper - I’d worked that one out, it’s the same as Synctrayzor in that respect.

Anyway, thanks again for your detailed and respectful reply to this total noob!

2 Likes

I have never used syncthing-macos myself (I don’t own any Apple machines), so someone else who knows the wrapper needs to confirm this, but I would just say yes.

I presume that the API/URL popup (shown in the README screenshot) either:

  • Doesn’t show up at all when just running everything locally
  • Is automatic/prefilled with the correct settings for the local syncthing instance

Barring any oddities I am not aware of, yes. Syncthing’s default settings are designed to enable this.

Thanks again - that all makes sense, and looks like it should be straightforward. If I get stuck, I’ll be back!

1 Like

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