Technotes for future me


Setting up a Syncthing Relay on Ubuntu Linux


What is syncthing-relaysrv

syncthing-relaysrv is:

Syncthing is an application that lets you synchronize your files across multiple devices. This means the creation, modification or deletion of files on one machine will automatically be replicated to your other devices. Syncthing does not upload your data to the cloud but exchanges your data across your machines as soon as they are online at the same time.

Syncthing relies on a network of community-contributed relay servers. Anyone can run a relay server, and it will automatically join the relay pool and be available to Syncthing users.

This package contains the relay server binary: strelaysrv.

Installing syncthing-relaysrv

sudo curl -o /usr/share/keyrings/syncthing-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list
sudo apt-get update
apt install syncthing-relaysrv

Create directory for certificates

sudo mkdir /etc/strelaysrv
sudo chown syncthing-relaysrv:syncthing /etc/strelaysrv

Create systemd script

vi /etc/systemd/system/strelaysrv.service
Description=Syncthing Relay Daemon

ExecStart=/usr/bin/strelaysrv -keys=/etc/strelaysrv -provided-by='blaataaps syncthing server'


Enable and start strelaysrv

systemctl daemon-reload
systemctl enable strelaysrv.service
systemctl start strelaysrv.service
systemctl status strelaysrv.service

You should then see your syncthing relay pop up on here after a short time:

More information can be found here and here

Last updated on 22 Nov 2022
Published on 16 Nov 2022
Edit on GitHub