I don’t use SyncThing but I’ve been hosting a relay server at home as I have a fast Google Fiber connection I want to better utilize and already have a server running for other purposes. My question is how safe is it to run a relay server? If someone is sending potentially illegal content over SyncThing could that somehow impact me? I’m happy to continue running this relay to do a little good in the world but I want to make I’m not assuming some unneeded liability.
Also, more on a technical level, how safe is it to have the relay software on my network? Currently, I run it in a separate VM that I have isolated on a VLAN with no access to my personal network. So I don’t suspect there’s any concern. I just want to know what measures are being taken by the relay developers to prevent it being abused and creating an entry point into my network.
Incoming and outgoing connections are encrypted so it’s not possible to check for law enforcement what is being transfered. The connections are also established between two Syncthing nodes which have to be configured to trust each other which also renders any man-in-the-middle attack useless.
Security wise it depends on the relay binary to properly handle input. Worst case scenario would be that an attacker is able to abuse a bug to inject his own code into the relay server. That’s also the reason why the docs encourage to create an unprivileged user to run the daemon in order to migitate the impact of such an attack. This might sound scarry but it is the same attack surface that any publicly available service has.
tl;dr follow the docs, keep your software updated and you can run a relay without much worrying
Additional security related things maybe worth highlighting:
The relay server itself is written in Go, a memory safe language. This does not mean that exploits are impossible in Go written programs, but memory safe programs are generally harder to exploit.
The architecture of the relay server is designed in a way that only allows inbound connections, e.g the relay server itself does not establish any outbound connections [except to a management server]. This means that arbitrary users cannot use the relay server as a generic proxy, e.g to attack others (or your network).
The protocol (and its specification) used by the relay server is open source and theoretically anyone can use this protocol to relay other services (other than syncthing) via a relay server. However, it is still required that both parties actively connect to the relay server and technically there’s not much difference to relaying syncthing connections.
Legal aspects of running a relay server can vary by country and local laws. If you have concerns that relaying can be illegal in your country, it’s probably best to consult your lawyer, as we cannot give advice here. Technically a relay server behaves similar to a router located in a transit net - it receives data from a source and sends it to another. It does not know anything about the data (and in the case of syncthing, this is technically not possible due to encryption).