Setup a Syncthing service on Debian

Install via the APT instructions.

Next (source):

useradd -u 1010 -c "Syncthing Service" -d /var/syncthing -s /usr/sbin/nologin syncthing
mkdir /var/syncthing
chown -R syncthing:syncthing /var/syncthing
chmod 700 /var/syncthing
systemctl enable syncthing@syncthing.service
systemctl start syncthing@syncthing.service
systemctl status syncthing@syncthing.service

Then you should be able to connect to the web GUI at localhost:8385.

To allow this user to read files outside it's own directories, use

getfacl /some/other/dir

from acl (apt-get install acl) to view the permissions.

Next, the following gives Syncthing permissions:

sudo setfacl --recursive --modify u:syncthing:rwx /some/other/dir

To test the permissions, use

sudo -u syncthing bash -c "cd /some/other/dir && touch testfile && rm testfile && echo 'SUCCESS: Can write'"

If this doesn't work, then also setfacl for the parent dir of /some/other/dir.