User Tools

Site Tools


software:syncthing

SyncThing

2022-02-06

Syncthing is a continuous file synchronization program. It synchronizes files between two or more computers in real time, safely protected from prying eyes. Your data is your data alone and you deserve to choose where it is stored, whether it is shared with some third party, and how it's transmitted over the internet.

From <https://syncthing.net/>

Host: http://localhost:8384

————————————————————————————————————————————————

Access Control Panel

2022-02-10

Syncthing will now automatically start the next time you log on to your user account in Windows. No console or browser window will pop-up, but you can still access the interface by opening http://localhost:8384 in a Web browser.

From <https://docs.syncthing.net/users/autostart.html#windows>

rename/move a synced folder?

How do I rename/move a synced folder?

An alternative way is to shut down Syncthing, move the folder on disk (including the .stfolder marker), edit the path directly in config.xml in the configuration folder (see Syncthing Configuration) and then start Syncthing again.

From <https://docs.syncthing.net/users/faq.html>

2022-07-16

schnappi Mar '21 The folder path can be changed. Have done it many times. Shutdown Syncthing, open the config file (if need location this forum can help), and change the folder path. Don’t forget to rename/move the folder as well.

From < https://forum.syncthing.net/t/why-cant-we-change-the-folder-paths/16507>

Set Low Priority

find in :

$HOME/.config/syncthing
$HOME/Library/Application Support/Syncthing
%LOCALAPPDATA%\Syncthing\config.xml

setLowPriority

Syncthing will attempt to lower its process priority at startup. Specifically: on Linux, set itself to a separate process group, set the niceness level of that process group to nine and the I/O priority to best effort level five; on other Unixes, set the process niceness level to nine; on Windows, set the process priority class to below normal. To disable this behavior, for example to control process priority yourself as part of launching Syncthing, set this option to false.

From <https://docs.syncthing.net/users/config.html#set-low-priority>

Configuration

Description

New in version 1.5.0: Database and config can now be set separately. Previously the database was always located in the same directory as the config. Syncthing uses a single directory to store configuration and crypto keys. Syncthing also has a database, which is often stored in this directory too. The config location defaults to 

  $HOME/.config/syncthing (Unix-like)
  $HOME/Library/Application Support/Syncthing (Mac)
  %LOCALAPPDATA%\Syncthing (Windows). It can be changed at runtime using the -config flag. In this directory the following files are located:

From <https://docs.syncthing.net/users/config.html>

Compression

Jul 2015 If you have compressible data in your folders (text files, word documents, source code, …) set it to “Always” for best performance. If you’re syncing photos, movies, already compressed data like zip files, leave it at “Metadata”. Don’t set it to “Never” unless you have extremely low powered devices where every CPU cycle matters. And in that case Syncthing may not be for you at all. 

From <https://forum.syncthing.net/t/turning-lan-compression-off/2714/4>

Performance

AudriusButkeviciusSyncthing Maintainer Mar 2015 So 2 tips:

1. Don’t keep the UI open in some tab, as that requires often database access + lock on the model.
2. Try letting it finish scanning before you add nodes, as the two processes might be competing.

From <https://forum.syncthing.net/t/how-is-the-performance-with-a-lot-of-files/1093/8>

Installing curl

2021-05-23

use curl to send commands to Syncthing

Windows If you have a version of Windows earlier than Windows 10, version 1803, you can download and install cURL as follows. 1. In Windows, create a new folder called curl in your C: drive. C:\curl 2. Go to http://curl.haxx.se/download.html and download one of the following zip files:

From <https://develop.zendesk.com/hc/en-us/articles/360001068567-Installing-and-using-cURL#install>

Configure Processor Priority

setLowPriority

Syncthing will attempt to lower its process priority at startup. Specifically: on Linux, set itself to a separate process group, set the niceness level of that process group to nine and the I/O priority to best effort level five; on other Unixes, set the process niceness level to nine; on Windows, set the process priority class to below normal. To disable this behavior, for example to control process priority yourself as part of launching Syncthing, set this option to false.

From <https://docs.syncthing.net/users/config.html#set-low-priority>

GOMAXPROCS

There’s an environment variable that can be set, GOMAXPROCS (details in syncthing -help). Setting it under Windows is a bit unintuitive and annoying probably, but it is used to limit the number of CPU cores used.

SyncTrayzor

If you’re using SyncTrayzor, that also had a setting to set Syncthing’s CPU priority.

