Posted onIntutorialViews: Word count in article: 3.3kReading time ≈3 mins.
Syncthing is a useful tool for synchronize files between servers.
How to deploy
Installation
Log in your server as root.
1 2 3 4 5 6 7 8 9 10 11 12
# Add the release PGP keys: sudomkdir -p /etc/apt/keyrings sudo curl -L -o /etc/apt/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg # Add the "stable" channel to your APT sources: echo"deb [signed-by=/etc/apt/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable" | sudotee /etc/apt/sources.list.d/syncthing.list # Add the "candidate" channel to your APT sources: echo"deb [signed-by=/etc/apt/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing candidate" | sudotee /etc/apt/sources.list.d/syncthing.list # Update and install syncthing: sudo apt-get update sudo apt-get install syncthing adduser sync-user systemctl edit syncthing@sync-user.service # Notice that any edits you make need to be between these two comment blocks.
1 2 3 4 5 6 7 8
### Editing /etc/systemd/system/syncthing@sync-user.service.d/override.conf ### Anything between here and the comment below will become the new contents of the file
# comment these lines related to ssl until you get your ssl certificate SSLEngine on SSLCertificateFile /etc/letsencrypt/live/your.domain/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/your.domain/privkey.pem
<Location /> ProxyPass http://localhost:8384/ ProxyPassReverse http://localhost:8384/ RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME} Require all granted </Location>