18.10.2024, this is about file backup.
Windows#
On Windows I used SyncBackFree
. This worked well, but you need to trigger it on demand.
Syncthing
#
see heise CT article
Ports
#
Default (or see ~/.local/state/syncthing/config.xml)
- 22000/TCP - TCP based sync protocol traffic (xml:options/listenAddress)
- 22000/UDP - QUIC based sync protocol traffic
- 21027/UDP - for discovery broadcasts on IPv4 and multicasts on IPv6 (xml:options/localAnnouncePort)
- 8384/TCP - Web Gui (xmL:gui/address)
On Raspberry PI#
get source signed key
> sudo curl -s -o /usr/share/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg
add source to package lists
> echo "deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list
check
>sudo vi /etc/apt/sources.list.d/syncthing.list
install
> sudo apt update
> sudo apt full-upgrade -y
> sudo apt install syncthing -y
start/stop
> sudo systemctl enable syncthing@markus.service
> sudo systemctl start syncthing@markus.service
> sudo systemctl disable syncthing@markus.service
> sudo systemctl stop syncthing@markus.service
enable web gui for all IP addresses (config.xml is created after first start only)
# configuratrion
> sudo vi ~/.local/state/syncthing/config.xml
> sudo vi ~/.local/state/syncthing/config.xml
update line: <address>0.0.0.0:8384</address>
> sudo systemctl restart syncthing@markus.service
Web Guid at http://raspberrypi5:8384
API can be used with header: X-API-Key=<see web gui preferences>
https://raspberrypi5:8384/rest/pending/folders
On Rented Linux Server (Debian)#
config file (keep standard)vi /home/markus.ebel/.config/syncthing/config.xml
Add Reverse Proxy
for Apache
> a2enmod proxy_http headers
add to /etc/apache2/sites-enabled/000-default-le-ssl.conf inside your default <VirtualHost>
<Location /syncthing/>
ProxyPass http://localhost:8384/
ProxyPassReverse http://localhost:8384/
RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
Require all granted
</Location>
commands
sudo systemctl enable syncthing@markus.ebel.service sudo systemctl start syncthing@markus.ebel.service sudo systemctl restart syncthing@markus.ebel.service
https://www.inetone.de/syncthing/
(trailing slash is mandatory!)
Issues#
"failed to setup inotify handler. Please increase inotify limits" > see https://docs.syncthing.net/users/faq.html#inotify-limits
add following line > sudo vi /etc/sysctl.conf
fs.inotify.max_user_watches=204800Then reboot or execute
echo 204800 | sudo tee /proc/sys/fs/inotify/max_user_watches