Syncthing – own virtual drive

Syncthing – like the name tells is ‘thing’ synchronization application, which also works realy great as virtual drive (without web interface). With this in mind, this application wont fight it way on virtual drives market with Google Drive or ownCloud.

If we are looking for multi-platform solution which works out-of-box, and we want to synchronies our folder (1:1) across multiply nodes without to much configuration Syncthing is the perfect solution (for more complicated project I would go with rsync)!

Instalation (Debian/Ubuntu):

# lets add PGP key:
curl -s https://syncthing.net/release-key.txt | sudo apt-key add -

# add syncthing repository to APT sources:
echo "deb http://apt.syncthing.net/ syncthing release" | sudo tee /etc/apt/sources.list.d/syncthing.list

# install application:
sudo apt-get update
sudo apt-get install syncthing

Instalation (Windows):

#download application from site
#extract the archive with application

 

Starting application (Linux/Windows):

Syncthing run as user that run it with command:

./syncthing

 

Configuration as system service (Linux systemd):

Make file /etc/systemd/system/syncthing@.service

[Unit]
Description=Syncthing - Open Source Continuous File Synchronization for %I
Documentation=http://docs.syncthing.net/
After=network.target
Wants=syncthing-inotify@.service

[Service]
User=%i
ExecStart=/usr/bin/syncthing -no-browser -no-restart -logflags=0
Restart=on-failure
SuccessExitStatus=3 4
RestartForceExitStatus=3 4

[Install]
WantedBy=multi-user.target

Next we create or use existing account to use for syncthing, lets assume its ‘myuser’ account:

systemctl enable syncthing@myuser.service
systemctl start syncthing@myuser.service

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*