From <https://forum.syncthing.net/t/limiting-syncthings-cpu-load/2237>

NSSM - Run as a service independent of user login

2021-08-15

NSSM - Run as a service independent of user login

From <https://docs.syncthing.net/users/autostart.html#autostart-windows-service>

1. Download and extract nssm to a folder where it can stay. The NSSM executable performs administration as well as executing as the Windows service so it will need to be kept in a suitable location.

From <https://docs.syncthing.net/users/autostart.html#autostart-windows-service>

Installation and Running

2021-05-18

2022-02-11 - Windows 10

NSSM - Use these options Run as a valid user that has access to the folders

1. Enter

Note: path to executable NO Quotes: c:\syncthing\syncthing.exe
Note: path to start up folder NO Quotes: c:\syncthing

 --no-console --no-browser in “Add arguments (optional):”

From <https://docs.syncthing.net/users/autostart.html#windows>

Task Scheduler

Again no Quotes: Enter the path to syncthing.exe in “Program/script:” (for example C:\syncthing\syncthing.exe).

2021-05-18

How to run Syncthing manually It can be useful for debugging and testing configuration to run syncthing from your Terminal. Just run syncthing pointing to the config directory: syncthing –home ~/.config/syncthing/

From <https://webinstall.dev/syncthing/>

Restore Receive Only folder to Sync state

2021-05-16

Run in Task Scheduler

POST /rest/db/revert¶ New in version 0.14.50. Request revert of a receive only folder. Reverting a folder means to undo all local changes. This API call does nothing if the folder is not a receive only folder. Takes the mandatory parameter folder (folder ID).

temp.txt
    curl -X POST -H "X-API-Key:..." http://127.0.0.1:8384/rest/db/revert?folder=default

From <https://docs.syncthing.net/rest/db-revert-post.html>

API Key To use the REST API an API key must be set and used. The API key can be generated in the GUI, or set in the configuration/gui/apikey element in the configuration file. To use an API key, set the request header X-API-Key to the API key value. For example, 

temp.txt
    curl -X POST -H "X-API-Key: abc123" http://localhost:8384/rest/... 

can be used to invoke with curl (add -k flag when using HTTPS with a Syncthing generated or self signed certificate).

From <https://docs.syncthing.net/dev/rest.html>

syncthingmanager

A command line tool for the Syncthing API. Designed to make setting up remote servers easier. (and for users who prefer the cli)

From <https://github.com/classicsc/syncthingmanager>

Send Only Folder

2021-05-16

A folder can be set in “send only mode” among the folder settings.

From <https://docs.syncthing.net/users/foldertypes.html>

In send only mode, all changes from other devices in the cluster are ignored. Changes are still received so the folder may become “out of sync”, but no changes will be applied.

From <https://docs.syncthing.net/users/foldertypes.html>

Override Changes Clicking this button will enforce this host’s current state on the rest of the cluster. Any changes made to files will be overwritten by the version on this host, any files that don’t exist on this host will be deleted, and so on.

From <https://docs.syncthing.net/users/foldertypes.html>

Syncthing replaces proprietary sync and cloud services with something open

From: https://syncthing.net/

Syncthing replaces proprietary sync and cloud services with something open, trustworthy and 
decentralized. Your data is your data alone and you deserve to choose where it is stored, if 
it is shared with some third party and how it's transmitted over the Internet.

From: http://forum.bittorrent.com/topic/34291-i-was-in-support-of-sync-20-right-up-till-they-broke-a-promise/page-12

I looked at SyncThing. (2015) 
Problems:
 
It does not have trackers/relay servers. So, it doesn't work when both peers happen to be behind a NAT/firewall where uPnP does not work and port-forwarding is not an option.
It's currently not something I can tell my parents to install and configure (whereas BTSync hasn't been a problem).
It does not have a link sharing facility.
No selective sync.

Errors

I have never used NSSM, but apparently error code 3 points to an incorrect working directory and/or environment path issue. Also, your NSSM executable path shows “Manager”…it’s a bit confusing… BTW, in the NSSM Service Installer Gui, did you double-check the paths under the “Application” tab…viz., “Path” & “Startup directory” while creating the Manager service?

https://forum.manager.io/t/error-starting-manager-as-a-service-with-nssm/19703/8

software/syncthing.txt · Last modified: 2022/07/16 19:32 by superwizard