Skip to content

Instantly share code, notes, and snippets.

@thcipriani
Last active July 1, 2021 17:45
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thcipriani/b98e343530130575fe2a to your computer and use it in GitHub Desktop.
Save thcipriani/b98e343530130575fe2a to your computer and use it in GitHub Desktop.
Syncthing on Synology DS215j

Syncthing on Synology DS215j

Grab Syncthing Binary and upload to DS215j

Follow instructions on the Syncthing Security Page to download and verify release

  1. Get the latest Syncthing release from their Releases Page
curl -sLO https://github.com/syncthing/syncthing/releases/download/v0.12.19/sha256sum.txt.asc
curl -sLO https://github.com/syncthing/syncthing/releases/download/v0.12.19/syncthing-linux-arm-v0.12.19.tar.gz
  1. Verify that the SHA256 checksum is correct for the release. You should see the same output as below. If not, try downloading again later, you’ve got a file that doesn’t match the released checksum.
$ sha256sum -c sha256sum.txt.asc 2>/dev/null  | grep syncthing-linux-arm-v0.12.19.tar.gz 
syncthing-linux-arm-v0.12.19.tar.gz: OK
  1. Import the release keys (only necessary if you haven’t done this previously).
~
(ノ^ヮ^)ノ*:・゚✧ gpg --keyserver pool.sks-keyservers.net --recv-key 49F5AEC0BCE524C7 D26E6ED000654A3E
gpg: requesting key BCE524C7 from hkp server pool.sks-keyservers.net
gpg: requesting key 00654A3E from hkp server pool.sks-keyservers.net
gpg: key BCE524C7: public key "Jakob Borg (calmh) <jakob@nym.se>" imported
gpg: key 00654A3E: public key "Syncthing Release Management <release@syncthing.net>" imported
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: Total number processed: 2
gpg:               imported: 2  (RSA: 2)
~
(ノ^ヮ^)ノ*:・゚✧ gpg --verify sha256sum.txt.asc
gpg: Signature made Sun 14 Feb 2016 11:34:45 AM PST using RSA key ID 00654A3E
gpg: Good signature from "Syncthing Release Management <release@syncthing.net>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 37C8 4554 E7E0 A261 E4F7  6E1E D26E 6ED0 0065 4A3E

Transfer and un-tar/gunzip

  1. scp the now verified tar.gz file to the DS215j
scp syncthing-linux-arm-v0.12.19.tar.gz nas.blazeyandtyler.com:
  1. un tar and remove the archive
(ノ^ヮ^)ノ*:・゚✧ ssh nas.blazeyandtyler.com
nas:~$ ls | grep ^syncthing
syncthing-linux-arm-v0.12.19.tar.gz
nas:~$ tar xvzf syncthing-linux-arm-v0.12.19.tar.gz 
syncthing-linux-arm-v0.12.19/
syncthing-linux-arm-v0.12.19/README.txt
syncthing-linux-arm-v0.12.19/LICENSE.txt
syncthing-linux-arm-v0.12.19/AUTHORS.txt
syncthing-linux-arm-v0.12.19/syncthing
syncthing-linux-arm-v0.12.19/etc/
syncthing-linux-arm-v0.12.19/etc/README.md
syncthing-linux-arm-v0.12.19/etc/linux-runit/
syncthing-linux-arm-v0.12.19/etc/linux-runit/README.md
syncthing-linux-arm-v0.12.19/etc/linux-runit/log/
syncthing-linux-arm-v0.12.19/etc/linux-runit/log/run
syncthing-linux-arm-v0.12.19/etc/linux-runit/run
syncthing-linux-arm-v0.12.19/etc/linux-systemd/
syncthing-linux-arm-v0.12.19/etc/linux-systemd/README.md
syncthing-linux-arm-v0.12.19/etc/linux-systemd/system/
syncthing-linux-arm-v0.12.19/etc/linux-systemd/system/syncthing@.service
syncthing-linux-arm-v0.12.19/etc/linux-systemd/user/
syncthing-linux-arm-v0.12.19/etc/linux-systemd/user/syncthing.service
syncthing-linux-arm-v0.12.19/etc/linux-upstart/
syncthing-linux-arm-v0.12.19/etc/linux-upstart/README.md
syncthing-linux-arm-v0.12.19/etc/linux-upstart/system/
syncthing-linux-arm-v0.12.19/etc/linux-upstart/system/syncthing.conf
syncthing-linux-arm-v0.12.19/etc/linux-upstart/user/
syncthing-linux-arm-v0.12.19/etc/linux-upstart/user/syncthing.conf
syncthing-linux-arm-v0.12.19/etc/macosx-launchd/
syncthing-linux-arm-v0.12.19/etc/macosx-launchd/README.md
syncthing-linux-arm-v0.12.19/etc/macosx-launchd/syncthing.plist
syncthing-linux-arm-v0.12.19/etc/solaris-smf/
syncthing-linux-arm-v0.12.19/etc/solaris-smf/README.md
syncthing-linux-arm-v0.12.19/etc/solaris-smf/syncthing.xml
syncthing-linux-arm-v0.12.19/FAQ.pdf
syncthing-linux-arm-v0.12.19/Getting-Started.pdf
syncthing-linux-arm-v0.12.19/syncthing.sig
nas:~$ rm syncthing-linux-arm-v0.12.19.tar.gz
  1. Move the executable into /opt/bin
nas:~$ sudo mv syncthing-linux-arm-v0.12.19/syncthing /opt/bin/syncthing

Create and start your syncthing service

  1. Create a file at /etc/init/syncthing.conf
nas:~$ cat /etc/init/syncthing.conf 
description "Syncthing P2P sync service"

start on (local-filesystems and net-device-up IFACE!=lo)
stop on runlevel [!2345]

env STNORESTART=yes
env HOME=/volume1/homes/[username]
setuid "[username]"
setgid "users"

exec /opt/bin/syncthing

respawn
  1. Start Service
nas:~$ sudo start syncthing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment