How to inform devices about exposed service? [SOLVED]


I am starting with syncthing and managed to synchronize between my Linux server and a Windows client.

After these tests, I exposed port tcp/22000 of the server on Internet with the expectation that my client will now use this feature to directly connect to the server. However I still see in the client’s log

[FQ7Z7] 23:33:20 INFO: Established secure connection to QW7UQ5N at (relay-client) (TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305)
[FQ7Z7] 23:33:20 INFO: Device QW7UQ5N client is "syncthing v0.14.36" named "syncthing"
[FQ7Z7] 23:33:24 INFO: Joined relay relay://

if I read it correctly, my devices (the server and the client) still communicate via a relay.

How can I reset this information? It may be that upon the initial setup of the relationship, the client was set to contact the server via a relay (wildly guessing).

The port of the server is correctly exposed on Internet


I ALSO rebooted both the server and the client after the exposition of the port expecting the devices to agree on a direct connection instead of via a relay.

The documentation suggests that

Relaying is enabled by default but will only be used if two devices are unable to communicate directly with each other. When connected via a relay, Syncthing will periodically retry a direct connection and, if one is established, stop communicating via the relay.

but this does not seem to actually happen?

You don’t need to expose anything. If the port you mapped on the NAT is the same as the port it’s listening on the internal network, it should just work.

Discovery and other things have a 30 or so minute cache, so you might just need to give it some time.

The client is on another network and they communicate via Internet only.

Ah OK, I will wait then. I guess that the switch should be visible in the logs?

OK, the logs show that the relay connection was replaced with the direct one.

Thank you for the help!

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