How to setup a private relay server and how to edit the config

I tried to setup a private relay server based on Ubuntu using the latest ‘syncthing’ version and of course with settings like ‘do not join the public pool ; listen to a certain IPV4 and IPV6 ; and port and and a certain secret token.

I partly managed. However I did not find any proper description about how to setup such an relay and could not find any thing related to the relay related config file and GUI :weary_face:

I toke the following steps partly based on https://apt.syncthing.net :

  • installed and updated Ubuntu LTS
  • added the release PGP keys
  • added the stable-v2" channel to your APT sources
  • Increase preference of Syncthing’s packages (“pinning”)
  • sudo apt install syncthing-relaysrv

That action did install the relay (v.2.03) and did create a user `syncthing-relaysrv’

However … no idea to define and maintain the parameters related to the relay.

I absolutely do not want the server to be added to the public pool and I also want to change other settings.

I tried things like systemctl start syncthing-relaysrv -pool=“”

I managed to start the relay, but it tried to add to the public pool. I think it did not manage due to my firewall … shit …

What ever the big big question is how to configure the relay:

  • even before the first start and
  • where is the relay config file
  • where is the relay gui
  • etc

Have you tried following the instructions from https://docs.syncthing.net/users/strelaysrv? At least some of your questions, e.g. how not to add the relay to the global pool, are answered there. I can tell you right now though that there is no config file or GUI, meaning that you need to pass all the parameters via the command line.

If you’re interested, I’m linking to my experience with setting up and running a relay server on an old Android phone (see https://forum.syncthing.net/t/errors-when-trying-to-run-strelaysrv-for-the-first-time/16818). I did have some issues with the router, etc. but I did eventually manage to set the server up successfully. Hopefully some of the details from the struggle could be helpful from a more beginner-friendly perspective (whom I definitely was back then :sweat_smile:).

I have to test and try a lot before I have it working, I fear, however … I found the config file after searching using find etc

The config file is ^/etc/default/syncthing-relaysrv^

I changed NAT=true => NAT=false

And added some parameters RELAYSRV_OPTS=-pools=“” -ext-address=:22xxx -provided-by=“me” -token=