Syscthing on Alpine Linux

Recently I switched from Archlinux to Alpinelinux from being more lightweight for my “RasPi2B”. I am using syncthing only, on my “RasPi2B”. I have download syncthing edge comunity pakage maintained by Natanael Copa

but there are 3 packages which are related to syncthing

  +--maybe documaentation
  +--is holding services
syncthing-utils (What is this package)

what is syncthing-utils package? what are stdiscosrv, strelaypoolsrv, strelaysrv? I am a normal user, do I need syncthing-utils packages? Please explain?

@bt90 @gadget

You might not need the syncthing-openrc package depending on how you want to launch Syncthing. OpenRC is an alternative init system for handling services. It’s lighter than others such as systemd.

Since for security reasons it’s generally recommended to run network services under normal user accounts whenever possible, it’s often less complicated to use a cron job like so:

@reboot /usr/bin/syncthing --no-browser

But it really depends on the particular use case (I sometimes use a cron job, other times I use systemd).

See Syncthing’s Starting Syncthing Automatically page for additional tips.

If you’re fine with using the publicly accessible Syncthing discovery and relay servers, you don’t need the syncthing-utils package.

Syncthing will automatically try connecting to a public discovery server, and when necessary, a public relay server.

The Syncthing documentation pages you linked to offer a better explanation, but…

Think of a discovery server like a phone book where Syncthing devices register themselves and also attempt to look up the IP addresses of other Syncthing devices they are each trying to connect to.

Without the discovery servers, you would have to manually enter the IP addresses for each device you wanted to sync with. And whenever an IP address changes, you would have to manually update your Syncthing settings again.

A relay server acts like a liaison when two Syncthing devices are unable to directly connect to each other due to firewall settings, NAT, and/or other restrictions, but each device is able to connect to a public Syncthing relay server. So device A sends a packet to the relay server, which in turn sends it to device B. Device B sends a packet to the relay server which in turn sends it to device A. The process repeats for every packet that needs to be exchanged between A and B (the reason why relays are used only as a last resort).


Alpine Linux uses OpenRC as its init system. systemd isn’t an option on Alpine. So if you want your init system to launch Syncthing, you can use the syncthing-openrc package (which should be installed automatically when you have both syncthing and openrc installed), then run this command as root:

rc-update add syncthing

Now OpenRC will start Syncthing on every boot.

There is more documentation about how to use OpenRC on Alpine’s wiki: OpenRC - Alpine Linux

Since for security reasons it’s generally recommended to run network services under normal user accounts whenever possible

All of this is still true on Alpine (though Alpine’s OpenRC service runs Syncthing as an unprivileged user called syncthing). You can use cron, Supervisord, or any of the other strategies mentioned in Syncthing’s docs.